Skip to content

Commit 61ad5a7

Browse files
committed
add broken test for multiple cfg arguments
1 parent 77e5234 commit 61ad5a7

2 files changed

Lines changed: 19 additions & 0 deletions

File tree

tests/ui/cfg/suggest-any-or-all.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#[cfg(foo, bar)]
2+
//~^ ERROR malformed `cfg` attribute input
3+
fn f() {}
4+
5+
fn main() {}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
error[E0805]: malformed `cfg` attribute input
2+
--> $DIR/suggest-any-or-all.rs:1:1
3+
|
4+
LL | #[cfg(foo, bar)]
5+
| ^^^^^----------^
6+
| | |
7+
| | expected a single argument here
8+
| help: must be of the form: `#[cfg(predicate)]`
9+
|
10+
= note: for more information, visit <https://doc.rust-lang.org/reference/conditional-compilation.html#the-cfg-attribute>
11+
12+
error: aborting due to 1 previous error
13+
14+
For more information about this error, try `rustc --explain E0805`.

0 commit comments

Comments
 (0)