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<'_> {
1938
1938
fn clean ( & self , cx : & mut DocContext < ' _ > ) -> Vec < Item > {
1939
1939
use hir:: ItemKind ;
1940
1940
1941
- let ( item, renamed) = ( self . hir_item , self . renamed_name ) ;
1941
+ let item = self . hir_item ;
1942
+ let mut name = self . name ( ) . clone ( ) ;
1942
1943
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
+
1944
1945
cx. with_param_env ( def_id, |cx| {
1945
1946
let kind = match item. kind {
1946
1947
ItemKind :: Static ( ty, mutability, body_id) => {
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ impl<'hir> Item<'hir> {
26
26
Self { hir_item, renamed_name, from_glob }
27
27
}
28
28
29
- fn name ( & ' hir self ) -> & ' hir Symbol {
29
+ pub ( crate ) fn name ( & ' hir self ) -> & ' hir Symbol {
30
30
self . renamed_name . as_ref ( ) . unwrap_or ( & self . hir_item . ident . name )
31
31
}
32
32
}
You can’t perform that action at this time.
0 commit comments