File tree 2 files changed +30
-0
lines changed 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change
1
+ // This test ensures that if implementation on projections is supported,
2
+ // it doesn't end in very weird cycle error.
3
+
4
+ #![ crate_type = "lib" ]
5
+
6
+ pub trait Identity {
7
+ type Identity : ?Sized ;
8
+ }
9
+
10
+ impl < T : ?Sized > Identity for T {
11
+ type Identity = Self ;
12
+ }
13
+
14
+ pub struct I8 < const F : i8 > ;
15
+
16
+ impl <I8 < { i8:: MIN } > as Identity >:: Identity {
17
+ //~^ ERROR no nominal type found for inherent implementation
18
+ pub fn foo ( & self ) { }
19
+ }
Original file line number Diff line number Diff line change
1
+ error[E0118]: no nominal type found for inherent implementation
2
+ --> $DIR/wrong-normalization.rs:16:6
3
+ |
4
+ LL | impl <I8<{i8::MIN}> as Identity>::Identity {
5
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl requires a nominal type
6
+ |
7
+ = note: either implement a trait on it or create a newtype to wrap it instead
8
+
9
+ error: aborting due to previous error
10
+
11
+ For more information about this error, try `rustc --explain E0118`.
You can’t perform that action at this time.
0 commit comments