fork/rust

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

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

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