File tree 2 files changed +25
-0
lines changed
2 files changed +25
-0
lines changed 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