summaryrefslogtreecommitdiffstats
path: root/tests/ui/coercion/coerce-block-tail-83783.rs
blob: ee6036b4d673bb123d00ca56e19d49f905959005 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// run-rustfix
// edition:2018
fn _consume_reference<T: ?Sized>(_: &T) {}

async fn _foo() {
    _consume_reference::<i32>(&Box::new(7_i32));
    _consume_reference::<i32>(&async { Box::new(7_i32) }.await);
    //~^ ERROR mismatched types
    _consume_reference::<[i32]>(&vec![7_i32]);
    _consume_reference::<[i32]>(&async { vec![7_i32] }.await);
}

fn main() { }