rust/tests/ui/unsafe-binders/lifetime-resolution.rs

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

17 lines
375 B
Rust
Raw Normal View History

2024-12-10 19:42:09 +00:00
#![feature(unsafe_binders)]
//~^ WARN the feature `unsafe_binders` is incomplete
fn foo<'a>() {
let good: unsafe<'b> &'a &'b ();
let missing: unsafe<> &'missing ();
//~^ ERROR use of undeclared lifetime name `'missing`
2024-12-10 19:42:09 +00:00
fn inner<'b>() {
let outer: unsafe<> &'a &'b ();
//~^ can't use generic parameters from outer item
2024-12-10 19:42:09 +00:00
}
}
fn main() {}