@@ -30,7 +30,7 @@ use rustc_middle::ty::{self, SymbolName, Ty, TyCtxt};
30
30
use rustc_serialize:: { opaque, Encodable , Encoder , SpecializedEncoder , UseSpecializedEncodable } ;
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 ;
@@ -1004,18 +1004,12 @@ impl EncodeContext<'tcx> {
1004
1004
}
1005
1005
}
1006
1006
1007
- fn encode_fn_param_names_for_body ( & mut self , body_id : hir:: BodyId ) -> Lazy < [ Symbol ] > {
1008
- self . tcx . dep_graph . with_ignore ( || {
1009
- let body = self . tcx . hir ( ) . body ( body_id) ;
1010
- self . lazy ( body. params . iter ( ) . map ( |arg| match arg. pat . kind {
1011
- hir:: PatKind :: Binding ( _, _, ident, _) => ident. name ,
1012
- _ => kw:: Invalid ,
1013
- } ) )
1014
- } )
1007
+ fn encode_fn_param_names_for_body ( & mut self , body_id : hir:: BodyId ) -> Lazy < [ Ident ] > {
1008
+ self . tcx . dep_graph . with_ignore ( || self . lazy ( self . tcx . hir ( ) . body_param_names ( body_id) ) )
1015
1009
}
1016
1010
1017
- fn encode_fn_param_names ( & mut self , param_names : & [ Ident ] ) -> Lazy < [ Symbol ] > {
1018
- self . lazy ( param_names. iter ( ) . map ( |ident| ident . name ) )
1011
+ fn encode_fn_param_names ( & mut self , param_names : & [ Ident ] ) -> Lazy < [ Ident ] > {
1012
+ self . lazy ( param_names. iter ( ) )
1019
1013
}
1020
1014
1021
1015
fn encode_optimized_mir ( & mut self , def_id : LocalDefId ) {
0 commit comments