mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
12 lines
241 B
Rust
12 lines
241 B
Rust
#![feature(async_closure)]
|
|
|
|
//@ edition:2021
|
|
//@ run-rustfix
|
|
|
|
fn foo<T>(_: Box<T>) {}
|
|
fn bar<T>(_: impl Fn() -> Box<T>) {}
|
|
|
|
fn main() {
|
|
foo(Box::new(())); //~ ERROR mismatched types
|
|
bar(|| Box::new(())); //~ ERROR mismatched types
|
|
}
|