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.
31 lines
511 B
Rust
31 lines
511 B
Rust
trait Baz<T> {}
|
|
|
|
fn foo<T>(x: T) {
|
|
fn bfnr<U, V: Baz<U>, W: Fn()>(y: T) { //~ ERROR E0401
|
|
}
|
|
fn baz<U,
|
|
V: Baz<U>,
|
|
W: Fn()>
|
|
(y: T) { //~ ERROR E0401
|
|
}
|
|
bfnr(x); //~ ERROR type annotations needed
|
|
}
|
|
|
|
|
|
struct A<T> {
|
|
inner: T,
|
|
}
|
|
|
|
impl<T> Iterator for A<T> {
|
|
type Item = u8;
|
|
fn next(&mut self) -> Option<u8> {
|
|
fn helper(sel: &Self) -> u8 { //~ ERROR E0401
|
|
unimplemented!();
|
|
}
|
|
Some(helper(self))
|
|
}
|
|
}
|
|
|
|
fn main() {
|
|
}
|