diff options
| author | Noah Lev <camelidcamel@gmail.com> | 2022-01-12 22:20:13 -0800 |
|---|---|---|
| committer | Noah Lev <camelidcamel@gmail.com> | 2022-01-12 22:20:13 -0800 |
| commit | 69db5e2c8c8bca8bc513cbe4ffa37dff234ad508 (patch) | |
| tree | 5502838ec432ec22e5f090557841edc8249a7a17 /src/test/ui | |
| parent | 2835ace4ca1901b60678484ece129a4f60bd1887 (diff) | |
| download | rust-69db5e2c8c8bca8bc513cbe4ffa37dff234ad508.tar.gz rust-69db5e2c8c8bca8bc513cbe4ffa37dff234ad508.zip | |
Split up very long message
This should make it easier to read.
Diffstat (limited to 'src/test/ui')
| -rw-r--r-- | src/test/ui/issues/issue-47377.stderr | 3 | ||||
| -rw-r--r-- | src/test/ui/issues/issue-47380.stderr | 3 | ||||
| -rw-r--r-- | src/test/ui/span/issue-39018.stderr | 31 | ||||
| -rw-r--r-- | src/test/ui/str/str-concat-on-double-ref.stderr | 3 | ||||
| -rw-r--r-- | src/test/ui/terminal-width/non-1-width-unicode-multiline-label.stderr | 3 |
5 files changed, 25 insertions, 18 deletions
diff --git a/src/test/ui/issues/issue-47377.stderr b/src/test/ui/issues/issue-47377.stderr index 2c17a19779f..2e00de84087 100644 --- a/src/test/ui/issues/issue-47377.stderr +++ b/src/test/ui/issues/issue-47377.stderr @@ -7,7 +7,8 @@ LL | let _a = b + ", World!"; | | `+` cannot be used to concatenate two `&str` strings | &str | -help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left + = note: String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left. +help: use `to_owned()` to create an owned `String` from a string reference | LL | let _a = b.to_owned() + ", World!"; | +++++++++++ diff --git a/src/test/ui/issues/issue-47380.stderr b/src/test/ui/issues/issue-47380.stderr index 417206e6cc4..fec64009444 100644 --- a/src/test/ui/issues/issue-47380.stderr +++ b/src/test/ui/issues/issue-47380.stderr @@ -7,7 +7,8 @@ LL | println!("🦀🦀🦀🦀🦀"); let _a = b + ", World!"; | | `+` cannot be used to concatenate two `&str` strings | &str | -help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left + = note: String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left. +help: use `to_owned()` to create an owned `String` from a string reference | LL | println!("🦀🦀🦀🦀🦀"); let _a = b.to_owned() + ", World!"; | +++++++++++ diff --git a/src/test/ui/span/issue-39018.stderr b/src/test/ui/span/issue-39018.stderr index 444d037571e..9054dd931ca 100644 --- a/src/test/ui/span/issue-39018.stderr +++ b/src/test/ui/span/issue-39018.stderr @@ -7,7 +7,8 @@ LL | let x = "Hello " + "World!"; | | `+` cannot be used to concatenate two `&str` strings | &str | -help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left + = note: String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left. +help: use `to_owned()` to create an owned `String` from a string reference | LL | let x = "Hello ".to_owned() + "World!"; | +++++++++++ @@ -46,7 +47,7 @@ LL | let x = "Hello " + "World!".to_owned(); | | `+` cannot be used to concatenate a `&str` with a `String` | &str | -help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left +help: call `.to_owned()` on the left and add a borrow on the right | LL | let x = "Hello ".to_owned() + &"World!".to_owned(); | +++++++++++ + @@ -59,12 +60,9 @@ LL | let _ = &a + &b; | | | | | `+` cannot be used to concatenate two `&str` strings | &String + | help: remove the borrow to obtain an owned `String` | -help: String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left - | -LL - let _ = &a + &b; -LL + let _ = a + &b; - | + = note: String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left. error[E0369]: cannot add `String` to `&String` --> $DIR/issue-39018.rs:27:16 @@ -75,7 +73,7 @@ LL | let _ = &a + b; | | `+` cannot be used to concatenate a `&str` with a `String` | &String | -help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left +help: remove the borrow on the left and add one on the right | LL - let _ = &a + b; LL + let _ = a + &b; @@ -99,7 +97,7 @@ LL | let _ = e + b; | | `+` cannot be used to concatenate a `&str` with a `String` | &String | -help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left +help: call `.to_owned()` on the left and add a borrow on the right | LL | let _ = e.to_owned() + &b; | +++++++++++ + @@ -113,7 +111,8 @@ LL | let _ = e + &b; | | `+` cannot be used to concatenate two `&str` strings | &String | -help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left + = note: String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left. +help: use `to_owned()` to create an owned `String` from a string reference | LL | let _ = e.to_owned() + &b; | +++++++++++ @@ -127,7 +126,8 @@ LL | let _ = e + d; | | `+` cannot be used to concatenate two `&str` strings | &String | -help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left + = note: String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left. +help: use `to_owned()` to create an owned `String` from a string reference | LL | let _ = e.to_owned() + d; | +++++++++++ @@ -141,7 +141,8 @@ LL | let _ = e + &d; | | `+` cannot be used to concatenate two `&str` strings | &String | -help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left + = note: String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left. +help: use `to_owned()` to create an owned `String` from a string reference | LL | let _ = e.to_owned() + &d; | +++++++++++ @@ -171,7 +172,8 @@ LL | let _ = c + &d; | | `+` cannot be used to concatenate two `&str` strings | &str | -help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left + = note: String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left. +help: use `to_owned()` to create an owned `String` from a string reference | LL | let _ = c.to_owned() + &d; | +++++++++++ @@ -185,7 +187,8 @@ LL | let _ = c + d; | | `+` cannot be used to concatenate two `&str` strings | &str | -help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left + = note: String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left. +help: use `to_owned()` to create an owned `String` from a string reference | LL | let _ = c.to_owned() + d; | +++++++++++ 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 cc9456be901..e8b5c2bbd85 100644 --- a/src/test/ui/str/str-concat-on-double-ref.stderr +++ b/src/test/ui/str/str-concat-on-double-ref.stderr @@ -7,7 +7,8 @@ LL | let c = a + b; | | `+` cannot be used to concatenate two `&str` strings | &String | -help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left + = note: String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left. +help: use `to_owned()` to create an owned `String` from a string reference | LL | let c = a.to_owned() + b; | +++++++++++ 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 2da3db4a7fa..72005a88980 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 @@ -7,7 +7,8 @@ LL | ...ཽཾཿ྄ཱྀྀྂྃ྅྆྇ྈྉྊྋྌྍྎྏྐྑྒྒྷྔ | | `+` cannot be used to concatenate two `&str` strings | &str | -help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left + = note: String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left. +help: use `to_owned()` to create an owned `String` from a string reference | LL | let _ = "ༀ༁༂༃༄༅༆༇༈༉༊་༌།༎༏༐༑༒༓༔༕༖༗༘༙༚༛༜༝༞༟༠༡༢༣༤༥༦༧༨༩༪༫༬༭༮༯༰༱༲༳༴༵༶༷༸༹༺༻༼༽༾༿ཀཁགགྷངཅཆཇཉཊཋཌཌྷཎཏཐདདྷནཔཕབབྷམཙཚཛཛྷཝཞཟའཡརལཤཥསཧཨཀྵཪཫཬཱཱཱིིུུྲྀཷླྀཹེཻོཽཾཿ྄ཱྀྀྂྃ྅྆྇ྈྉྊྋྌྍྎྏྐྑྒྒྷྔྕྖྗྙྚྛྜྜྷྞྟྠྡྡྷྣྤྥྦྦྷྨྩྪྫྫྷྭྮྯྰྱྲླྴྵྶྷྸྐྵྺྻྼ྾྿࿀࿁࿂࿃࿄࿅࿆࿇࿈࿉࿊࿋࿌࿎࿏࿐࿑࿒࿓࿔࿕࿖࿗࿘࿙࿚"; let _a = unicode_is_fun.to_owned() + " really fun!"; | +++++++++++ |
