]> git.proxmox.com Git - rustc.git/blob - src/test/ui/const-generics/diagnostics.stderr
New upstream version 1.52.0~beta.3+dfsg1
[rustc.git] / src / test / ui / const-generics / diagnostics.stderr
1 error[E0412]: cannot find type `N` in this scope
2 --> $DIR/diagnostics.rs:7:16
3 |
4 LL | struct A<const N: u8>;
5 | ---------------------- similarly named struct `A` defined here
6 LL | trait Foo {}
7 LL | impl Foo for A<N> {}
8 | ^ help: a struct with a similar name exists: `A`
9
10 error[E0412]: cannot find type `T` in this scope
11 --> $DIR/diagnostics.rs:16:32
12 |
13 LL | struct A<const N: u8>;
14 | ---------------------- similarly named struct `A` defined here
15 ...
16 LL | impl<const N: u8> Foo for C<N, T> {}
17 | ^ help: a struct with a similar name exists: `A`
18
19 error[E0747]: unresolved item provided when a constant was expected
20 --> $DIR/diagnostics.rs:7:16
21 |
22 LL | impl Foo for A<N> {}
23 | ^
24 |
25 help: if this generic argument was intended as a const parameter, surround it with braces
26 |
27 LL | impl Foo for A<{ N }> {}
28 | ^ ^
29
30 error[E0747]: type provided when a constant was expected
31 --> $DIR/diagnostics.rs:12:19
32 |
33 LL | impl<N> Foo for B<N> {}
34 | - ^
35 | |
36 | help: consider changing this type paramater to a `const`-generic: `const N: u8`
37
38 error[E0747]: unresolved item provided when a constant was expected
39 --> $DIR/diagnostics.rs:16:32
40 |
41 LL | impl<const N: u8> Foo for C<N, T> {}
42 | ^
43 |
44 help: if this generic argument was intended as a const parameter, surround it with braces
45 |
46 LL | impl<const N: u8> Foo for C<N, { T }> {}
47 | ^ ^
48
49 error: aborting due to 5 previous errors
50
51 Some errors have detailed explanations: E0412, E0747.
52 For more information about an error, try `rustc --explain E0412`.