diff options
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/ui/issues/issue-47377.stderr | 11 | ||||
| -rw-r--r-- | src/test/ui/issues/issue-47380.stderr | 11 | ||||
| -rw-r--r-- | src/test/ui/span/issue-39018.stderr | 72 | ||||
| -rw-r--r-- | src/test/ui/str/str-concat-on-double-ref.stderr | 11 | ||||
| -rw-r--r-- | src/test/ui/terminal-width/non-1-width-unicode-multiline-label.stderr | 15 |
5 files changed, 77 insertions, 43 deletions
diff --git a/src/test/ui/issues/issue-47377.stderr b/src/test/ui/issues/issue-47377.stderr index e4b907070a6..4f0fd948e76 100644 --- a/src/test/ui/issues/issue-47377.stderr +++ b/src/test/ui/issues/issue-47377.stderr @@ -2,13 +2,16 @@ error[E0369]: cannot add `&str` to `&str` --> $DIR/issue-47377.rs:4:14 | LL | let _a = b + ", World!"; - | --^ ---------- &str - | ||| - | ||`+` cannot be used to concatenate two `&str` strings - | |help: create an owned `String` from a string reference: `.to_owned()` + | - ^ ---------- &str + | | | + | | `+` cannot be used to concatenate two `&str` strings | &str | = note: string concatenation requires an owned `String` on the left +help: create an owned `String` from a string reference + | +LL | let _a = b.to_owned() + ", World!"; + | +++++++++++ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-47380.stderr b/src/test/ui/issues/issue-47380.stderr index 7ad369fcd0e..b04ac5536c4 100644 --- a/src/test/ui/issues/issue-47380.stderr +++ b/src/test/ui/issues/issue-47380.stderr @@ -2,13 +2,16 @@ error[E0369]: cannot add `&str` to `&str` --> $DIR/issue-47380.rs:3:35 | LL | println!("🦀🦀🦀🦀🦀"); let _a = b + ", World!"; - | --^ ---------- &str - | ||| - | ||`+` cannot be used to concatenate two `&str` strings - | |help: create an owned `String` from a string reference: `.to_owned()` + | - ^ ---------- &str + | | | + | | `+` cannot be used to concatenate two `&str` strings | &str | = note: string concatenation requires an owned `String` on the left +help: create an owned `String` from a string reference + | +LL | println!("🦀🦀🦀🦀🦀"); let _a = b.to_owned() + ", World!"; + | +++++++++++ error: aborting due to previous error diff --git a/src/test/ui/span/issue-39018.stderr b/src/test/ui/span/issue-39018.stderr index 9cfb015e753..e2e7ce1ed18 100644 --- a/src/test/ui/span/issue-39018.stderr +++ b/src/test/ui/span/issue-39018.stderr @@ -2,13 +2,16 @@ error[E0369]: cannot add `&str` to `&str` --> $DIR/issue-39018.rs:2:22 | LL | let x = "Hello " + "World!"; - | ---------^ -------- &str - | | || - | | |`+` cannot be used to concatenate two `&str` strings - | | help: create an owned `String` from a string reference: `.to_owned()` + | -------- ^ -------- &str + | | | + | | `+` cannot be used to concatenate two `&str` strings | &str | = note: string concatenation requires an owned `String` on the left +help: create an owned `String` from a string reference + | +LL | let x = "Hello ".to_owned() + "World!"; + | +++++++++++ error[E0369]: cannot add `World` to `World` --> $DIR/issue-39018.rs:8:26 @@ -57,9 +60,13 @@ LL | let _ = &a + &b; | | | | | `+` cannot be used to concatenate two `&str` strings | &String - | help: remove the borrow to obtain an owned `String` | = note: string concatenation requires an owned `String` on the left +help: remove the borrow to obtain an owned `String` + | +LL - let _ = &a + &b; +LL + let _ = a + &b; + | error[E0369]: cannot add `String` to `&String` --> $DIR/issue-39018.rs:27:16 @@ -103,37 +110,46 @@ error[E0369]: cannot add `&String` to `&String` --> $DIR/issue-39018.rs:31:15 | LL | let _ = e + &b; - | --^ -- &String - | ||| - | ||`+` cannot be used to concatenate two `&str` strings - | |help: create an owned `String` from a string reference: `.to_owned()` + | - ^ -- &String + | | | + | | `+` cannot be used to concatenate two `&str` strings | &String | = note: string concatenation requires an owned `String` on the left +help: create an owned `String` from a string reference + | +LL | let _ = e.to_owned() + &b; + | +++++++++++ error[E0369]: cannot add `&str` to `&String` --> $DIR/issue-39018.rs:32:15 | LL | let _ = e + d; - | --^ - &str - | ||| - | ||`+` cannot be used to concatenate two `&str` strings - | |help: create an owned `String` from a string reference: `.to_owned()` + | - ^ - &str + | | | + | | `+` cannot be used to concatenate two `&str` strings | &String | = note: string concatenation requires an owned `String` on the left +help: create an owned `String` from a string reference + | +LL | let _ = e.to_owned() + d; + | +++++++++++ error[E0369]: cannot add `&&str` to `&String` --> $DIR/issue-39018.rs:33:15 | LL | let _ = e + &d; - | --^ -- &&str - | ||| - | ||`+` cannot be used to concatenate two `&str` strings - | |help: create an owned `String` from a string reference: `.to_owned()` + | - ^ -- &&str + | | | + | | `+` cannot be used to concatenate two `&str` strings | &String | = note: string concatenation requires an owned `String` on the left +help: create an owned `String` from a string reference + | +LL | let _ = e.to_owned() + &d; + | +++++++++++ error[E0369]: cannot add `&&str` to `&&str` --> $DIR/issue-39018.rs:34:16 @@ -155,25 +171,31 @@ error[E0369]: cannot add `&&str` to `&str` --> $DIR/issue-39018.rs:36:15 | LL | let _ = c + &d; - | --^ -- &&str - | ||| - | ||`+` cannot be used to concatenate two `&str` strings - | |help: create an owned `String` from a string reference: `.to_owned()` + | - ^ -- &&str + | | | + | | `+` cannot be used to concatenate two `&str` strings | &str | = note: string concatenation requires an owned `String` on the left +help: create an owned `String` from a string reference + | +LL | let _ = c.to_owned() + &d; + | +++++++++++ error[E0369]: cannot add `&str` to `&str` --> $DIR/issue-39018.rs:37:15 | LL | let _ = c + d; - | --^ - &str - | ||| - | ||`+` cannot be used to concatenate two `&str` strings - | |help: create an owned `String` from a string reference: `.to_owned()` + | - ^ - &str + | | | + | | `+` cannot be used to concatenate two `&str` strings | &str | = note: string concatenation requires an owned `String` on the left +help: create an owned `String` from a string reference + | +LL | let _ = c.to_owned() + d; + | +++++++++++ error: aborting due to 14 previous errors diff --git a/src/test/ui/str/str-concat-on-double-ref.stderr b/src/test/ui/str/str-concat-on-double-ref.stderr index 251bc7ac0ea..bd354679f78 100644 --- a/src/test/ui/str/str-concat-on-double-ref.stderr +++ b/src/test/ui/str/str-concat-on-double-ref.stderr @@ -2,13 +2,16 @@ error[E0369]: cannot add `&str` to `&String` --> $DIR/str-concat-on-double-ref.rs:4:15 | LL | let c = a + b; - | --^ - &str - | ||| - | ||`+` cannot be used to concatenate two `&str` strings - | |help: create an owned `String` from a string reference: `.to_owned()` + | - ^ - &str + | | | + | | `+` cannot be used to concatenate two `&str` strings | &String | = note: string concatenation requires an owned `String` on the left +help: create an owned `String` from a string reference + | +LL | let c = a.to_owned() + b; + | +++++++++++ error: aborting due to previous error diff --git a/src/test/ui/terminal-width/non-1-width-unicode-multiline-label.stderr b/src/test/ui/terminal-width/non-1-width-unicode-multiline-label.stderr index a97ecc4ce15..bf277362dba 100644 --- a/src/test/ui/terminal-width/non-1-width-unicode-multiline-label.stderr +++ b/src/test/ui/terminal-width/non-1-width-unicode-multiline-label.stderr @@ -1,14 +1,17 @@ error[E0369]: cannot add `&str` to `&str` --> $DIR/non-1-width-unicode-multiline-label.rs:5:260 | -LL | ...྅྆྇ྈྉྊྋྌྍྎྏྐྑྒྒྷྔྕྖྗྙྚྛྜྜྷྞྟྠྡྡྷྣྤྥྦྦྷྨྩྪྫྫྷྭྮྯྰྱྲླྴྵྶྷྸྐྵྺྻྼ྾྿࿀࿁࿂࿃࿄࿅࿆࿇࿈࿉࿊࿋࿌࿎...࿒࿓࿔࿕࿖࿗࿘࿙࿚"; let _a = unicode_is_fun + " really fun!"; - | ---------------^ -------------- &str - | | || - | | |`+` cannot be used to concatenate two `&str` strings - | | help: create an owned `String` from a string reference: `.to_owned()` - | &str +LL | ...ཽཾཿ྄ཱྀྀྂྃ྅྆྇ྈྉྊྋྌྍྎྏྐྑྒྒྷྔྕྖྗྙྚྛྜྜྷྞྟྠྡྡྷྣྤྥྦྦྷྨྩྪྫྫྷྭྮྯྰྱྲླྴྵྶྷྸྐྵྺྻྼ྾྿࿀࿁࿂࿃࿄࿅࿆࿇...࿋࿌࿎࿏࿐࿑࿒࿓࿔࿕࿖࿗࿘࿙࿚"; let _a = unicode_is_fun + " really fun!"; + | -------------- ^ -------------- &str + | | | + | | `+` cannot be used to concatenate two `&str` strings + | &str | = note: string concatenation requires an owned `String` on the left +help: create an owned `String` from a string reference + | +LL | let _ = "ༀ༁༂༃༄༅༆༇༈༉༊་༌།༎༏༐༑༒༓༔༕༖༗༘༙༚༛༜༝༞༟༠༡༢༣༤༥༦༧༨༩༪༫༬༭༮༯༰༱༲༳༴༵༶༷༸༹༺༻༼༽༾༿ཀཁགགྷངཅཆཇཉཊཋཌཌྷཎཏཐདདྷནཔཕབབྷམཙཚཛཛྷཝཞཟའཡརལཤཥསཧཨཀྵཪཫཬཱཱཱིིུུྲྀཷླྀཹེཻོཽཾཿ྄ཱྀྀྂྃ྅྆྇ྈྉྊྋྌྍྎྏྐྑྒྒྷྔྕྖྗྙྚྛྜྜྷྞྟྠྡྡྷྣྤྥྦྦྷྨྩྪྫྫྷྭྮྯྰྱྲླྴྵྶྷྸྐྵྺྻྼ྾྿࿀࿁࿂࿃࿄࿅࿆࿇࿈࿉࿊࿋࿌࿎࿏࿐࿑࿒࿓࿔࿕࿖࿗࿘࿙࿚"; let _a = unicode_is_fun.to_owned() + " really fun!"; + | +++++++++++ error: aborting due to previous error |
