Skip to content

Commit 8b5822b

Browse files
committed
Add some redirects for sections that were renamed
This adds some redirects for header fragments that have changed to help external links go to the correct location.
1 parent 602430a commit 8b5822b

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

src/expressions/if-expr.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,3 +186,17 @@ r[expr.if.edition2024]
186186
[`match` expressions]: match-expr.md
187187
[boolean type]: ../types/boolean.md
188188
[scrutinee]: ../glossary.md#scrutinee
189+
190+
<script>
191+
(function() {
192+
var fragments = {
193+
"#if-let-expressions": "if-expr.html#if-let-patterns",
194+
};
195+
var target = fragments[window.location.hash];
196+
if (target) {
197+
var url = window.location.toString();
198+
var base = url.substring(0, url.lastIndexOf('/'));
199+
window.location.replace(base + "/" + target);
200+
}
201+
})();
202+
</script>

src/expressions/loop-expr.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,3 +400,17 @@ In the case a `loop` has an associated `break`, it is not considered diverging,
400400
[boolean type]: ../types/boolean.md
401401
[scrutinee]: ../glossary.md#scrutinee
402402
[temporary values]: ../expressions.md#temporaries
403+
404+
<script>
405+
(function() {
406+
var fragments = {
407+
"#predicate-pattern-loops": "loop-expr.html#while-let-patterns",
408+
};
409+
var target = fragments[window.location.hash];
410+
if (target) {
411+
var url = window.location.toString();
412+
var base = url.substring(0, url.lastIndexOf('/'));
413+
window.location.replace(base + "/" + target);
414+
}
415+
})();
416+
</script>

0 commit comments

Comments
 (0)