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

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() {}