Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/rustc_parse/src/lexer/unescape_error_reporting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ pub(crate) fn emit_unescape_error(

diag.help(
"for more information, visit \
<https://static.rust-lang.org/doc/master/reference.html#literals>",
<https://doc.rust-lang.org/stable/reference/expressions/literal-expr.html>",
);
}
diag.emit();
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/lexer/lex-bad-char-literals-1.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ error: unknown character escape: `\u{25cf}`
LL | '\●'
| ^ unknown character escape
|
= help: for more information, visit <https://static.rust-lang.org/doc/master/reference.html#literals>
= help: for more information, visit <https://doc.rust-lang.org/stable/reference/expressions/literal-expr.html>
help: if you meant to write a literal backslash (perhaps escaping in a regular expression), consider a raw string literal
|
LL | r"\●"
Expand All @@ -28,7 +28,7 @@ error: unknown character escape: `\u{25cf}`
LL | "\●"
| ^ unknown character escape
|
= help: for more information, visit <https://static.rust-lang.org/doc/master/reference.html#literals>
= help: for more information, visit <https://doc.rust-lang.org/stable/reference/expressions/literal-expr.html>
help: if you meant to write a literal backslash (perhaps escaping in a regular expression), consider a raw string literal
|
LL | r"\●"
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/parser/bad-escape-suggest-raw-string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ fn main() {
let ok = r"ab\[c";
let bad = "ab\[c";
//~^ ERROR unknown character escape: `[`
//~| HELP for more information, visit <https://static.rust-lang.org/doc/master/reference.html#literals>
//~| HELP for more information, visit <https://doc.rust-lang.org/stable/reference/expressions/literal-expr.html>
//~| HELP if you meant to write a literal backslash (perhaps escaping in a regular expression), consider a raw string literal
}
2 changes: 1 addition & 1 deletion tests/ui/parser/bad-escape-suggest-raw-string.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ error: unknown character escape: `[`
LL | let bad = "ab\[c";
| ^ unknown character escape
|
= help: for more information, visit <https://static.rust-lang.org/doc/master/reference.html#literals>
= help: for more information, visit <https://doc.rust-lang.org/stable/reference/expressions/literal-expr.html>
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";
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/parser/byte-literals.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ error: unknown byte escape: `f`
LL | static FOO: u8 = b'\f';
| ^ unknown byte escape
|
= help: for more information, visit <https://static.rust-lang.org/doc/master/reference.html#literals>
= help: for more information, visit <https://doc.rust-lang.org/stable/reference/expressions/literal-expr.html>

error: unknown byte escape: `f`
--> $DIR/byte-literals.rs:6:8
|
LL | b'\f';
| ^ unknown byte escape
|
= help: for more information, visit <https://static.rust-lang.org/doc/master/reference.html#literals>
= help: for more information, visit <https://doc.rust-lang.org/stable/reference/expressions/literal-expr.html>

error: invalid character in numeric character escape: `Z`
--> $DIR/byte-literals.rs:7:10
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/parser/byte-string-literals.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ error: unknown byte escape: `f`
LL | static FOO: &'static [u8] = b"\f";
| ^ unknown byte escape
|
= help: for more information, visit <https://static.rust-lang.org/doc/master/reference.html#literals>
= help: for more information, visit <https://doc.rust-lang.org/stable/reference/expressions/literal-expr.html>

error: unknown byte escape: `f`
--> $DIR/byte-string-literals.rs:4:8
|
LL | b"\f";
| ^ unknown byte escape
|
= help: for more information, visit <https://static.rust-lang.org/doc/master/reference.html#literals>
= help: for more information, visit <https://doc.rust-lang.org/stable/reference/expressions/literal-expr.html>

error: invalid character in numeric character escape: `Z`
--> $DIR/byte-string-literals.rs:5:10
Expand Down