mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 10:13:54 +00:00
10 lines
229 B
Rust
10 lines
229 B
Rust
#![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() {}
|