1
Fork 0
rust/tests/ui/impl-trait/precise-capturing/bad-lifetimes.rs

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

14 lines
460 B
Rust
Raw Normal View History

2024-04-04 12:54:56 -04:00
#![feature(precise_capturing)]
2024-06-05 16:18:52 -04:00
fn no_elided_lt() -> impl Sized + use<'_> {}
2024-04-04 12:54:56 -04:00
//~^ ERROR missing lifetime specifier
//~| ERROR expected lifetime parameter in `use<...>` precise captures list, found `'_`
2024-06-05 16:18:52 -04:00
fn static_lt() -> impl Sized + use<'static> {}
2024-04-04 12:54:56 -04:00
//~^ ERROR expected lifetime parameter in `use<...>` precise captures list, found `'static`
2024-06-05 16:18:52 -04:00
fn missing_lt() -> impl Sized + use<'missing> {}
2024-04-04 12:54:56 -04:00
//~^ ERROR use of undeclared lifetime name `'missing`
fn main() {}