fork/rust

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

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

master
3.0 KiB78 linesraw
1error[E0637]: `&` without an explicit lifetime name cannot be used here
2  --> $DIR/const-param-elided-lifetime.rs:9:19
3   |
4LL | struct A<const N: &u8>;
5   |                   ^ explicit lifetime name needed here
6
7error[E0637]: `&` without an explicit lifetime name cannot be used here
8  --> $DIR/const-param-elided-lifetime.rs:14:15
9   |
10LL | impl<const N: &u8> A<N> {
11   |               ^ explicit lifetime name needed here
12
13error[E0637]: `&` without an explicit lifetime name cannot be used here
14  --> $DIR/const-param-elided-lifetime.rs:17:21
15   |
16LL |     fn foo<const M: &u8>(&self) {}
17   |                     ^ explicit lifetime name needed here
18
19error[E0637]: `&` without an explicit lifetime name cannot be used here
20  --> $DIR/const-param-elided-lifetime.rs:22:15
21   |
22LL | impl<const N: &u8> B for A<N> {}
23   |               ^ explicit lifetime name needed here
24
25error[E0637]: `&` without an explicit lifetime name cannot be used here
26  --> $DIR/const-param-elided-lifetime.rs:26:17
27   |
28LL | fn bar<const N: &u8>() {}
29   |                 ^ explicit lifetime name needed here
30
31error: `&u8` is forbidden as the type of a const generic parameter
32  --> $DIR/const-param-elided-lifetime.rs:9:19
33   |
34LL | struct A<const N: &u8>;
35   |                   ^^^
36   |
37   = note: the only supported types are integers, `bool` and `char`
38   = help: add `#![feature(adt_const_params)]` to the crate attributes to enable more complex and user defined types
39
40error: `&u8` is forbidden as the type of a const generic parameter
41  --> $DIR/const-param-elided-lifetime.rs:14:15
42   |
43LL | impl<const N: &u8> A<N> {
44   |               ^^^
45   |
46   = note: the only supported types are integers, `bool` and `char`
47   = help: add `#![feature(adt_const_params)]` to the crate attributes to enable more complex and user defined types
48
49error: `&u8` is forbidden as the type of a const generic parameter
50  --> $DIR/const-param-elided-lifetime.rs:22:15
51   |
52LL | impl<const N: &u8> B for A<N> {}
53   |               ^^^
54   |
55   = note: the only supported types are integers, `bool` and `char`
56   = help: add `#![feature(adt_const_params)]` to the crate attributes to enable more complex and user defined types
57
58error: `&u8` is forbidden as the type of a const generic parameter
59  --> $DIR/const-param-elided-lifetime.rs:26:17
60   |
61LL | fn bar<const N: &u8>() {}
62   |                 ^^^
63   |
64   = note: the only supported types are integers, `bool` and `char`
65   = help: add `#![feature(adt_const_params)]` to the crate attributes to enable more complex and user defined types
66
67error: `&u8` is forbidden as the type of a const generic parameter
68  --> $DIR/const-param-elided-lifetime.rs:17:21
69   |
70LL |     fn foo<const M: &u8>(&self) {}
71   |                     ^^^
72   |
73   = note: the only supported types are integers, `bool` and `char`
74   = help: add `#![feature(adt_const_params)]` to the crate attributes to enable more complex and user defined types
75
76error: aborting due to 10 previous errors
77
78For more information about this error, try `rustc --explain E0637`.