summaryrefslogtreecommitdiffstats
path: root/tests/ui/single-use-lifetime/issue-107998.rs
blob: f32688d205813b454f68648b0d5ef87694c8f62a (plain)
1
2
3
4
5
6
7
8
9
#![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() {}