diff options
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.rs | 7 |
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); +} |