mirror of
https://github.com/rust-lang/rust.git
synced 2025-09-28 05:34:45 +00:00

When operating on expressions, `cfg_select!` can now handle expressions without braces. (It still requires braces for other things, such as items.) Expand the test coverage and documentation accordingly.
26 lines
556 B
Plaintext
26 lines
556 B
Plaintext
warning: unreachable predicate
|
|
--> $DIR/cfg_select.rs:52:5
|
|
|
|
|
LL | _ => {}
|
|
| - always matches
|
|
LL | true => {}
|
|
| ^^^^ this predicate is never reached
|
|
|
|
error: none of the predicates in this `cfg_select` evaluated to true
|
|
--> $DIR/cfg_select.rs:56:1
|
|
|
|
|
LL | / cfg_select! {
|
|
LL | |
|
|
LL | | false => {}
|
|
LL | | }
|
|
| |_^
|
|
|
|
error: none of the predicates in this `cfg_select` evaluated to true
|
|
--> $DIR/cfg_select.rs:61:1
|
|
|
|
|
LL | cfg_select! {}
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
error: aborting due to 2 previous errors; 1 warning emitted
|
|
|