We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 8a3ad49 + cca9e63 commit 5d43ae8Copy full SHA for 5d43ae8
src/test/ui/traits/issue-82830.rs
@@ -0,0 +1,16 @@
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
src/test/ui/traits/issue-82830.stderr
@@ -0,0 +1,15 @@
+error[E0275]: overflow evaluating the requirement `P: Sized`
+ --> $DIR/issue-82830.rs:7:8
+ |
+LL | t: MaybeBox<P>,
+ | ^^^^^^^^^^^
+note: required because of the requirements on the impl of `A<P, Box<P>>` for `P`
+ --> $DIR/issue-82830.rs:10:12
+LL | impl<Y, N> A<Y, N> for P {
+ | ^^^^^^^ ^
+error: aborting due to previous error
+For more information about this error, try `rustc --explain E0275`.
0 commit comments