rust/tests/ui/issues/issue-17816.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
320 B
Rust
Raw Normal View History

// run-pass
#![allow(unused_variables)]
use std::marker::PhantomData;
2014-12-07 09:22:06 -06:00
fn main() {
struct Symbol<'a, F: Fn(Vec<&'a str>) -> &'a str> { function: F, marker: PhantomData<&'a ()> }
let f = |x: Vec<&str>| -> &str { "foobar" };
let sym = Symbol { function: f, marker: PhantomData };
2014-12-07 09:22:06 -06:00
(sym.function)(vec![]);
}