File tree 4 files changed +42
-0
lines changed
src/test/ui/save-analysis
4 files changed +42
-0
lines changed Original file line number Diff line number Diff line change
1
+ // compile-flags: -Zsave-analysis
2
+
3
+ // Check that this doesn't ICE when processing associated const (field expr).
4
+
5
+ pub fn f ( ) {
6
+ trait Trait { }
7
+ impl Trait {
8
+ const FLAG : u32 = bogus. field ; //~ ERROR cannot find value `bogus`
9
+ }
10
+ }
11
+
12
+ fn main ( ) { }
Original file line number Diff line number Diff line change
1
+ error[E0425]: cannot find value `bogus` in this scope
2
+ --> $DIR/issue-59134-0.rs:8:27
3
+ |
4
+ LL | const FLAG: u32 = bogus.field;
5
+ | ^^^^^ not found in this scope
6
+
7
+ error: aborting due to previous error
8
+
9
+ For more information about this error, try `rustc --explain E0425`.
Original file line number Diff line number Diff line change
1
+ // compile-flags: -Zsave-analysis
2
+
3
+ // Check that this doesn't ICE when processing associated const (type).
4
+
5
+ fn func ( ) {
6
+ trait Trait {
7
+ type MyType ;
8
+ const CONST : Self :: MyType = bogus. field ; //~ ERROR cannot find value `bogus`
9
+ }
10
+ }
11
+
12
+ fn main ( ) { }
Original file line number Diff line number Diff line change
1
+ error[E0425]: cannot find value `bogus` in this scope
2
+ --> $DIR/issue-59134-1.rs:8:37
3
+ |
4
+ LL | const CONST: Self::MyType = bogus.field;
5
+ | ^^^^^ not found in this scope
6
+
7
+ error: aborting due to previous error
8
+
9
+ For more information about this error, try `rustc --explain E0425`.
You can’t perform that action at this time.
0 commit comments