From 6336da9a75633a074bf169fe62dfb0728e7055a7 Mon Sep 17 00:00:00 2001 From: Hankai Zhang Date: Sat, 10 Jun 2023 14:46:11 -0400 Subject: [PATCH] Use a better link --- compiler/rustc_parse/src/lexer/unescape_error_reporting.rs | 2 +- tests/ui/lexer/lex-bad-char-literals-1.stderr | 4 ++-- tests/ui/parser/bad-escape-suggest-raw-string.rs | 2 +- tests/ui/parser/bad-escape-suggest-raw-string.stderr | 2 +- tests/ui/parser/byte-literals.stderr | 4 ++-- tests/ui/parser/byte-string-literals.stderr | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/compiler/rustc_parse/src/lexer/unescape_error_reporting.rs b/compiler/rustc_parse/src/lexer/unescape_error_reporting.rs index 4bbd640cd59..461a34b67db 100644 --- a/compiler/rustc_parse/src/lexer/unescape_error_reporting.rs +++ b/compiler/rustc_parse/src/lexer/unescape_error_reporting.rs @@ -158,7 +158,7 @@ pub(crate) fn emit_unescape_error( diag.help( "for more information, visit \ - ", + ", ); } diag.emit(); diff --git a/tests/ui/lexer/lex-bad-char-literals-1.stderr b/tests/ui/lexer/lex-bad-char-literals-1.stderr index 44e8700bf8d..9dc0a338063 100644 --- a/tests/ui/lexer/lex-bad-char-literals-1.stderr +++ b/tests/ui/lexer/lex-bad-char-literals-1.stderr @@ -16,7 +16,7 @@ error: unknown character escape: `\u{25cf}` LL | '\●' | ^ unknown character escape | - = help: for more information, visit + = help: for more information, visit help: if you meant to write a literal backslash (perhaps escaping in a regular expression), consider a raw string literal | LL | r"\●" @@ -28,7 +28,7 @@ error: unknown character escape: `\u{25cf}` LL | "\●" | ^ unknown character escape | - = help: for more information, visit + = help: for more information, visit help: if you meant to write a literal backslash (perhaps escaping in a regular expression), consider a raw string literal | LL | r"\●" diff --git a/tests/ui/parser/bad-escape-suggest-raw-string.rs b/tests/ui/parser/bad-escape-suggest-raw-string.rs index 6725a11c223..06df82d288b 100644 --- a/tests/ui/parser/bad-escape-suggest-raw-string.rs +++ b/tests/ui/parser/bad-escape-suggest-raw-string.rs @@ -2,6 +2,6 @@ fn main() { let ok = r"ab\[c"; let bad = "ab\[c"; //~^ ERROR unknown character escape: `[` - //~| HELP for more information, visit + //~| HELP for more information, visit //~| HELP if you meant to write a literal backslash (perhaps escaping in a regular expression), consider a raw string literal } diff --git a/tests/ui/parser/bad-escape-suggest-raw-string.stderr b/tests/ui/parser/bad-escape-suggest-raw-string.stderr index f54761d1bd1..45d24bc0fb3 100644 --- a/tests/ui/parser/bad-escape-suggest-raw-string.stderr +++ b/tests/ui/parser/bad-escape-suggest-raw-string.stderr @@ -4,7 +4,7 @@ error: unknown character escape: `[` LL | let bad = "ab\[c"; | ^ unknown character escape | - = help: for more information, visit + = help: for more information, visit help: if you meant to write a literal backslash (perhaps escaping in a regular expression), consider a raw string literal | LL | let bad = r"ab\[c"; diff --git a/tests/ui/parser/byte-literals.stderr b/tests/ui/parser/byte-literals.stderr index 7406905f932..5b414c8927e 100644 --- a/tests/ui/parser/byte-literals.stderr +++ b/tests/ui/parser/byte-literals.stderr @@ -4,7 +4,7 @@ error: unknown byte escape: `f` LL | static FOO: u8 = b'\f'; | ^ unknown byte escape | - = help: for more information, visit + = help: for more information, visit error: unknown byte escape: `f` --> $DIR/byte-literals.rs:6:8 @@ -12,7 +12,7 @@ error: unknown byte escape: `f` LL | b'\f'; | ^ unknown byte escape | - = help: for more information, visit + = help: for more information, visit error: invalid character in numeric character escape: `Z` --> $DIR/byte-literals.rs:7:10 diff --git a/tests/ui/parser/byte-string-literals.stderr b/tests/ui/parser/byte-string-literals.stderr index fbc719c5b67..655b6998e85 100644 --- a/tests/ui/parser/byte-string-literals.stderr +++ b/tests/ui/parser/byte-string-literals.stderr @@ -4,7 +4,7 @@ error: unknown byte escape: `f` LL | static FOO: &'static [u8] = b"\f"; | ^ unknown byte escape | - = help: for more information, visit + = help: for more information, visit error: unknown byte escape: `f` --> $DIR/byte-string-literals.rs:4:8 @@ -12,7 +12,7 @@ error: unknown byte escape: `f` LL | b"\f"; | ^ unknown byte escape | - = help: for more information, visit + = help: for more information, visit error: invalid character in numeric character escape: `Z` --> $DIR/byte-string-literals.rs:5:10