File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change
1
+ trait A < Y , N > {
2
+ type B ;
3
+ }
4
+
5
+ type MaybeBox < T > = <T as A < T , Box < T > > >:: B ;
6
+ struct P {
7
+ t : MaybeBox < P > , //~ ERROR: overflow evaluating the requirement `P: Sized`
8
+ }
9
+
10
+ impl < Y , N > A < Y , N > for P {
11
+ type B = N ;
12
+ }
13
+
14
+ fn main ( ) {
15
+ let t: MaybeBox < P > ;
16
+ }
Original file line number Diff line number Diff line change
1
+ error[E0275]: overflow evaluating the requirement `P: Sized`
2
+ --> $DIR/issue-82830.rs:7:8
3
+ |
4
+ LL | t: MaybeBox<P>,
5
+ | ^^^^^^^^^^^
6
+ |
7
+ note: required because of the requirements on the impl of `A<P, Box<P>>` for `P`
8
+ --> $DIR/issue-82830.rs:10:12
9
+ |
10
+ LL | impl<Y, N> A<Y, N> for P {
11
+ | ^^^^^^^ ^
12
+
13
+ error: aborting due to previous error
14
+
15
+ For more information about this error, try `rustc --explain E0275`.
You can’t perform that action at this time.
0 commit comments