11 lines
213 B
Rust
11 lines
213 B
Rust
//@ 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
|
|
}
|