File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ E0011: include_str!("./error_codes/E0011.md"),
2121E0013 : include_str!( "./error_codes/E0013.md" ) ,
2222E0014 : include_str!( "./error_codes/E0014.md" ) ,
2323E0015 : include_str!( "./error_codes/E0015.md" ) ,
24+ E0016 : include_str!( "./error_codes/E0016.md" ) ,
2425E0017 : include_str!( "./error_codes/E0017.md" ) ,
2526E0019 : include_str!( "./error_codes/E0019.md" ) ,
2627E0023 : include_str!( "./error_codes/E0023.md" ) ,
Original file line number Diff line number Diff line change 1+ #### Note: this error code is no longer emitted by the compiler.
2+
3+ Blocks in constants may only contain items (such as constant, function
4+ definition, etc...) and a tail expression. Erroneous code example:
5+
6+ ```
7+ const FOO: i32 = { let x = 0; x }; // 'x' isn't an item!
8+ ```
9+
10+ To avoid it, you have to replace the non-item object:
11+
12+ ```
13+ const FOO: i32 = { const X : i32 = 0; X };
14+ ```
You can’t perform that action at this time.
0 commit comments