mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-04 20:54:13 +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() {}
|