File tree Expand file tree Collapse file tree 7 files changed +15
-14
lines changed Expand file tree Collapse file tree 7 files changed +15
-14
lines changed Original file line number Diff line number Diff line change @@ -1927,7 +1927,7 @@ fn can_elide_trait_object_lifetime_bound<'tcx>(
19271927 preds : & ' tcx ty:: List < ty:: PolyExistentialPredicate < ' tcx > > ,
19281928 tcx : TyCtxt < ' tcx > ,
19291929) -> bool {
1930- // Below we quote extracts from https://doc.rust-lang.org/reference/lifetime-elision.html#default-trait-object-lifetimes
1930+ // Below we quote extracts from https://doc.rust-lang.org/stable/ reference/lifetime-elision.html#default-trait-object-lifetimes
19311931
19321932 // > If the trait object is used as a type argument of a generic type then the containing type is
19331933 // > first used to try to infer a bound.
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ use crate::html::render::write_shared::write_shared;
3232use crate :: html:: url_parts_builder:: UrlPartsBuilder ;
3333use crate :: html:: { layout, sources, static_files} ;
3434use crate :: scrape_examples:: AllCallLocations ;
35- use crate :: try_err;
35+ use crate :: { DOC_RUST_LANG_ORG_CHANNEL , try_err} ;
3636
3737/// Major driving force in all rustdoc rendering. This contains information
3838/// about where in the tree-like hierarchy rendering is occurring and controls
@@ -730,7 +730,7 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> {
730730 <noscript>\
731731 <section>\
732732 <p>You need to enable JavaScript to use keyboard commands or search.</p>\
733- <p>For more information, browse the <a href=\" https://doc.rust-lang.org /rustdoc/\" >rustdoc handbook</a>.</p>\
733+ <p>For more information, browse the <a href=\" {DOC_RUST_LANG_ORG_CHANNEL} /rustdoc/\" >rustdoc handbook</a>.</p>\
734734 </section>\
735735 </noscript>",
736736 )
Original file line number Diff line number Diff line change @@ -1392,10 +1392,10 @@ href="https://doc.rust-lang.org/${channel}/rustdoc/read-documentation/search.htm
13921392 <code>-> vec</code> or <code>String, enum:Cow -> bool</code>)" ,
13931393 "You can look for items with an exact name by putting double quotes around \
13941394 your request: <code>\"string\"</code>" ,
1395- " Look for functions that accept or return \
1396- <a href=\"https://doc.rust-lang.org/std/primitive.slice.html\">slices</a> and \
1397- <a href=\"https://doc.rust-lang.org/std/primitive.array.html\">arrays</a> by writing \
1398- square brackets (e.g., <code>-> [u8]</code> or <code>[] -> Option</code>)" ,
1395+ ` Look for functions that accept or return \
1396+ <a href=\"https://doc.rust-lang.org/${ channel } / std/primitive.slice.html\">slices</a> and \
1397+ <a href=\"https://doc.rust-lang.org/${ channel } / std/primitive.array.html\">arrays</a> by writing \
1398+ square brackets (e.g., <code>-> [u8]</code> or <code>[] -> Option</code>)` ,
13991399 "Look for items inside another one by searching for a path: <code>vec::Vec</code>" ,
14001400 ] . map ( x => "<p>" + x + "</p>" ) . join ( "" ) ;
14011401 const div_infos = document . createElement ( "div" ) ;
Original file line number Diff line number Diff line change @@ -4408,17 +4408,18 @@ ${item.displayPath}<span class="${type}">${name}</span>\
44084408 }
44094409 } ) ;
44104410 } else if ( query . error === null ) {
4411+ const channel = getVar ( "channel" ) ;
44114412 output . className = "search-failed" + extraClass ;
44124413 output . innerHTML = "No results :(<br/>" +
44134414 "Try on <a href=\"https://duckduckgo.com/?q=" +
44144415 encodeURIComponent ( "rust " + query . userQuery ) +
44154416 "\">DuckDuckGo</a>?<br/><br/>" +
44164417 "Or try looking in one of these:<ul><li>The <a " +
4417- " href=\"https://doc.rust-lang.org/reference/index.html\">Rust Reference</a> " +
4418+ ` href=\"https://doc.rust-lang.org/${ channel } / reference/index.html\">Rust Reference</a> ` +
44184419 " for technical details about the language.</li><li><a " +
4419- " href=\"https://doc.rust-lang.org/rust-by-example/index.html\">Rust By " +
4420+ ` href=\"https://doc.rust-lang.org/${ channel } / rust-by-example/index.html\">Rust By ` +
44204421 "Example</a> for expository code examples.</a></li><li>The <a " +
4421- " href=\"https://doc.rust-lang.org/book/index.html\">Rust Book</a> for " +
4422+ ` href=\"https://doc.rust-lang.org/${ channel } / book/index.html\">Rust Book</a> for ` +
44224423 "introductions to language features and the language itself.</li><li><a " +
44234424 "href=\"https://docs.rs\">Docs.rs</a> for documentation of crates released on" +
44244425 " <a href=\"https://crates.io/\">crates.io</a>.</li></ul>" ;
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ <h2 id="layout" class="section-header"> {# #}
1010 unstable</ strong > and may even differ between compilations. {#+ #}
1111 The only exception is types with certain < code > repr(...)</ code > {#+ #}
1212 attributes. Please see the Rust Reference's {#+ #}
13- < a href ="https://doc.rust-lang.org /reference/type-layout.html "> “Type Layout”</ a > {#+ #}
13+ < a href ="{{ crate::DOC_RUST_LANG_ORG_CHANNEL }} /reference/type-layout.html "> “Type Layout”</ a > {#+ #}
1414 chapter for details on type layout guarantees. {# #}
1515 </ p > {# #}
1616 </ div > {# #}
Original file line number Diff line number Diff line change 77 {{ size +}} bytes
88 {% endif %}
99 {% if is_uninhabited %}
10- {# +#} (< a href ="https://doc.rust-lang.org/stable /reference/glossary.html#uninhabited "> uninhabited</ a > )
10+ {# +#} (< a href ="{{ crate::DOC_RUST_LANG_ORG_CHANNEL }} /reference/glossary.html#uninhabited "> uninhabited</ a > )
1111 {% endif %}
1212{% endif %}
Original file line number Diff line number Diff line change @@ -85,9 +85,9 @@ pub enum WithNiche {
8585}
8686
8787//@ hasraw type_layout/enum.Uninhabited.html 'Size: '
88- //@ hasraw - '0 bytes (<a href="https://doc.rust-lang.org/stable /reference/glossary.html#uninhabited">uninhabited</a>)'
88+ //@ hasraw - '0 bytes (<a href="{{channel}} /reference/glossary.html#uninhabited">uninhabited</a>)'
8989pub enum Uninhabited { }
9090
9191//@ hasraw type_layout/struct.Uninhabited2.html 'Size: '
92- //@ hasraw - '8 bytes (<a href="https://doc.rust-lang.org/stable /reference/glossary.html#uninhabited">uninhabited</a>)'
92+ //@ hasraw - '8 bytes (<a href="{{channel}} /reference/glossary.html#uninhabited">uninhabited</a>)'
9393pub struct Uninhabited2 ( std:: convert:: Infallible , u64 ) ;
You can’t perform that action at this time.
0 commit comments