2022-11-03 01:02:33 +00:00
|
|
|
macro_rules! sink {
|
|
|
|
($tt:tt) => {()}
|
|
|
|
}
|
2018-10-20 21:02:06 +00:00
|
|
|
|
2017-05-14 12:37:50 +00:00
|
|
|
fn main() {
|
2017-05-31 07:43:47 +00:00
|
|
|
let _ = "Foo"_;
|
2022-11-03 01:02:33 +00:00
|
|
|
//~^ ERROR underscore literal suffix is not allowed
|
|
|
|
|
|
|
|
// This is ok, because `__` is a valid identifier and the macro consumes it
|
|
|
|
// before proper parsing happens.
|
|
|
|
let _ = sink!("Foo"__);
|
|
|
|
|
|
|
|
// This is not ok, even as an input to a macro, because the `_` suffix is
|
|
|
|
// never allowed.
|
|
|
|
sink!("Foo"_);
|
|
|
|
//~^ ERROR underscore literal suffix is not allowed
|
2017-05-14 12:37:50 +00:00
|
|
|
}
|