diff options
Diffstat (limited to 'tests/ui/single-use-lifetime/issue-107998.rs')
-rw-r--r-- | tests/ui/single-use-lifetime/issue-107998.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/single-use-lifetime/issue-107998.rs b/tests/ui/single-use-lifetime/issue-107998.rs new file mode 100644 index 000000000..f32688d20 --- /dev/null +++ b/tests/ui/single-use-lifetime/issue-107998.rs @@ -0,0 +1,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() {} |