1
1
error[E0391]: cycle detected when computing type of `Foo::T`
2
- --> $DIR/issue-34373.rs:7:30
2
+ --> $DIR/issue-34373.rs:7:34
3
3
|
4
- LL | pub struct Foo<T = Box<Trait<DefaultFoo>>>;
5
- | ^^^^^^^^^^
4
+ LL | pub struct Foo<T = Box<dyn Trait<DefaultFoo>>>;
5
+ | ^^^^^^^^^^
6
6
|
7
7
note: ...which requires expanding type alias `DefaultFoo`...
8
8
--> $DIR/issue-34373.rs:9:19
@@ -13,15 +13,15 @@ LL | type DefaultFoo = Foo;
13
13
note: cycle used when checking that `Foo` is well-formed
14
14
--> $DIR/issue-34373.rs:7:1
15
15
|
16
- LL | pub struct Foo<T = Box<Trait<DefaultFoo>>>;
17
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
16
+ LL | pub struct Foo<T = Box<dyn Trait<DefaultFoo>>>;
17
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
18
18
= 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
19
19
20
20
error[E0392]: type parameter `T` is never used
21
21
--> $DIR/issue-34373.rs:7:16
22
22
|
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
25
25
|
26
26
= help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData`
27
27
= help: if you intended `T` to be a const parameter, use `const T: /* Type */` instead
0 commit comments