11error[E0391]: cycle detected when computing type of `Foo::T`
2- --> $DIR/issue-34373.rs:7:30
2+ --> $DIR/issue-34373.rs:7:34
33 |
4- LL | pub struct Foo<T = Box<Trait<DefaultFoo>>>;
5- | ^^^^^^^^^^
4+ LL | pub struct Foo<T = Box<dyn Trait<DefaultFoo>>>;
5+ | ^^^^^^^^^^
66 |
77note: ...which requires expanding type alias `DefaultFoo`...
88 --> $DIR/issue-34373.rs:9:19
@@ -13,15 +13,15 @@ LL | type DefaultFoo = Foo;
1313note: cycle used when checking that `Foo` is well-formed
1414 --> $DIR/issue-34373.rs:7:1
1515 |
16- LL | pub struct Foo<T = Box<Trait<DefaultFoo>>>;
17- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
16+ LL | pub struct Foo<T = Box<dyn Trait<DefaultFoo>>>;
17+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1818 = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
1919
2020error[E0392]: type parameter `T` is never used
2121 --> $DIR/issue-34373.rs:7:16
2222 |
23- LL | pub struct Foo<T = Box<Trait<DefaultFoo>>>;
24- | ^^^^^^^^^^^^^^^^^^^^^^^^^^ unused type parameter
23+ LL | pub struct Foo<T = Box<dyn Trait<DefaultFoo>>>;
24+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unused type parameter
2525 |
2626 = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData`
2727 = help: if you intended `T` to be a const parameter, use `const T: /* Type */` instead
0 commit comments