diff --git a/src/test/ui/macros/cfg.rs b/src/test/ui/macros/cfg.rs index 222161a8183..2aac50a9d01 100644 --- a/src/test/ui/macros/cfg.rs +++ b/src/test/ui/macros/cfg.rs @@ -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 } diff --git a/src/test/ui/macros/cfg.stderr b/src/test/ui/macros/cfg.stderr index 4785ef9aae4..2633d5f720d 100644 --- a/src/test/ui/macros/cfg.stderr +++ b/src/test/ui/macros/cfg.stderr @@ -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`.