2022-11-13 17:43:28 -06:00
|
|
|
#![feature(rustc_attrs)]
|
|
|
|
|
2014-11-18 22:48:38 -06:00
|
|
|
extern
|
2022-09-15 03:12:09 -05:00
|
|
|
"C"suffix //~ ERROR suffixes on string literals are invalid
|
2014-11-18 22:48:38 -06:00
|
|
|
fn foo() {}
|
|
|
|
|
|
|
|
extern
|
2022-09-15 03:12:09 -05:00
|
|
|
"C"suffix //~ ERROR suffixes on string literals are invalid
|
2014-11-18 22:48:38 -06:00
|
|
|
{}
|
|
|
|
|
|
|
|
fn main() {
|
2022-09-15 03:12:09 -05:00
|
|
|
""suffix; //~ ERROR suffixes on string literals are invalid
|
|
|
|
b""suffix; //~ ERROR suffixes on byte string literals are invalid
|
|
|
|
r#""#suffix; //~ ERROR suffixes on string literals are invalid
|
|
|
|
br#""#suffix; //~ ERROR suffixes on byte string literals are invalid
|
|
|
|
'a'suffix; //~ ERROR suffixes on char literals are invalid
|
|
|
|
b'a'suffix; //~ ERROR suffixes on byte literals are invalid
|
2014-11-18 22:48:38 -06:00
|
|
|
|
2015-07-26 19:49:38 -05:00
|
|
|
1234u1024; //~ ERROR invalid width `1024` for integer literal
|
|
|
|
1234i1024; //~ ERROR invalid width `1024` for integer literal
|
|
|
|
1234f1024; //~ ERROR invalid width `1024` for float literal
|
|
|
|
1234.5f1024; //~ ERROR invalid width `1024` for float literal
|
2014-11-19 03:22:54 -06:00
|
|
|
|
2020-11-22 16:29:46 -06:00
|
|
|
1234suffix; //~ ERROR invalid suffix `suffix` for number literal
|
|
|
|
0b101suffix; //~ ERROR invalid suffix `suffix` for number literal
|
2015-07-26 19:49:38 -05:00
|
|
|
1.0suffix; //~ ERROR invalid suffix `suffix` for float literal
|
|
|
|
1.0e10suffix; //~ ERROR invalid suffix `suffix` for float literal
|
2014-11-18 22:48:38 -06:00
|
|
|
}
|
2022-11-13 17:43:28 -06:00
|
|
|
|
|
|
|
#[rustc_dummy = "string"suffix]
|
2023-12-11 16:55:50 -06:00
|
|
|
//~^ ERROR suffixes on string literals are invalid
|
2022-11-13 17:43:28 -06:00
|
|
|
fn f() {}
|
|
|
|
|
|
|
|
#[must_use = "string"suffix]
|
2023-12-11 16:55:50 -06:00
|
|
|
//~^ ERROR suffixes on string literals are invalid
|
|
|
|
//~| ERROR malformed `must_use` attribute input
|
2022-11-13 17:43:28 -06:00
|
|
|
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;
|