2018-02-07 09:26:35 -06:00
|
|
|
trait Baz<T> {}
|
|
|
|
|
2016-08-15 06:58:28 -05:00
|
|
|
fn foo<T>(x: T) {
|
2018-03-14 00:58:45 -05:00
|
|
|
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
|
|
|
}
|
2022-10-19 10:17:19 -05:00
|
|
|
bfnr(x);
|
|
|
|
//~^ ERROR type annotations needed
|
|
|
|
//~| 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() {
|
|
|
|
}
|