rust/tests/ui/single-use-lifetime/issue-107998.rs

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

10 lines
229 B
Rust
Raw Normal View History

#![deny(single_use_lifetimes)]
fn with<R>(f: &fn<'a>(x: &'a i32) -> R) -> R {
//~^ ERROR function pointer types may not have generic parameters
//~| ERROR lifetime parameter `'a` only used once
f(&3)
}
fn main() {}