mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-13 12:36:47 +00:00
review comment: str
-> string in messages
This commit is contained in:
parent
4a10b01f95
commit
999a0dc300
@ -169,7 +169,7 @@ infer_lifetime_param_suggestion_elided = each elided lifetime in input position
|
||||
|
||||
infer_meant_byte_literal = if you meant to write a byte literal, prefix with `b`
|
||||
infer_meant_char_literal = if you meant to write a `char` literal, use single quotes
|
||||
infer_meant_str_literal = if you meant to write a `str` literal, use double quotes
|
||||
infer_meant_str_literal = if you meant to write a string literal, use double quotes
|
||||
infer_mismatched_static_lifetime = incompatible lifetime on type
|
||||
infer_more_targeted = {$has_param_name ->
|
||||
[true] `{$param_name}`
|
||||
|
@ -570,7 +570,7 @@ parse_more_than_one_char = character literal may only contain one codepoint
|
||||
.remove_non = consider removing the non-printing characters
|
||||
.use_double_quotes = if you meant to write a {$is_byte ->
|
||||
[true] byte string
|
||||
*[false] `str`
|
||||
*[false] string
|
||||
} literal, use double quotes
|
||||
|
||||
parse_multiple_skipped_lines = multiple lines skipped by escaped newline
|
||||
@ -835,7 +835,7 @@ parse_unknown_prefix = prefix `{$prefix}` is unknown
|
||||
.label = unknown prefix
|
||||
.note = prefixed identifiers and literals are reserved since Rust 2021
|
||||
.suggestion_br = use `br` for a raw byte string
|
||||
.suggestion_str = if you meant to write a `str` literal, use double quotes
|
||||
.suggestion_str = if you meant to write a string literal, use double quotes
|
||||
.suggestion_whitespace = consider inserting whitespace here
|
||||
|
||||
parse_unknown_start_of_token = unknown start of token: {$escaped}
|
||||
|
@ -419,7 +419,7 @@ impl<'psess, 'src> StringReader<'psess, 'src> {
|
||||
.with_code(E0762);
|
||||
if let Some(lt_sp) = self.last_lifetime {
|
||||
err.multipart_suggestion(
|
||||
"if you meant to write a `str` literal, use double quotes",
|
||||
"if you meant to write a string literal, use double quotes",
|
||||
vec![
|
||||
(lt_sp, "\"".to_string()),
|
||||
(self.mk_sp(start, start + BytePos(1)), "\"".to_string()),
|
||||
|
@ -4,7 +4,7 @@ error: character literal may only contain one codepoint
|
||||
LL | let _: &str = '"""';
|
||||
| ^^^^^
|
||||
|
|
||||
help: if you meant to write a `str` literal, use double quotes
|
||||
help: if you meant to write a string literal, use double quotes
|
||||
|
|
||||
LL | let _: &str = "\"\"\"";
|
||||
| ~~~~~~~~
|
||||
@ -15,7 +15,7 @@ error: character literal may only contain one codepoint
|
||||
LL | let _: &str = '\"\"\"';
|
||||
| ^^^^^^^^
|
||||
|
|
||||
help: if you meant to write a `str` literal, use double quotes
|
||||
help: if you meant to write a string literal, use double quotes
|
||||
|
|
||||
LL | let _: &str = "\"\"\"";
|
||||
| ~ ~
|
||||
@ -26,7 +26,7 @@ error: character literal may only contain one codepoint
|
||||
LL | let _: &str = '"\"\"\\"\\"';
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
help: if you meant to write a `str` literal, use double quotes
|
||||
help: if you meant to write a string literal, use double quotes
|
||||
|
|
||||
LL | let _: &str = "\"\"\\"\\"\\\"";
|
||||
| ~~~~~~~~~~~~~~~~~~~~
|
||||
@ -39,7 +39,7 @@ LL | let _: &str = 'a';
|
||||
| |
|
||||
| expected due to this
|
||||
|
|
||||
help: if you meant to write a `str` literal, use double quotes
|
||||
help: if you meant to write a string literal, use double quotes
|
||||
|
|
||||
LL | let _: &str = "a";
|
||||
| ~ ~
|
||||
|
@ -15,7 +15,7 @@ error[E0308]: mismatched types
|
||||
LL | let v: Vec(&str) = vec!['1', '2'];
|
||||
| ^^^ expected `&str`, found `char`
|
||||
|
|
||||
help: if you meant to write a `str` literal, use double quotes
|
||||
help: if you meant to write a string literal, use double quotes
|
||||
|
|
||||
LL | let v: Vec(&str) = vec!["1", '2'];
|
||||
| ~ ~
|
||||
|
@ -4,7 +4,7 @@ error: character literal may only contain one codepoint
|
||||
LL | 'nope'
|
||||
| ^^^^^^
|
||||
|
|
||||
help: if you meant to write a `str` literal, use double quotes
|
||||
help: if you meant to write a string literal, use double quotes
|
||||
|
|
||||
LL | "nope"
|
||||
| ~ ~
|
||||
|
@ -4,7 +4,7 @@ error: character literal may only contain one codepoint
|
||||
LL | static c: char = '●●';
|
||||
| ^^^^
|
||||
|
|
||||
help: if you meant to write a `str` literal, use double quotes
|
||||
help: if you meant to write a string literal, use double quotes
|
||||
|
|
||||
LL | static c: char = "●●";
|
||||
| ~ ~
|
||||
@ -15,7 +15,7 @@ error: character literal may only contain one codepoint
|
||||
LL | let ch: &str = '●●';
|
||||
| ^^^^
|
||||
|
|
||||
help: if you meant to write a `str` literal, use double quotes
|
||||
help: if you meant to write a string literal, use double quotes
|
||||
|
|
||||
LL | let ch: &str = "●●";
|
||||
| ~ ~
|
||||
|
@ -4,7 +4,7 @@ error: character literal may only contain one codepoint
|
||||
LL | static c: char = '\x10\x10';
|
||||
| ^^^^^^^^^^
|
||||
|
|
||||
help: if you meant to write a `str` literal, use double quotes
|
||||
help: if you meant to write a string literal, use double quotes
|
||||
|
|
||||
LL | static c: char = "\x10\x10";
|
||||
| ~ ~
|
||||
@ -15,7 +15,7 @@ error: character literal may only contain one codepoint
|
||||
LL | let ch: &str = '\x10\x10';
|
||||
| ^^^^^^^^^^
|
||||
|
|
||||
help: if you meant to write a `str` literal, use double quotes
|
||||
help: if you meant to write a string literal, use double quotes
|
||||
|
|
||||
LL | let ch: &str = "\x10\x10";
|
||||
| ~ ~
|
||||
|
@ -4,7 +4,7 @@ error: character literal may only contain one codepoint
|
||||
LL | let x: &str = 'ab';
|
||||
| ^^^^
|
||||
|
|
||||
help: if you meant to write a `str` literal, use double quotes
|
||||
help: if you meant to write a string literal, use double quotes
|
||||
|
|
||||
LL | let x: &str = "ab";
|
||||
| ~ ~
|
||||
@ -15,7 +15,7 @@ error: character literal may only contain one codepoint
|
||||
LL | let y: char = 'cd';
|
||||
| ^^^^
|
||||
|
|
||||
help: if you meant to write a `str` literal, use double quotes
|
||||
help: if you meant to write a string literal, use double quotes
|
||||
|
|
||||
LL | let y: char = "cd";
|
||||
| ~ ~
|
||||
@ -26,7 +26,7 @@ error: character literal may only contain one codepoint
|
||||
LL | let z = 'ef';
|
||||
| ^^^^
|
||||
|
|
||||
help: if you meant to write a `str` literal, use double quotes
|
||||
help: if you meant to write a string literal, use double quotes
|
||||
|
|
||||
LL | let z = "ef";
|
||||
| ~ ~
|
||||
|
@ -4,7 +4,7 @@ error[E0762]: unterminated character literal
|
||||
LL | println!('1 + 1');
|
||||
| ^^^
|
||||
|
|
||||
help: if you meant to write a `str` literal, use double quotes
|
||||
help: if you meant to write a string literal, use double quotes
|
||||
|
|
||||
LL | println!("1 + 1");
|
||||
| ~ ~
|
||||
|
@ -4,7 +4,7 @@ error: character literal may only contain one codepoint
|
||||
LL | println!(' 1 + 1');
|
||||
| ^^^^^^^^
|
||||
|
|
||||
help: if you meant to write a `str` literal, use double quotes
|
||||
help: if you meant to write a string literal, use double quotes
|
||||
|
|
||||
LL | println!(" 1 + 1");
|
||||
| ~ ~
|
||||
|
@ -4,7 +4,7 @@ error[E0762]: unterminated character literal
|
||||
LL | println!('hello world');
|
||||
| ^^^^
|
||||
|
|
||||
help: if you meant to write a `str` literal, use double quotes
|
||||
help: if you meant to write a string literal, use double quotes
|
||||
|
|
||||
LL | println!("hello world");
|
||||
| ~ ~
|
||||
|
@ -5,5 +5,5 @@ fn main() {
|
||||
//~| HELP if you meant to write a byte string literal, use double quotes
|
||||
let _bar = 'hello';
|
||||
//~^ ERROR character literal may only contain one codepoint
|
||||
//~| HELP if you meant to write a `str` literal, use double quotes
|
||||
//~| HELP if you meant to write a string literal, use double quotes
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ error: character literal may only contain one codepoint
|
||||
LL | let _bar = 'hello';
|
||||
| ^^^^^^^
|
||||
|
|
||||
help: if you meant to write a `str` literal, use double quotes
|
||||
help: if you meant to write a string literal, use double quotes
|
||||
|
|
||||
LL | let _bar = "hello";
|
||||
| ~ ~
|
||||
|
@ -7,12 +7,12 @@ fn main() {
|
||||
let _spade = "♠️";
|
||||
//~^ ERROR: character literal may only contain one codepoint
|
||||
//~| NOTE: this `♠` is followed by the combining mark `\u{fe0f}`
|
||||
//~| HELP: if you meant to write a `str` literal, use double quotes
|
||||
//~| HELP: if you meant to write a string literal, use double quotes
|
||||
|
||||
let _s = "ṩ̂̊";
|
||||
//~^ ERROR: character literal may only contain one codepoint
|
||||
//~| NOTE: this `s` is followed by the combining marks `\u{323}\u{307}\u{302}\u{30a}`
|
||||
//~| HELP: if you meant to write a `str` literal, use double quotes
|
||||
//~| HELP: if you meant to write a string literal, use double quotes
|
||||
|
||||
let _a = 'Å';
|
||||
//~^ ERROR: character literal may only contain one codepoint
|
||||
|
@ -7,12 +7,12 @@ fn main() {
|
||||
let _spade = '♠️';
|
||||
//~^ ERROR: character literal may only contain one codepoint
|
||||
//~| NOTE: this `♠` is followed by the combining mark `\u{fe0f}`
|
||||
//~| HELP: if you meant to write a `str` literal, use double quotes
|
||||
//~| HELP: if you meant to write a string literal, use double quotes
|
||||
|
||||
let _s = 'ṩ̂̊';
|
||||
//~^ ERROR: character literal may only contain one codepoint
|
||||
//~| NOTE: this `s` is followed by the combining marks `\u{323}\u{307}\u{302}\u{30a}`
|
||||
//~| HELP: if you meant to write a `str` literal, use double quotes
|
||||
//~| HELP: if you meant to write a string literal, use double quotes
|
||||
|
||||
let _a = 'Å';
|
||||
//~^ ERROR: character literal may only contain one codepoint
|
||||
|
@ -9,7 +9,7 @@ note: this `♠` is followed by the combining mark `\u{fe0f}`
|
||||
|
|
||||
LL | let _spade = '♠️';
|
||||
| ^
|
||||
help: if you meant to write a `str` literal, use double quotes
|
||||
help: if you meant to write a string literal, use double quotes
|
||||
|
|
||||
LL | let _spade = "♠️";
|
||||
| ~ ~
|
||||
@ -25,7 +25,7 @@ note: this `s` is followed by the combining marks `\u{323}\u{307}\u{302}\u{30a}`
|
||||
|
|
||||
LL | let _s = 'ṩ̂̊';
|
||||
| ^
|
||||
help: if you meant to write a `str` literal, use double quotes
|
||||
help: if you meant to write a string literal, use double quotes
|
||||
|
|
||||
LL | let _s = "ṩ̂̊";
|
||||
| ~ ~
|
||||
|
@ -4,7 +4,7 @@ error: character literal may only contain one codepoint
|
||||
LL | println!('●●');
|
||||
| ^^^^
|
||||
|
|
||||
help: if you meant to write a `str` literal, use double quotes
|
||||
help: if you meant to write a string literal, use double quotes
|
||||
|
|
||||
LL | println!("●●");
|
||||
| ~ ~
|
||||
|
Loading…
Reference in New Issue
Block a user