kw init
Reserved keyword
The list of words: §1.4
Syntax
ImplMember = { Attr } [ Vis ] ( Receiver ( "fn" | "op" ) Sig ( Block | "=>" Expr )
| "override" "fn" Sig ( Block | "=>" Expr ) | "open" "fn" Sig ( Block | "=>" Expr )
| "init" Sig ( Block | "=>" Expr ) | "dep" Ident ":" Type | Rpc | Const ) ;Grammar: App. A
Defined in
- 4.3 Construction and constructors — Literal. T{ f1: e1, f2, ..base }
- 4.5 impl and methods — Inside a method self and Self are available.
- 1.4 Keywords — Reserved (cannot be used as names)
Related diagnostics
bad-init, missing-field, must-close, positional-literal, sealed-literal, impl-foreign-type, unknown-method