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() {
7
7
if bar == 2 { //~ ERROR cannot find value
8
8
println ! ( "yes" ) ;
9
9
}
10
+ {
11
+ let baz = 3 ;
12
+ struct S ;
13
+ }
14
+ if baz == 3 { //~ ERROR cannot find value
15
+ println ! ( "yes" ) ;
16
+ }
10
17
test_func ( 1 ) ; //~ ERROR cannot find function
11
18
}
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
10
10
LL | let bar = 2;
11
11
| ^^^
12
12
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
+
13
25
error[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
15
27
|
16
28
LL | test_func(1);
17
29
| ^^^^^^^^^ not found in this scope
18
30
19
- error: aborting due to 2 previous errors
31
+ error: aborting due to 3 previous errors
20
32
21
33
For more information about this error, try `rustc --explain E0425`.
You can’t perform that action at this time.
0 commit comments