]> git.lizzy.rs Git - rust.git/blob - src/test/ui/coercion/coerce-block-tail-83783.rs
Rollup merge of #103660 - ozkanonur:master, r=jyn514
[rust.git] / src / test / ui / coercion / coerce-block-tail-83783.rs
1 // check-fail
2 // edition:2018
3 fn _consume_reference<T: ?Sized>(_: &T) {}
4
5 async fn _foo() {
6     _consume_reference::<i32>(&Box::new(7_i32));
7     _consume_reference::<i32>(&async { Box::new(7_i32) }.await);
8     //~^ ERROR mismatched types
9     _consume_reference::<[i32]>(&vec![7_i32]);
10     _consume_reference::<[i32]>(&async { vec![7_i32] }.await);
11 }
12
13 fn main() { }