fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
239 B12 linesraw
1#![feature(async_closure)]
2
3// edition:2021
4// run-rustfix
5
6fn foo<T>(_: Box<T>) {}
7fn bar<T>(_: impl Fn() -> Box<T>) {}
8
9fn main() {
10    foo(Box::new(())); //~ ERROR mismatched types
11    bar(|| Box::new(())); //~ ERROR mismatched types
12}