fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.4 KiB34 linesraw
1error[E0401]: can't use generic parameters from outer item
2  --> $DIR/generic-params-from-outer-item-in-const-item.rs:12:20
3   |
4LL | fn outer<T: Tr>() { // outer function
5   |          - type parameter from outer item
6LL |     const K: u32 = T::C;
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/generic-params-from-outer-item-in-const-item.rs:19:24
13   |
14LL | impl<T> Tr for T { // outer impl block
15   |      - type parameter from outer item
16LL |     const C: u32 = {
17LL |         const I: u32 = T::C;
18   |                -       ^^^^ use of generic parameter from outer item
19   |                |
20   |                help: try introducing a local generic parameter here: `<T>`
21
22error[E0401]: can't use generic parameters from outer item
23  --> $DIR/generic-params-from-outer-item-in-const-item.rs:27:20
24   |
25LL | struct S<T: Tr>(U32<{ // outer struct
26   |          - type parameter from outer item
27LL |     const _: u32 = T::C;
28   |            -       ^^^^ use of generic parameter from outer item
29   |            |
30   |            help: try introducing a local generic parameter here: `<T>`
31
32error: aborting due to 3 previous errors
33
34For more information about this error, try `rustc --explain E0401`.