mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 07:44:10 +00:00
13 lines
221 B
Rust
13 lines
221 B
Rust
#![feature(async_closure)]
|
|
|
|
//@ edition:2021
|
|
//@ run-rustfix
|
|
|
|
fn foo<T>(_: Box<T>) {}
|
|
fn bar<T>(_: impl Fn() -> Box<T>) {}
|
|
|
|
fn main() {
|
|
foo({}); //~ ERROR mismatched types
|
|
bar(|| {}); //~ ERROR mismatched types
|
|
}
|