]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-69396-const-no-type-in-macro.stderr
point at private fields in struct literal
[rust.git] / src / test / ui / issues / issue-69396-const-no-type-in-macro.stderr
1 error[E0428]: the name `A` is defined multiple times
2   --> $DIR/issue-69396-const-no-type-in-macro.rs:4:13
3    |
4 LL |               const A = "A".$fn();
5    |               ^^^^^^^^^^^^^^^^^^^^
6    |               |
7    |               `A` redefined here
8    |               previous definition of the value `A` here
9 ...
10 LL | / suite! {
11 LL | |     len;
12 LL | |     is_empty;
13 LL | | }
14    | |_- in this macro invocation
15    |
16    = note: `A` must be defined only once in the value namespace of this module
17    = note: this error originates in the macro `suite` (in Nightly builds, run with -Z macro-backtrace for more info)
18
19 error: missing type for `const` item
20   --> $DIR/issue-69396-const-no-type-in-macro.rs:4:19
21    |
22 LL |               const A = "A".$fn();
23    |                     ^ help: provide a type for the constant: `A: usize`
24 ...
25 LL | / suite! {
26 LL | |     len;
27 LL | |     is_empty;
28 LL | | }
29    | |_- in this macro invocation
30    |
31    = note: this error originates in the macro `suite` (in Nightly builds, run with -Z macro-backtrace for more info)
32
33 error[E0121]: the placeholder `_` is not allowed within types on item signatures for constants
34   --> $DIR/issue-69396-const-no-type-in-macro.rs:4:19
35    |
36 LL |               const A = "A".$fn();
37    |                     ^
38    |                     |
39    |                     not allowed in type signatures
40    |                     help: replace with the correct type: `bool`
41 ...
42 LL | / suite! {
43 LL | |     len;
44 LL | |     is_empty;
45 LL | | }
46    | |_- in this macro invocation
47    |
48    = note: this error originates in the macro `suite` (in Nightly builds, run with -Z macro-backtrace for more info)
49
50 error: aborting due to 3 previous errors
51
52 Some errors have detailed explanations: E0121, E0428.
53 For more information about an error, try `rustc --explain E0121`.