mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 15:01:51 +00:00
91b9ffeab0
In `report_fullfillment_errors` push back `T: Sized`, `T: WellFormed` and coercion errors to the end of the list. The pre-existing deduplication logic eliminates redundant errors better that way, keeping the resulting output with fewer errors than before, while also having more detail.
23 lines
303 B
Rust
23 lines
303 B
Rust
struct A<T>(T);
|
|
struct B;
|
|
|
|
trait I<T> {}
|
|
impl I<i32> for B {}
|
|
impl I<u32> for B {}
|
|
|
|
trait V<U> {
|
|
fn method(self) -> U;
|
|
}
|
|
|
|
impl<T, U> V<U> for A<T>
|
|
where
|
|
T: I<U>,
|
|
{
|
|
fn method(self) -> U { unimplemented!() }
|
|
}
|
|
|
|
fn main() {
|
|
let a = A(B);
|
|
a.method(); //~ ERROR type annotations needed
|
|
}
|