summaryrefslogtreecommitdiffstats
path: root/tests/ui/functions-closures/fn-coerce-field.rs
blob: 38bde7b9e8fbc0a2f615b4574695e63d8776b642 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// run-pass
#![allow(dead_code)]
// pretty-expanded FIXME #23616
#![allow(non_camel_case_types)]

struct r<F> where F: FnOnce() {
    field: F,
}

pub fn main() {
    fn f() {}
    let _i: r<fn()> = r {field: f as fn()};
}