mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-21 17:52:12 +03:00
Accept trailing comma in cfg_attr
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
// compile-flags: --cfg TRUE
|
||||
|
||||
#[cfg_attr(TRUE, inline,)] // OK
|
||||
fn f() {}
|
||||
|
||||
#[cfg_attr(FALSE, inline,)] // OK
|
||||
fn g() {}
|
||||
|
||||
#[cfg_attr(TRUE, inline,,)] //~ ERROR expected `)`, found `,`
|
||||
fn h() {}
|
||||
|
||||
#[cfg_attr(FALSE, inline,,)] //~ ERROR expected `)`, found `,`
|
||||
fn i() {}
|
||||
@@ -0,0 +1,14 @@
|
||||
error: expected `)`, found `,`
|
||||
--> $DIR/cfg-attr-trailing-comma.rs:9:25
|
||||
|
|
||||
LL | #[cfg_attr(TRUE, inline,,)] //~ ERROR expected `)`, found `,`
|
||||
| ^ expected `)`
|
||||
|
||||
error: expected `)`, found `,`
|
||||
--> $DIR/cfg-attr-trailing-comma.rs:12:26
|
||||
|
|
||||
LL | #[cfg_attr(FALSE, inline,,)] //~ ERROR expected `)`, found `,`
|
||||
| ^ expected `)`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
Reference in New Issue
Block a user