rust/tests/ui/parser/cfg-keyword-lifetime.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
301 B
Rust
Raw Permalink Normal View History

2024-06-20 15:36:35 -05:00
// Disallow `'keyword` even in cfg'd code.
#[cfg(any())]
fn hello() -> &'ref () {}
//~^ ERROR lifetimes cannot use keyword names
macro_rules! macro_invocation {
($i:item) => {}
}
macro_invocation! {
fn hello() -> &'ref () {}
//~^ ERROR lifetimes cannot use keyword names
}
fn main() {}