fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0401]: can't use generic parameters from outer item 2 --> $DIR/E0401.rs:4:39 3 | 4LL | fn foo<T>(x: T) { 5 | - type parameter from outer item 6LL | fn bfnr<U, V: Baz<U>, W: Fn()>(y: T) { 7 | - ^ use of generic parameter from outer item 8 | | 9 | help: try introducing a local generic parameter here: `T,` 10 11error[E0401]: can't use generic parameters from outer item 12 --> $DIR/E0401.rs:9:16 13 | 14LL | fn foo<T>(x: T) { 15 | - type parameter from outer item 16... 17LL | fn baz<U, 18 | - help: try introducing a local generic parameter here: `T,` 19... 20LL | (y: T) { 21 | ^ use of generic parameter from outer item 22 23error[E0401]: can't use generic parameters from outer item 24 --> $DIR/E0401.rs:24:25 25 | 26LL | impl<T> Iterator for A<T> { 27 | ---- `Self` type implicitly declared here, by this `impl` 28... 29LL | fn helper(sel: &Self) -> u8 { 30 | ^^^^ 31 | | 32 | use of generic parameter from outer item 33 | refer to the type directly here instead 34 35error[E0282]: type annotations needed 36 --> $DIR/E0401.rs:11:5 37 | 38LL | bfnr(x); 39 | ^^^^ cannot infer type of the type parameter `U` declared on the function `bfnr` 40 | 41help: consider specifying the generic arguments 42 | 43LL | bfnr::<U, V, W>(x); 44 | +++++++++++ 45 46error[E0283]: type annotations needed 47 --> $DIR/E0401.rs:11:5 48 | 49LL | bfnr(x); 50 | ^^^^ cannot infer type of the type parameter `W` declared on the function `bfnr` 51 | 52 = note: multiple `impl`s satisfying `_: Fn<()>` found in the following crates: `alloc`, `core`: 53 - impl<A, F> Fn<A> for &F 54 where A: Tuple, F: Fn<A>, F: ?Sized; 55 - impl<Args, F, A> Fn<Args> for Box<F, A> 56 where Args: Tuple, F: Fn<Args>, A: Allocator, F: ?Sized; 57note: required by a bound in `bfnr` 58 --> $DIR/E0401.rs:4:30 59 | 60LL | fn bfnr<U, V: Baz<U>, W: Fn()>(y: T) { 61 | ^^^^ required by this bound in `bfnr` 62help: consider specifying the generic arguments 63 | 64LL | bfnr::<U, V, W>(x); 65 | +++++++++++ 66 67error: aborting due to 5 previous errors 68 69Some errors have detailed explanations: E0282, E0283, E0401. 70For more information about an error, try `rustc --explain E0282`.