@@ -16,7 +16,6 @@ use rustc_ast::{self as ast, AttrStyle};
16
16
use rustc_attr:: { ConstStability , Deprecation , Stability , StabilityLevel } ;
17
17
use rustc_data_structures:: fx:: { FxHashMap , FxHashSet } ;
18
18
use rustc_data_structures:: thin_vec:: ThinVec ;
19
- use rustc_feature:: UnstableFeatures ;
20
19
use rustc_hir as hir;
21
20
use rustc_hir:: def:: { CtorKind , Res } ;
22
21
use rustc_hir:: def_id:: { CrateNum , DefId , DefIndex } ;
@@ -228,14 +227,9 @@ impl Item {
228
227
"../" . repeat ( depth)
229
228
}
230
229
Some ( & ( _, _, ExternalLocation :: Remote ( ref s) ) ) => s. to_string ( ) ,
231
- Some ( & ( _, _, ExternalLocation :: Unknown ) ) | None => String :: from (
232
- // NOTE: intentionally doesn't pass crate name to avoid having
233
- // different primitive links between crates
234
- if UnstableFeatures :: from_environment ( None ) . is_nightly_build ( ) {
235
- "https://doc.rust-lang.org/nightly"
236
- } else {
237
- "https://doc.rust-lang.org"
238
- } ,
230
+ Some ( & ( _, _, ExternalLocation :: Unknown ) ) | None => format ! (
231
+ "https://doc.rust-lang.org/{}" ,
232
+ crate :: doc_rust_lang_org_channel( ) ,
239
233
) ,
240
234
} ;
241
235
// This is a primitive so the url is done "by hand".
0 commit comments