diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/coercion/coerce-block-tail.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/ui/coercion/coerce-block-tail.rs b/src/test/ui/coercion/coerce-block-tail.rs new file mode 100644 index 000000000..dcbcd3762 --- /dev/null +++ b/src/test/ui/coercion/coerce-block-tail.rs @@ -0,0 +1,6 @@ +// check-fail +fn main() { + let _: &str = & { String::from("hahah")}; + let _: &i32 = & { Box::new(1i32) }; + //~^ ERROR mismatched types +} |