]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nested-ty-params.stderr
Rollup merge of #53311 - RalfJung:windows-mutex, r=retep998
[rust.git] / src / test / ui / nested-ty-params.stderr
1 error[E0401]: can't use type parameters from outer function
2   --> $DIR/nested-ty-params.rs:13:16
3    |
4 LL | fn hd<U>(v: Vec<U> ) -> U {
5    |       - type variable from outer function
6 LL |     fn hd1(w: [U]) -> U { return w[0]; }
7    |        ---     ^ use of type variable from outer function
8    |        |
9    |        help: try using a local type parameter instead: `hd1<U>`
10
11 error[E0401]: can't use type parameters from outer function
12   --> $DIR/nested-ty-params.rs:13:23
13    |
14 LL | fn hd<U>(v: Vec<U> ) -> U {
15    |       - type variable from outer function
16 LL |     fn hd1(w: [U]) -> U { return w[0]; }
17    |        ---            ^ use of type variable from outer function
18    |        |
19    |        help: try using a local type parameter instead: `hd1<U>`
20
21 error[E0601]: `main` function not found in crate `nested_ty_params`
22    |
23    = note: consider adding a `main` function to `$DIR/nested-ty-params.rs`
24
25 error: aborting due to 3 previous errors
26
27 Some errors occurred: E0401, E0601.
28 For more information about an error, try `rustc --explain E0401`.