rust/tests/ui/macros/cfg_select.stderr
2026-02-07 02:19:43 +01:00

115 lines
3.3 KiB
Text

error: none of the predicates in this `cfg_select` evaluated to true
--> $DIR/cfg_select.rs:159:1
|
LL | / cfg_select! {
LL | |
LL | | false => {}
LL | | }
| |_^
error: none of the predicates in this `cfg_select` evaluated to true
--> $DIR/cfg_select.rs:164:1
|
LL | cfg_select! {}
| ^^^^^^^^^^^^^^
error: expected a literal (`1u8`, `1.0f32`, `"string"`, etc.) here, found `=>`
--> $DIR/cfg_select.rs:168:5
|
LL | => {}
| ^^
error: expected a literal (`1u8`, `1.0f32`, `"string"`, etc.) here, found expression
--> $DIR/cfg_select.rs:173:5
|
LL | () => {}
| ^^ expressions are not allowed here
error[E0539]: malformed `cfg_select` macro input
--> $DIR/cfg_select.rs:178:5
|
LL | "str" => {}
| ^^^^^ expected a valid identifier here
error[E0539]: malformed `cfg_select` macro input
--> $DIR/cfg_select.rs:183:5
|
LL | a::b => {}
| ^^^^ expected a valid identifier here
error[E0537]: invalid predicate `a`
--> $DIR/cfg_select.rs:188:5
|
LL | a() => {}
| ^^^
error: expected one of `(`, `::`, `=>`, or `=`, found `+`
--> $DIR/cfg_select.rs:193:7
|
LL | a + 1 => {}
| ^ expected one of `(`, `::`, `=>`, or `=`
error: expected one of `(`, `::`, `=>`, or `=`, found `!`
--> $DIR/cfg_select.rs:199:8
|
LL | cfg!() => {}
| ^ expected one of `(`, `::`, `=>`, or `=`
warning: unreachable configuration predicate
--> $DIR/cfg_select.rs:136:5
|
LL | _ => {}
| - always matches
LL | true => {}
| ^^^^ this configuration predicate is never reached
|
note: the lint level is defined here
--> $DIR/cfg_select.rs:3:9
|
LL | #![warn(unreachable_cfg_select_predicates)] // Unused warnings are disabled by default in UI tests.
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: unreachable configuration predicate
--> $DIR/cfg_select.rs:142:5
|
LL | true => {}
| ---- always matches
LL | _ => {}
| ^ this configuration predicate is never reached
warning: unreachable configuration predicate
--> $DIR/cfg_select.rs:149:5
|
LL | _ => {}
| ^ this configuration predicate is never reached
warning: unreachable configuration predicate
--> $DIR/cfg_select.rs:155:5
|
LL | unix => {}
| ^^^^ this configuration predicate is never reached
warning: unexpected `cfg` condition name: `a`
--> $DIR/cfg_select.rs:193:5
|
LL | a + 1 => {}
| ^ help: found config with similar value: `target_feature = "a"`
|
= help: expected names are: `FALSE` and `test` and 31 more
= help: to expect this configuration use `--check-cfg=cfg(a)`
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
warning: unexpected `cfg` condition name: `cfg`
--> $DIR/cfg_select.rs:199:5
|
LL | cfg!() => {}
| ^^^
|
= help: to expect this configuration use `--check-cfg=cfg(cfg)`
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
error: aborting due to 9 previous errors; 6 warnings emitted
Some errors have detailed explanations: E0537, E0539.
For more information about an error, try `rustc --explain E0537`.