mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
11 lines
192 B
Rust
11 lines
192 B
Rust
//@ check-pass
|
|
|
|
// Check that we use subtyping when reifying a closure into a function pointer.
|
|
|
|
fn foo(x: &str) {}
|
|
|
|
fn main() {
|
|
let c = |_: &str| {};
|
|
let x = c as fn(&'static str);
|
|
}
|