d9ab4ff9a3
Remove blanket check for existence of other errors before emitting "type annotation needed" errors, and add some eager checks to avoid adding obligations when they refer to types that reference `[type error]` in order to reduce unneded errors.
19 lines
443 B
Rust
19 lines
443 B
Rust
// Test that (for now) we report an ambiguity error here, because
|
|
// specific trait relationships are ignored for the purposes of trait
|
|
// matching. This behavior should likely be improved such that this
|
|
// test passes. See #21974 for more details.
|
|
|
|
trait Foo {
|
|
fn foo(self);
|
|
}
|
|
|
|
fn foo<'a,'b,T>(x: &'a T, y: &'b T) //~ ERROR type annotations needed
|
|
where &'a T : Foo,
|
|
&'b T : Foo
|
|
{
|
|
x.foo();
|
|
y.foo();
|
|
}
|
|
|
|
fn main() { }
|