2018-02-07 15:26:35 +00:00
|
|
|
trait Baz<T> {}
|
|
|
|
|
2016-08-15 11:58:28 +00:00
|
|
|
fn foo<T>(x: T) {
|
2018-03-14 05:58:45 +00:00
|
|
|
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
|
|
|
}
|
2022-10-19 15:17:19 +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() {
|
|
|
|
}
|