about summary refs log tree commit diff
path: root/tests/ui/str/str-concat-on-double-ref.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/str/str-concat-on-double-ref.rs')
-rw-r--r--tests/ui/str/str-concat-on-double-ref.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/ui/str/str-concat-on-double-ref.rs b/tests/ui/str/str-concat-on-double-ref.rs
new file mode 100644
index 00000000000..e68210d53b7
--- /dev/null
+++ b/tests/ui/str/str-concat-on-double-ref.rs
@@ -0,0 +1,7 @@
+fn main() {
+    let a: &String = &"1".to_owned();
+    let b: &str = &"2";
+    let c = a + b;
+    //~^ ERROR cannot add `&str` to `&String`
+    println!("{:?}", c);
+}