File tree 4 files changed +27
-2
lines changed
4 files changed +27
-2
lines changed Original file line number Diff line number Diff line change 1
- d3d145ea1cae47ad392173f890577788117da3d9
1
+ 1a1876c9790f168fb51afa335a7ba3e6fc267d75
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ impl rustc_driver::Callbacks for MiriCompilerCalls {
68
68
queries : & ' tcx rustc_interface:: Queries < ' tcx > ,
69
69
) -> Compilation {
70
70
queries. global_ctxt ( ) . unwrap ( ) . enter ( |tcx| {
71
- if tcx. sess . dcx ( ) . has_errors ( ) . is_some ( ) {
71
+ if tcx. sess . dcx ( ) . has_errors_or_delayed_bugs ( ) . is_some ( ) {
72
72
tcx. dcx ( ) . fatal ( "miri cannot be run on programs that fail compilation" ) ;
73
73
}
74
74
Original file line number Diff line number Diff line change
1
+ // Regression test for https://github.com/rust-lang/rust/issues/121508.
2
+ struct Struct < T > ( T ) ;
3
+
4
+ impl < T > std:: ops:: Deref for Struct < T > {
5
+ type Target = dyn Fn ( T ) ;
6
+ fn deref ( & self ) -> & assert_mem_uninitialized_valid:: Target {
7
+ //~^ERROR: undeclared crate or module
8
+ unimplemented ! ( )
9
+ }
10
+ }
11
+
12
+ fn main ( ) {
13
+ let f = Struct ( Default :: default ( ) ) ;
14
+ f ( 0 ) ;
15
+ f ( 0 ) ;
16
+ }
Original file line number Diff line number Diff line change
1
+ error[E0433]: failed to resolve: use of undeclared crate or module `assert_mem_uninitialized_valid`
2
+ --> $DIR/rustc-error2.rs:LL:CC
3
+ |
4
+ LL | fn deref(&self) -> &assert_mem_uninitialized_valid::Target {
5
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of undeclared crate or module `assert_mem_uninitialized_valid`
6
+
7
+ error: aborting due to 1 previous error
8
+
9
+ For more information about this error, try `rustc --explain E0433`.
You can’t perform that action at this time.
0 commit comments