mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
Add UI test for cfg!(foo, bar)
This commit is contained in:
parent
761c846a07
commit
d6072e53cd
@ -2,4 +2,5 @@ fn main() {
|
||||
cfg!(); //~ ERROR macro requires a cfg-pattern
|
||||
cfg!(123); //~ ERROR expected identifier
|
||||
cfg!(foo = 123); //~ ERROR literal in `cfg` predicate value must be a string
|
||||
cfg!(foo, bar); //~ ERROR expected 1 cfg-pattern
|
||||
}
|
||||
|
@ -18,6 +18,14 @@ error[E0565]: literal in `cfg` predicate value must be a string
|
||||
LL | cfg!(foo = 123);
|
||||
| ^^^
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
error: expected 1 cfg-pattern
|
||||
--> $DIR/cfg.rs:5:5
|
||||
|
|
||||
LL | cfg!(foo, bar);
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: this error originates in the macro `cfg` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0565`.
|
||||
|
Loading…
Reference in New Issue
Block a user