]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/span/issue-39018.rs
2 let x
= "Hello " + "World!";
5 // Make sure that the span outputs a warning
6 // for not having an implementation for std::ops::Add
7 // that won't output for the above string concatenation
8 let y
= World
::Hello
+ World
::Goodbye
;
11 let x
= "Hello " + "World!".to_owned();
21 let a
= String
::new();
22 let b
= String
::new();
26 let _
= &a
+ &b
; //~ ERROR cannot add
27 let _
= &a
+ b
; //~ ERROR cannot add
29 let _
= a
+ b
; //~ ERROR mismatched types
30 let _
= e
+ b
; //~ ERROR cannot add
31 let _
= e
+ &b
; //~ ERROR cannot add
32 let _
= e
+ d
; //~ ERROR cannot add
33 let _
= e
+ &d
; //~ ERROR cannot add
34 let _
= &c
+ &d
; //~ ERROR cannot add
35 let _
= &c
+ d
; //~ ERROR cannot add
36 let _
= c
+ &d
; //~ ERROR cannot add
37 let _
= c
+ d
; //~ ERROR cannot add