File tree Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -7,5 +7,12 @@ fn main() {
77 if bar == 2 { //~ ERROR cannot find value
88 println ! ( "yes" ) ;
99 }
10+ {
11+ let baz = 3 ;
12+ struct S ;
13+ }
14+ if baz == 3 { //~ ERROR cannot find value
15+ println ! ( "yes" ) ;
16+ }
1017 test_func ( 1 ) ; //~ ERROR cannot find function
1118}
Original file line number Diff line number Diff line change @@ -10,12 +10,24 @@ help: the binding `bar` is available in a different scope in the same function
1010LL | let bar = 2;
1111 | ^^^
1212
13+ error[E0425]: cannot find value `baz` in this scope
14+ --> $DIR/issue-104700-inner_scope.rs:14:8
15+ |
16+ LL | if baz == 3 {
17+ | ^^^
18+ |
19+ help: the binding `baz` is available in a different scope in the same function
20+ --> $DIR/issue-104700-inner_scope.rs:11:13
21+ |
22+ LL | let baz = 3;
23+ | ^^^
24+
1325error[E0425]: cannot find function `test_func` in this scope
14- --> $DIR/issue-104700-inner_scope.rs:10 :5
26+ --> $DIR/issue-104700-inner_scope.rs:17 :5
1527 |
1628LL | test_func(1);
1729 | ^^^^^^^^^ not found in this scope
1830
19- error: aborting due to 2 previous errors
31+ error: aborting due to 3 previous errors
2032
2133For more information about this error, try `rustc --explain E0425`.
You can’t perform that action at this time.
0 commit comments