@@ -14,7 +14,6 @@ use rustc_ast::util::comments::beautify_doc_string;
1414use  rustc_ast:: { self  as  ast,  AttrStyle } ; 
1515use  rustc_attr:: { ConstStability ,  Deprecation ,  Stability ,  StabilityLevel } ; 
1616use  rustc_data_structures:: fx:: { FxHashMap ,  FxHashSet } ; 
17- use  rustc_feature:: UnstableFeatures ; 
1817use  rustc_hir as  hir; 
1918use  rustc_hir:: def:: { CtorKind ,  Res } ; 
2019use  rustc_hir:: def_id:: { CrateNum ,  DefId ,  DefIndex } ; 
@@ -882,14 +881,9 @@ impl Attributes {
882881                                    "../" . repeat ( depth) 
883882                                } 
884883                                Some ( & ( _,  _,  ExternalLocation :: Remote ( ref  s) ) )  => s. to_string ( ) , 
885-                                 Some ( & ( _,  _,  ExternalLocation :: Unknown ) )  | None  => String :: from ( 
886-                                     // NOTE: intentionally doesn't pass crate name to avoid having 
887-                                     // different primitive links between crates 
888-                                     if  UnstableFeatures :: from_environment ( None ) . is_nightly_build ( )  { 
889-                                         "https://doc.rust-lang.org/nightly" 
890-                                     }  else  { 
891-                                         "https://doc.rust-lang.org" 
892-                                     } , 
884+                                 Some ( & ( _,  _,  ExternalLocation :: Unknown ) )  | None  => format ! ( 
885+                                     "https://doc.rust-lang.org/{}" , 
886+                                     crate :: doc_rust_lang_org_channel( ) , 
893887                                ) , 
894888                            } ; 
895889                            // This is a primitive so the url is done "by hand". 
0 commit comments