Code
trait Foo<T> {}
impl Foo<T: Default> for u32 {}
Current output
error[E0658]: associated type bounds are unstable
--> src/lib.rs:2:10
|
2 | impl Foo<T: Default> for u32 {}
| ^^^^^^^^^^
|
= note: see issue #52662 <https://github.com/rust-lang/rust/issues/52662> for more information
error[E0107]: trait takes 1 generic argument but 0 generic arguments were supplied
--> src/lib.rs:2:6
|
2 | impl Foo<T: Default> for u32 {}
| ^^^ expected 1 generic argument
|
note: trait defined here, with 1 generic parameter: `T`
--> src/lib.rs:1:7
|
1 | trait Foo<T> {}
| ^^^ -
help: add missing generic argument
|
2 | impl Foo<T, T: Default> for u32 {}
| ++
error[E0229]: associated type bindings are not allowed here
--> src/lib.rs:2:10
|
2 | impl Foo<T: Default> for u32 {}
| ^^^^^^^^^^ associated type not allowed here
Desired output
error[E0658]: associated type bounds are unstable
--> src/lib.rs:2:10
|
2 | impl Foo<T: Default> for u32 {}
| ^^^^^^^^^^
|
= note: see issue #52662 <https://github.com/rust-lang/rust/issues/52662> for more information
error[E0229]: associated type bindings are not allowed here
--> src/lib.rs:2:10
|
2 | impl Foo<T: Default> for u32 {}
| ^^^^^^^^^^ associated type not allowed here
help: declare the type parameter first
|
2 | impl<T: Default> Foo<T> for u32 {}
| ++++++++++++
Rationale and extra context
No response
Other cases
No response
Anything else?
No response
Code
Current output
Desired output
Rationale and extra context
No response
Other cases
No response
Anything else?
No response