blob: 4d05d452865295675cdbbb624f325007f5e750c5 [file]
error[E0391]: cycle detected when computing type of `Foo::T`
--> $DIR/cyclic-default-type-param-via-alias.rs:10:34
|
LL | pub struct Foo<T = Box<dyn Trait<DefaultFoo>>>;
| ^^^^^^^^^^
|
note: ...which requires expanding type alias `DefaultFoo`...
--> $DIR/cyclic-default-type-param-via-alias.rs:12:19
|
LL | type DefaultFoo = Foo;
| ^^^
= note: ...which again requires computing type of `Foo::T`, completing the cycle
note: cycle used when checking that `Foo` is well-formed
--> $DIR/cyclic-default-type-param-via-alias.rs:10:1
|
LL | pub struct Foo<T = Box<dyn Trait<DefaultFoo>>>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: for more information, see <https://rustc-dev-guide.rust-lang.org/overview.html#queries> and <https://rustc-dev-guide.rust-lang.org/query.html>
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0391`.