Skip to content

Commit 637e5e3

Browse files
dawnofmidnightshepmaster
authored andcommitted
update error-index hyperlinks
This updates the hyperlinks for error codes to point to the new error index locations. For example, what used to link to `https://doc.rust-lang.org/stable/error-index.html#E0005` will now link to `https://doc.rust-lang.org/stable/error_codes/E0005.html`. Currently, a redirect makes this work fine, but it's probably best to use the new locations.
1 parent b4069dd commit 637e5e3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/spec/features/highlighting_error_output_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
scenario "error codes link to the error page" do
3232
within(:output, :stderr) do
33-
expect(page).to have_link('E0107', href: /error-index.html#E0107/)
33+
expect(page).to have_link('E0107', href: %r{/error_codes/E0107.html})
3434
end
3535
end
3636

ui/frontend/highlighting.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export function configureRustErrors({
6969
if (errorMatch) {
7070
const [errorCode] = errorMatch;
7171
env.tag = 'a';
72-
env.attributes.href = `https://doc.rust-lang.org/${getChannel()}/error-index.html#${errorCode}`;
72+
env.attributes.href = `https://doc.rust-lang.org/${getChannel()}/error_codes/${errorCode}.html`;
7373
env.attributes.target = '_blank';
7474
}
7575
}

0 commit comments

Comments
 (0)