]> git.proxmox.com Git - rustc.git/blame - src/test/ui/macros/macros-nonfatal-errors.stderr
New upstream version 1.62.1+dfsg1
[rustc.git] / src / test / ui / macros / macros-nonfatal-errors.stderr
CommitLineData
94222f64 1error: the `#[default]` attribute may only be used on unit enum variants
04454e1e 2 --> $DIR/macros-nonfatal-errors.rs:13:5
94222f64
XL
3 |
4LL | #[default]
5 | ^^^^^^^^^^
6
7error: the `#[default]` attribute may only be used on unit enum variants
04454e1e 8 --> $DIR/macros-nonfatal-errors.rs:18:36
94222f64
XL
9 |
10LL | struct DefaultInnerAttrTupleStruct(#[default] ());
11 | ^^^^^^^^^^
12
13error: the `#[default]` attribute may only be used on unit enum variants
04454e1e 14 --> $DIR/macros-nonfatal-errors.rs:22:1
94222f64
XL
15 |
16LL | #[default]
17 | ^^^^^^^^^^
18
19error: the `#[default]` attribute may only be used on unit enum variants
04454e1e 20 --> $DIR/macros-nonfatal-errors.rs:26:1
94222f64
XL
21 |
22LL | #[default]
23 | ^^^^^^^^^^
24
25error: the `#[default]` attribute may only be used on unit enum variants
04454e1e 26 --> $DIR/macros-nonfatal-errors.rs:36:11
94222f64
XL
27 |
28LL | Foo = #[default] 0,
29 | ^^^^^^^^^^
30
31error: the `#[default]` attribute may only be used on unit enum variants
04454e1e 32 --> $DIR/macros-nonfatal-errors.rs:37:14
94222f64
XL
33 |
34LL | Bar([u8; #[default] 1]),
35 | ^^^^^^^^^^
36
37error: no default declared
04454e1e 38 --> $DIR/macros-nonfatal-errors.rs:42:10
b7449926 39 |
532ac7d7 40LL | #[derive(Default)]
b7449926 41 | ^^^^^^^
74b04a01 42 |
94222f64
XL
43 = help: make a unit variant default by placing `#[default]` above it
44 = note: this error originates in the derive macro `Default` (in Nightly builds, run with -Z macro-backtrace for more info)
45
46error: multiple declared defaults
04454e1e 47 --> $DIR/macros-nonfatal-errors.rs:48:10
94222f64
XL
48 |
49LL | #[derive(Default)]
50 | ^^^^^^^
51...
52LL | Foo,
53 | --- first default
54LL | #[default]
55LL | Bar,
56 | --- additional default
57LL | #[default]
58LL | Baz,
59 | --- additional default
60 |
61 = note: only one variant can be default
17df50a5 62 = note: this error originates in the derive macro `Default` (in Nightly builds, run with -Z macro-backtrace for more info)
b7449926 63
94222f64 64error: `#[default]` attribute does not accept a value
04454e1e 65 --> $DIR/macros-nonfatal-errors.rs:60:5
94222f64
XL
66 |
67LL | #[default = 1]
68 | ^^^^^^^^^^^^^^
69 |
70 = help: try using `#[default]`
71
72error: multiple `#[default]` attributes
04454e1e 73 --> $DIR/macros-nonfatal-errors.rs:68:5
94222f64
XL
74 |
75LL | #[default]
76 | ---------- `#[default]` used here
77LL | #[default]
78 | ---------- `#[default]` used again here
79LL | Foo,
80 | ^^^
81 |
82 = note: only one `#[default]` attribute is needed
83help: try removing this
04454e1e 84 --> $DIR/macros-nonfatal-errors.rs:67:5
94222f64
XL
85 |
86LL | #[default]
87 | ^^^^^^^^^^
88
89error: multiple `#[default]` attributes
04454e1e 90 --> $DIR/macros-nonfatal-errors.rs:78:5
94222f64
XL
91 |
92LL | #[default]
93 | ---------- `#[default]` used here
94LL | #[default]
95 | ---------- `#[default]` used again here
96...
97LL | Foo,
98 | ^^^
99 |
100 = note: only one `#[default]` attribute is needed
101help: try removing these
04454e1e 102 --> $DIR/macros-nonfatal-errors.rs:75:5
94222f64
XL
103 |
104LL | #[default]
105 | ^^^^^^^^^^
106LL | #[default]
107 | ^^^^^^^^^^
108LL | #[default]
109 | ^^^^^^^^^^
110
111error: the `#[default]` attribute may only be used on unit enum variants
04454e1e 112 --> $DIR/macros-nonfatal-errors.rs:85:5
94222f64
XL
113 |
114LL | Foo {},
115 | ^^^
116 |
117 = help: consider a manual implementation of `Default`
118
119error: default variant must be exhaustive
04454e1e 120 --> $DIR/macros-nonfatal-errors.rs:93:5
94222f64
XL
121 |
122LL | #[non_exhaustive]
123 | ----------------- declared `#[non_exhaustive]` here
124LL | Foo,
125 | ^^^
126 |
127 = help: consider a manual implementation of `Default`
128
f9f354fc 129error: asm template must be a string literal
04454e1e 130 --> $DIR/macros-nonfatal-errors.rs:98:10
f9f354fc
XL
131 |
132LL | asm!(invalid);
133 | ^^^^^^^
134
c295e0f8 135error: concat_idents! requires ident args
04454e1e 136 --> $DIR/macros-nonfatal-errors.rs:101:5
b7449926 137 |
532ac7d7 138LL | concat_idents!("not", "idents");
c295e0f8 139 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
b7449926
XL
140
141error: argument must be a string literal
04454e1e 142 --> $DIR/macros-nonfatal-errors.rs:103:17
b7449926 143 |
532ac7d7 144LL | option_env!(invalid);
b7449926
XL
145 | ^^^^^^^
146
147error: expected string literal
04454e1e 148 --> $DIR/macros-nonfatal-errors.rs:104:10
b7449926 149 |
532ac7d7 150LL | env!(invalid);
b7449926
XL
151 | ^^^^^^^
152
153error: expected string literal
04454e1e 154 --> $DIR/macros-nonfatal-errors.rs:105:10
b7449926 155 |
532ac7d7 156LL | env!(foo, abr, baz);
b7449926
XL
157 | ^^^
158
159error: environment variable `RUST_HOPEFULLY_THIS_DOESNT_EXIST` not defined
04454e1e 160 --> $DIR/macros-nonfatal-errors.rs:106:5
b7449926 161 |
532ac7d7 162LL | env!("RUST_HOPEFULLY_THIS_DOESNT_EXIST");
c295e0f8 163 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
f9f354fc 164 |
17df50a5 165 = note: this error originates in the macro `env` (in Nightly builds, run with -Z macro-backtrace for more info)
b7449926
XL
166
167error: format argument must be a string literal
04454e1e 168 --> $DIR/macros-nonfatal-errors.rs:108:13
b7449926 169 |
532ac7d7 170LL | format!(invalid);
b7449926 171 | ^^^^^^^
e74abb32 172 |
b7449926
XL
173help: you might be missing a string literal to format with
174 |
532ac7d7 175LL | format!("{}", invalid);
94222f64 176 | +++++
b7449926
XL
177
178error: argument must be a string literal
04454e1e 179 --> $DIR/macros-nonfatal-errors.rs:110:14
b7449926 180 |
532ac7d7 181LL | include!(invalid);
b7449926
XL
182 | ^^^^^^^
183
184error: argument must be a string literal
04454e1e 185 --> $DIR/macros-nonfatal-errors.rs:112:18
b7449926 186 |
532ac7d7 187LL | include_str!(invalid);
b7449926
XL
188 | ^^^^^^^
189
0bf4aa26 190error: couldn't read $DIR/i'd be quite surprised if a file with this name existed: $FILE_NOT_FOUND_MSG (os error 2)
04454e1e 191 --> $DIR/macros-nonfatal-errors.rs:113:5
b7449926 192 |
532ac7d7 193LL | include_str!("i'd be quite surprised if a file with this name existed");
c295e0f8 194 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
74b04a01 195 |
17df50a5 196 = note: this error originates in the macro `include_str` (in Nightly builds, run with -Z macro-backtrace for more info)
b7449926
XL
197
198error: argument must be a string literal
04454e1e 199 --> $DIR/macros-nonfatal-errors.rs:114:20
b7449926 200 |
532ac7d7 201LL | include_bytes!(invalid);
b7449926
XL
202 | ^^^^^^^
203
0bf4aa26 204error: couldn't read $DIR/i'd be quite surprised if a file with this name existed: $FILE_NOT_FOUND_MSG (os error 2)
04454e1e 205 --> $DIR/macros-nonfatal-errors.rs:115:5
b7449926 206 |
532ac7d7 207LL | include_bytes!("i'd be quite surprised if a file with this name existed");
c295e0f8 208 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
74b04a01 209 |
17df50a5 210 = note: this error originates in the macro `include_bytes` (in Nightly builds, run with -Z macro-backtrace for more info)
b7449926
XL
211
212error: trace_macros! accepts only `true` or `false`
04454e1e 213 --> $DIR/macros-nonfatal-errors.rs:117:5
b7449926 214 |
532ac7d7 215LL | trace_macros!(invalid);
c295e0f8 216 | ^^^^^^^^^^^^^^^^^^^^^^
b7449926 217
5099ac24 218error: cannot find macro `llvm_asm` in this scope
04454e1e 219 --> $DIR/macros-nonfatal-errors.rs:99:5
5099ac24
FG
220 |
221LL | llvm_asm!(invalid);
222 | ^^^^^^^^
223
94222f64 224error: aborting due to 27 previous errors
b7449926 225