summaryrefslogtreecommitdiffstats
path: root/src/test/ui/str/str-concat-on-double-ref.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/str/str-concat-on-double-ref.rs')
-rw-r--r--src/test/ui/str/str-concat-on-double-ref.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/ui/str/str-concat-on-double-ref.rs b/src/test/ui/str/str-concat-on-double-ref.rs
new file mode 100644
index 000000000..e68210d53
--- /dev/null
+++ b/src/test/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);
+}