Skip to content

Commit a58e7ff

Browse files
committed
Add redirects on the unstable docs.
This adds some redirects so if there are any links to old documentation, they will get redirect to new documentation.
1 parent 13b0b70 commit a58e7ff

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

src/doc/src/reference/unstable.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1060,3 +1060,35 @@ name = "mypackage"
10601060
version = "0.0.1"
10611061
rust-version = "1.42"
10621062
```
1063+
1064+
<script>
1065+
(function() {
1066+
var fragments = {
1067+
"#edition": "manifest.html#the-edition-field",
1068+
"#compile-progress": "config.html#termprogresswhen",
1069+
"#rename-dependency": "specifying-dependencies.html#renaming-dependencies-in-cargotoml",
1070+
"#alternate-registries": "registries.html",
1071+
"#offline-mode": "../commands/cargo.html",
1072+
"#publish-lockfile": "../commands/cargo-package.html",
1073+
"#default-run": "manifest.html#the-default-run-field",
1074+
"#cache-messages": "https://github.com/rust-lang/cargo/pull/7450",
1075+
"#install-upgrade": "../commands/cargo-install.html",
1076+
"#profile-overrides": "profiles.html#overrides",
1077+
"#config-profiles": "config.html#profile",
1078+
"#crate-versions": "https://github.com/rust-lang/cargo/pull/8509",
1079+
"#features": "features.html#feature-resolver-version-2",
1080+
"#package-features": "features.html#resolver-version-2-command-line-flags",
1081+
"#resolver": "resolver.html#resolver-versions",
1082+
};
1083+
var target = fragments[window.location.hash];
1084+
if (target) {
1085+
if (target.startsWith('https')) {
1086+
window.location.replace(target);
1087+
} else {
1088+
var url = window.location.toString();
1089+
var base = url.substring(0, url.lastIndexOf('/'));
1090+
window.location.replace(base + "/" + target);
1091+
}
1092+
}
1093+
})();
1094+
</script>

0 commit comments

Comments
 (0)