File tree Expand file tree Collapse file tree 1 file changed +52
-2
lines changed
Expand file tree Collapse file tree 1 file changed +52
-2
lines changed Original file line number Diff line number Diff line change @@ -1779,6 +1779,58 @@ fn(isize, *const *const u8) -> isize;
17791779```
17801780"## ,
17811781
1782+ E0163 : r##"
1783+ This error means that an attempt was made to match an enum variant as a
1784+ struct type when the variant isn't a struct type:
1785+
1786+ ```
1787+ enum Foo { B(u32) }
1788+
1789+ fn bar(foo: Foo) -> u32 {
1790+ match foo {
1791+ Foo::B{i} => i // error 0163
1792+ }
1793+ }
1794+ ```
1795+
1796+ Try using `()` instead:
1797+
1798+ ```
1799+ fn bar(foo: Foo) -> u32 {
1800+ match foo {
1801+ Foo::B(i) => i
1802+ }
1803+ }
1804+ ```
1805+ "## ,
1806+
1807+ E0164 : r##"
1808+
1809+ This error means that an attempt was made to match a struct type enum
1810+ variant as a non-struct type:
1811+
1812+ ```
1813+ enum Foo { B{ i: u32 } }
1814+
1815+ fn bar(foo: Foo) -> u32 {
1816+ match foo {
1817+ Foo::B(i) => i // error 0164
1818+ }
1819+ }
1820+ ```
1821+
1822+ Try using `{}` isntead:
1823+
1824+ ```
1825+ fn bar(foo: Foo) -> u32 {
1826+ match foo {
1827+ Foo::B{i} => i
1828+ }
1829+ }
1830+ ```
1831+ "## ,
1832+
1833+
17821834E0166 : r##"
17831835This error means that the compiler found a return expression in a function
17841836marked as diverging. A function diverges if it has `!` in the place of the
@@ -3293,8 +3345,6 @@ register_diagnostics! {
32933345// E0129,
32943346// E0141,
32953347// E0159, // use of trait `{}` as struct constructor
3296- E0163 ,
3297- E0164 ,
32983348 E0167 ,
32993349// E0168,
33003350// E0173, // manual implementations of unboxed closure traits are experimental
You can’t perform that action at this time.
0 commit comments