rust/src/test/ui/error-codes/E0401.rs

31 lines
511 B
Rust
Raw Normal View History

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