diff options
Diffstat (limited to 'tests/ui/coercion/coerce-block-tail-26978.rs')
-rw-r--r-- | tests/ui/coercion/coerce-block-tail-26978.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/coercion/coerce-block-tail-26978.rs b/tests/ui/coercion/coerce-block-tail-26978.rs new file mode 100644 index 000000000..01c8ab5a8 --- /dev/null +++ b/tests/ui/coercion/coerce-block-tail-26978.rs @@ -0,0 +1,11 @@ +// check-fail +fn f(_: &i32) {} + +fn main() { + let x = Box::new(1i32); + + f(&x); + f(&(x)); + f(&{x}); + //~^ ERROR mismatched types +} |