rust/tests/ui/error-codes/E0401.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

33 lines
555 B
Rust
Raw Normal View History

2018-02-07 15:26:35 +00:00
trait Baz<T> {}
2016-08-15 11:58:28 +00:00
fn foo<T>(x: T) {
fn bfnr<U, V: Baz<U>, W: Fn()>(y: T) { //~ ERROR E0401
2018-02-07 15:26:35 +00:00
}
fn baz<U,
V: Baz<U>,
W: Fn()>
(y: T) { //~ ERROR E0401
2016-08-15 11:58:28 +00:00
}
bfnr(x);
//~^ ERROR type annotations needed
//~| ERROR type annotations needed
2016-08-15 11:58:28 +00:00
}
2018-02-07 15:26:35 +00:00
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))
}
}
2016-08-15 11:58:28 +00:00
fn main() {
}