diff options
Diffstat (limited to 'src/test/ui/parser/bad-lit-suffixes.rs')
-rw-r--r-- | src/test/ui/parser/bad-lit-suffixes.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/test/ui/parser/bad-lit-suffixes.rs b/src/test/ui/parser/bad-lit-suffixes.rs index 9724533c4..8cb9ef7e0 100644 --- a/src/test/ui/parser/bad-lit-suffixes.rs +++ b/src/test/ui/parser/bad-lit-suffixes.rs @@ -1,3 +1,5 @@ +#![feature(rustc_attrs)] + extern "C"suffix //~ ERROR suffixes on string literals are invalid fn foo() {} @@ -24,3 +26,19 @@ fn main() { 1.0suffix; //~ ERROR invalid suffix `suffix` for float literal 1.0e10suffix; //~ ERROR invalid suffix `suffix` for float literal } + +#[rustc_dummy = "string"suffix] +//~^ ERROR unexpected expression: `"string"suffix` +fn f() {} + +#[must_use = "string"suffix] +//~^ ERROR unexpected expression: `"string"suffix` +fn g() {} + +#[link(name = "string"suffix)] +//~^ ERROR suffixes on string literals are invalid +extern "C" {} + +#[rustc_layout_scalar_valid_range_start(0suffix)] +//~^ ERROR invalid suffix `suffix` for number literal +struct S; |