2022-11-02 20:02:33 -05:00
|
|
|
macro_rules! sink {
|
|
|
|
($tt:tt) => {()}
|
|
|
|
}
|
2018-10-20 16:02:06 -05:00
|
|
|
|
2017-05-14 07:37:50 -05:00
|
|
|
fn main() {
|
2017-05-31 02:43:47 -05:00
|
|
|
let _ = "Foo"_;
|
2022-11-02 20:02:33 -05: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 07:37:50 -05:00
|
|
|
}
|