summaryrefslogtreecommitdiffstats
path: root/src/test/ui/block-result/issue-13428.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/block-result/issue-13428.rs')
-rw-r--r--src/test/ui/block-result/issue-13428.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/ui/block-result/issue-13428.rs b/src/test/ui/block-result/issue-13428.rs
new file mode 100644
index 000000000..ac8596435
--- /dev/null
+++ b/src/test/ui/block-result/issue-13428.rs
@@ -0,0 +1,16 @@
+// Regression test for #13428
+
+fn foo() -> String { //~ ERROR mismatched types
+ format!("Hello {}",
+ "world")
+ // Put the trailing semicolon on its own line to test that the
+ // note message gets the offending semicolon exactly
+ ;
+}
+
+fn bar() -> String { //~ ERROR mismatched types
+ "foobar".to_string()
+ ;
+}
+
+pub fn main() {}