@@ -30,7 +30,7 @@ use rustc_middle::ty::{self, SymbolName, Ty, TyCtxt};
30
30
use rustc_serialize:: { opaque, Encodable , Encoder , SpecializedEncoder } ;
31
31
use rustc_session:: config:: CrateType ;
32
32
use rustc_span:: source_map:: Spanned ;
33
- use rustc_span:: symbol:: { kw , sym, Ident , Symbol } ;
33
+ use rustc_span:: symbol:: { sym, Ident , Symbol } ;
34
34
use rustc_span:: { self , ExternalSource , FileName , SourceFile , Span } ;
35
35
use rustc_target:: abi:: VariantIdx ;
36
36
use std:: hash:: Hash ;
@@ -997,18 +997,12 @@ impl EncodeContext<'tcx> {
997
997
}
998
998
}
999
999
1000
- fn encode_fn_param_names_for_body ( & mut self , body_id : hir:: BodyId ) -> Lazy < [ Symbol ] > {
1001
- self . tcx . dep_graph . with_ignore ( || {
1002
- let body = self . tcx . hir ( ) . body ( body_id) ;
1003
- self . lazy ( body. params . iter ( ) . map ( |arg| match arg. pat . kind {
1004
- hir:: PatKind :: Binding ( _, _, ident, _) => ident. name ,
1005
- _ => kw:: Invalid ,
1006
- } ) )
1007
- } )
1000
+ fn encode_fn_param_names_for_body ( & mut self , body_id : hir:: BodyId ) -> Lazy < [ Ident ] > {
1001
+ self . tcx . dep_graph . with_ignore ( || self . lazy ( self . tcx . hir ( ) . body_param_names ( body_id) ) )
1008
1002
}
1009
1003
1010
- fn encode_fn_param_names ( & mut self , param_names : & [ Ident ] ) -> Lazy < [ Symbol ] > {
1011
- self . lazy ( param_names. iter ( ) . map ( |ident| ident . name ) )
1004
+ fn encode_fn_param_names ( & mut self , param_names : & [ Ident ] ) -> Lazy < [ Ident ] > {
1005
+ self . lazy ( param_names. iter ( ) )
1012
1006
}
1013
1007
1014
1008
fn encode_optimized_mir ( & mut self , def_id : LocalDefId ) {
0 commit comments