diff options
Diffstat (limited to 'tests/ui/coercion/coerce-block-tail-83783.fixed')
-rw-r--r-- | tests/ui/coercion/coerce-block-tail-83783.fixed | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/ui/coercion/coerce-block-tail-83783.fixed b/tests/ui/coercion/coerce-block-tail-83783.fixed new file mode 100644 index 000000000..0df0a64ac --- /dev/null +++ b/tests/ui/coercion/coerce-block-tail-83783.fixed @@ -0,0 +1,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() { } |