E4198

Contents

E4198#

Compiler diagnostic name: struct_constr_not_implemented.

A struct declares a constructor, but the matching constructor implementation is missing or is not a regular implementation of that constructor.

Struct constructor declarations and implementations must agree on the same constructor function. An alias or trait implementation is not enough to satisfy the declaration.

This diagnostic is produced by the struct-constructor consistency checker. The legacy declaration form that reaches this checker is currently rejected earlier by the parser/deprecation diagnostics, so this page is not monitored by a source-level error-code example.

Suggestion#

Define the constructor as the regular struct constructor function, and make its parameter list and return type match the declaration.