]> git.proxmox.com Git - rustc.git/blob - tests/ui/issues/issue-17816.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / issues / issue-17816.rs
1 // run-pass
2 #![allow(unused_variables)]
3 use std::marker::PhantomData;
4
5 fn main() {
6 struct Symbol<'a, F: Fn(Vec<&'a str>) -> &'a str> { function: F, marker: PhantomData<&'a ()> }
7 let f = |x: Vec<&str>| -> &str { "foobar" };
8 let sym = Symbol { function: f, marker: PhantomData };
9 (sym.function)(vec![]);
10 }