fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

1.44.0
1.4 KiB42 linesraw
1error: unreachable expression
2  --> $DIR/expr_struct.rs:14:13
3   |
4LL |     let x = Foo { a: 22, b: 33, ..return };
5   |             ^^^^^^^^^^^^^^^^^^^^^^------^^
6   |             |                     |
7   |             |                     any code following this expression is unreachable
8   |             unreachable expression
9   |
10note: the lint level is defined here
11  --> $DIR/expr_struct.rs:4:9
12   |
13LL | #![deny(unreachable_code)]
14   |         ^^^^^^^^^^^^^^^^
15
16error: unreachable expression
17  --> $DIR/expr_struct.rs:19:33
18   |
19LL |     let x = Foo { a: return, b: 33, ..return };
20   |                      ------     ^^ unreachable expression
21   |                      |
22   |                      any code following this expression is unreachable
23
24error: unreachable expression
25  --> $DIR/expr_struct.rs:24:39
26   |
27LL |     let x = Foo { a: 22, b: return, ..return };
28   |                             ------    ^^^^^^ unreachable expression
29   |                             |
30   |                             any code following this expression is unreachable
31
32error: unreachable expression
33  --> $DIR/expr_struct.rs:29:13
34   |
35LL |     let x = Foo { a: 22, b: return };
36   |             ^^^^^^^^^^^^^^^^------^^
37   |             |               |
38   |             |               any code following this expression is unreachable
39   |             unreachable expression
40
41error: aborting due to 4 previous errors
42