fork/rust

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

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

master
1.1 KiB28 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
9error[E0401]: can't use generic parameters from outer item
10  --> $DIR/generic-params-from-outer-item-in-const-item.rs:19:24
11   |
12LL | impl<T> Tr for T { // outer impl block
13   |      - type parameter from outer item
14LL |     const C: u32 = {
15LL |         const I: u32 = T::C;
16   |                        ^^^^ use of generic parameter from outer item
17
18error[E0401]: can't use generic parameters from outer item
19  --> $DIR/generic-params-from-outer-item-in-const-item.rs:27:20
20   |
21LL | struct S<T: Tr>(U32<{ // outer struct
22   |          - type parameter from outer item
23LL |     const _: u32 = T::C;
24   |                    ^^^^ use of generic parameter from outer item
25
26error: aborting due to 3 previous errors
27
28For more information about this error, try `rustc --explain E0401`.