mirror of
https://git.proxmox.com/git/rustc
synced 2025-05-29 19:48:50 +00:00
18 lines
457 B
Rust
18 lines
457 B
Rust
macro_rules! sink {
|
|
($tt:tt) => {()}
|
|
}
|
|
|
|
fn main() {
|
|
let _ = "Foo"_;
|
|
//~^ 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
|
|
}
|