mirror of
https://git.proxmox.com/git/rustc
synced 2025-08-18 05:52:05 +00:00
21 lines
438 B
Rust
21 lines
438 B
Rust
//@ edition: 2021
|
|
|
|
// Reject raw lifetimes with identifier parts that wouldn't be valid raw identifiers.
|
|
|
|
macro_rules! w {
|
|
($tt:tt) => {};
|
|
}
|
|
|
|
w!('r#_);
|
|
//~^ ERROR `_` cannot be a raw lifetime
|
|
w!('r#self);
|
|
//~^ ERROR `self` cannot be a raw lifetime
|
|
w!('r#super);
|
|
//~^ ERROR `super` cannot be a raw lifetime
|
|
w!('r#Self);
|
|
//~^ ERROR `Self` cannot be a raw lifetime
|
|
w!('r#crate);
|
|
//~^ ERROR `crate` cannot be a raw lifetime
|
|
|
|
fn main() {}
|