rust/tests/ui/macros/macros-nonfatal-errors.stderr

249 lines
7.1 KiB
Plaintext
Raw Normal View History

error: the `#[default]` attribute may only be used on unit enum variants
2022-02-28 14:33:50 -06:00
--> $DIR/macros-nonfatal-errors.rs:13:5
|
LL | #[default]
| ^^^^^^^^^^
|
= help: consider a manual implementation of `Default`
error: the `#[default]` attribute may only be used on unit enum variants
2022-02-28 14:33:50 -06:00
--> $DIR/macros-nonfatal-errors.rs:18:36
|
LL | struct DefaultInnerAttrTupleStruct(#[default] ());
| ^^^^^^^^^^
|
= help: consider a manual implementation of `Default`
error: the `#[default]` attribute may only be used on unit enum variants
2022-02-28 14:33:50 -06:00
--> $DIR/macros-nonfatal-errors.rs:22:1
|
LL | #[default]
| ^^^^^^^^^^
|
= help: consider a manual implementation of `Default`
error: the `#[default]` attribute may only be used on unit enum variants
2022-02-28 14:33:50 -06:00
--> $DIR/macros-nonfatal-errors.rs:26:1
|
LL | #[default]
| ^^^^^^^^^^
|
= help: consider a manual implementation of `Default`
error: the `#[default]` attribute may only be used on unit enum variants
2022-02-28 14:33:50 -06:00
--> $DIR/macros-nonfatal-errors.rs:36:11
|
LL | Foo = #[default] 0,
| ^^^^^^^^^^
|
= help: consider a manual implementation of `Default`
error: the `#[default]` attribute may only be used on unit enum variants
2022-02-28 14:33:50 -06:00
--> $DIR/macros-nonfatal-errors.rs:37:14
|
LL | Bar([u8; #[default] 1]),
| ^^^^^^^^^^
|
= help: consider a manual implementation of `Default`
error: no default declared
2022-02-28 14:33:50 -06:00
--> $DIR/macros-nonfatal-errors.rs:42:10
2018-08-08 07:28:26 -05:00
|
2019-03-09 06:03:44 -06:00
LL | #[derive(Default)]
2018-08-08 07:28:26 -05:00
| ^^^^^^^
|
= help: make a unit variant default by placing `#[default]` above it
= note: this error originates in the derive macro `Default` (in Nightly builds, run with -Z macro-backtrace for more info)
2018-08-08 07:28:26 -05:00
error: multiple declared defaults
2022-02-28 14:33:50 -06:00
--> $DIR/macros-nonfatal-errors.rs:48:10
|
LL | #[derive(Default)]
| ^^^^^^^
...
LL | Foo,
| --- first default
LL | #[default]
LL | Bar,
| --- additional default
LL | #[default]
LL | Baz,
| --- additional default
|
= note: only one variant can be default
= note: this error originates in the derive macro `Default` (in Nightly builds, run with -Z macro-backtrace for more info)
error: `#[default]` attribute does not accept a value
2022-02-28 14:33:50 -06:00
--> $DIR/macros-nonfatal-errors.rs:60:5
|
LL | #[default = 1]
| ^^^^^^^^^^^^^^
|
= help: try using `#[default]`
error: multiple `#[default]` attributes
2022-02-28 14:33:50 -06:00
--> $DIR/macros-nonfatal-errors.rs:68:5
|
LL | #[default]
| ---------- `#[default]` used here
LL | #[default]
| ---------- `#[default]` used again here
LL | Foo,
| ^^^
|
= note: only one `#[default]` attribute is needed
help: try removing this
2022-02-28 14:33:50 -06:00
--> $DIR/macros-nonfatal-errors.rs:67:5
|
LL | #[default]
| ^^^^^^^^^^
error: multiple `#[default]` attributes
2022-02-28 14:33:50 -06:00
--> $DIR/macros-nonfatal-errors.rs:78:5
|
LL | #[default]
| ---------- `#[default]` used here
LL | #[default]
| ---------- `#[default]` used again here
...
LL | Foo,
| ^^^
|
= note: only one `#[default]` attribute is needed
help: try removing these
2022-02-28 14:33:50 -06:00
--> $DIR/macros-nonfatal-errors.rs:75:5
|
LL | #[default]
| ^^^^^^^^^^
LL | #[default]
| ^^^^^^^^^^
LL | #[default]
| ^^^^^^^^^^
error: the `#[default]` attribute may only be used on unit enum variants
2022-02-28 14:33:50 -06:00
--> $DIR/macros-nonfatal-errors.rs:85:5
|
LL | Foo {},
| ^^^
|
= help: consider a manual implementation of `Default`
error: default variant must be exhaustive
2022-02-28 14:33:50 -06:00
--> $DIR/macros-nonfatal-errors.rs:93:5
|
LL | #[non_exhaustive]
| ----------------- declared `#[non_exhaustive]` here
LL | Foo,
| ^^^
|
= help: consider a manual implementation of `Default`
2021-12-10 18:11:26 -06:00
error: asm template must be a string literal
2022-02-28 14:33:50 -06:00
--> $DIR/macros-nonfatal-errors.rs:98:10
2021-12-10 18:11:26 -06:00
|
LL | asm!(invalid);
| ^^^^^^^
error: `concat_idents!()` requires ident args
2022-02-28 14:33:50 -06:00
--> $DIR/macros-nonfatal-errors.rs:101:5
2018-08-08 07:28:26 -05:00
|
2019-03-09 06:03:44 -06:00
LL | concat_idents!("not", "idents");
2021-10-14 13:28:28 -05:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2018-08-08 07:28:26 -05:00
error: argument must be a string literal
2022-02-28 14:33:50 -06:00
--> $DIR/macros-nonfatal-errors.rs:103:17
2018-08-08 07:28:26 -05:00
|
2019-03-09 06:03:44 -06:00
LL | option_env!(invalid);
2018-08-08 07:28:26 -05:00
| ^^^^^^^
error: expected string literal
2022-02-28 14:33:50 -06:00
--> $DIR/macros-nonfatal-errors.rs:104:10
2018-08-08 07:28:26 -05:00
|
2019-03-09 06:03:44 -06:00
LL | env!(invalid);
2018-08-08 07:28:26 -05:00
| ^^^^^^^
error: `env!()` takes 1 or 2 arguments
--> $DIR/macros-nonfatal-errors.rs:105:5
2018-08-08 07:28:26 -05:00
|
2019-03-09 06:03:44 -06:00
LL | env!(foo, abr, baz);
| ^^^^^^^^^^^^^^^^^^^
2018-08-08 07:28:26 -05:00
error: environment variable `RUST_HOPEFULLY_THIS_DOESNT_EXIST` not defined at compile time
2022-02-28 14:33:50 -06:00
--> $DIR/macros-nonfatal-errors.rs:106:5
2018-08-08 07:28:26 -05:00
|
2019-03-09 06:03:44 -06:00
LL | env!("RUST_HOPEFULLY_THIS_DOESNT_EXIST");
2021-10-14 13:28:28 -05:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2020-05-26 18:45:30 -05:00
|
= help: use `std::env::var("RUST_HOPEFULLY_THIS_DOESNT_EXIST")` to read the variable at run time
= note: this error originates in the macro `env` (in Nightly builds, run with -Z macro-backtrace for more info)
2018-08-08 07:28:26 -05:00
error: format argument must be a string literal
2022-02-28 14:33:50 -06:00
--> $DIR/macros-nonfatal-errors.rs:108:13
2018-08-08 07:28:26 -05:00
|
2019-03-09 06:03:44 -06:00
LL | format!(invalid);
2018-08-08 07:28:26 -05:00
| ^^^^^^^
|
2018-08-08 07:28:26 -05:00
help: you might be missing a string literal to format with
|
2019-03-09 06:03:44 -06:00
LL | format!("{}", invalid);
| +++++
2018-08-08 07:28:26 -05:00
error: argument must be a string literal
2022-02-28 14:33:50 -06:00
--> $DIR/macros-nonfatal-errors.rs:110:14
2018-08-08 07:28:26 -05:00
|
2019-03-09 06:03:44 -06:00
LL | include!(invalid);
2018-08-08 07:28:26 -05:00
| ^^^^^^^
error: argument must be a string literal
2022-02-28 14:33:50 -06:00
--> $DIR/macros-nonfatal-errors.rs:112:18
2018-08-08 07:28:26 -05:00
|
2019-03-09 06:03:44 -06:00
LL | include_str!(invalid);
2018-08-08 07:28:26 -05:00
| ^^^^^^^
error: couldn't read $DIR/i'd be quite surprised if a file with this name existed: $FILE_NOT_FOUND_MSG (os error 2)
2022-02-28 14:33:50 -06:00
--> $DIR/macros-nonfatal-errors.rs:113:5
2018-08-08 07:28:26 -05:00
|
2019-03-09 06:03:44 -06:00
LL | include_str!("i'd be quite surprised if a file with this name existed");
2021-10-14 13:28:28 -05:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in the macro `include_str` (in Nightly builds, run with -Z macro-backtrace for more info)
2018-08-08 07:28:26 -05:00
error: argument must be a string literal
2022-02-28 14:33:50 -06:00
--> $DIR/macros-nonfatal-errors.rs:114:20
2018-08-08 07:28:26 -05:00
|
2019-03-09 06:03:44 -06:00
LL | include_bytes!(invalid);
2018-08-08 07:28:26 -05:00
| ^^^^^^^
error: couldn't read $DIR/i'd be quite surprised if a file with this name existed: $FILE_NOT_FOUND_MSG (os error 2)
2022-02-28 14:33:50 -06:00
--> $DIR/macros-nonfatal-errors.rs:115:5
2018-08-08 07:28:26 -05:00
|
2019-03-09 06:03:44 -06:00
LL | include_bytes!("i'd be quite surprised if a file with this name existed");
2021-10-14 13:28:28 -05:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in the macro `include_bytes` (in Nightly builds, run with -Z macro-backtrace for more info)
2018-08-08 07:28:26 -05:00
error: trace_macros! accepts only `true` or `false`
2022-02-28 14:33:50 -06:00
--> $DIR/macros-nonfatal-errors.rs:117:5
2018-08-08 07:28:26 -05:00
|
2019-03-09 06:03:44 -06:00
LL | trace_macros!(invalid);
2021-10-14 13:28:28 -05:00
| ^^^^^^^^^^^^^^^^^^^^^^
2018-08-08 07:28:26 -05:00
error: default variant must be exhaustive
--> $DIR/macros-nonfatal-errors.rs:127:9
|
LL | #[non_exhaustive]
| ----------------- declared `#[non_exhaustive]` here
LL | Foo,
| ^^^
|
= help: consider a manual implementation of `Default`
error: cannot find macro `llvm_asm` in this scope
2022-02-28 14:33:50 -06:00
--> $DIR/macros-nonfatal-errors.rs:99:5
|
LL | llvm_asm!(invalid);
| ^^^^^^^^
error: aborting due to 28 previous errors
2018-08-08 07:28:26 -05:00