File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -1938,9 +1938,10 @@ impl Clean<Vec<Item>> for doctree::Item<'_> {
19381938 fn clean ( & self , cx : & mut DocContext < ' _ > ) -> Vec < Item > {
19391939 use hir:: ItemKind ;
19401940
1941- let ( item, renamed) = ( self . hir_item , self . renamed_name ) ;
1941+ let item = self . hir_item ;
1942+ let mut name = self . name ( ) . clone ( ) ;
19421943 let def_id = item. def_id . to_def_id ( ) ;
1943- let mut name = renamed . unwrap_or_else ( || cx . tcx . hir ( ) . name ( item . hir_id ( ) ) ) ;
1944+
19441945 cx. with_param_env ( def_id, |cx| {
19451946 let kind = match item. kind {
19461947 ItemKind :: Static ( ty, mutability, body_id) => {
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ impl<'hir> Item<'hir> {
2626 Self { hir_item, renamed_name, from_glob }
2727 }
2828
29- fn name ( & ' hir self ) -> & ' hir Symbol {
29+ pub ( crate ) fn name ( & ' hir self ) -> & ' hir Symbol {
3030 self . renamed_name . as_ref ( ) . unwrap_or ( & self . hir_item . ident . name )
3131 }
3232}
You can’t perform that action at this time.
0 commit comments