rust/tests/ui/functions-closures/fn-coerce-field.rs

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

14 lines
223 B
Rust
Raw Normal View History

// run-pass
#![allow(dead_code)]
// pretty-expanded FIXME #23616
#![allow(non_camel_case_types)]
2015-01-02 16:32:54 -06:00
struct r<F> where F: FnOnce() {
field: F,
}
pub fn main() {
fn f() {}
2015-01-02 16:32:54 -06:00
let _i: r<fn()> = r {field: f as fn()};
}