@@ -30,7 +30,7 @@ use rustc_middle::ty::{self, SymbolName, Ty, TyCtxt};
3030use rustc_serialize:: { opaque, Encodable , Encoder , SpecializedEncoder , UseSpecializedEncodable } ;
3131use rustc_session:: config:: CrateType ;
3232use rustc_span:: source_map:: Spanned ;
33- use rustc_span:: symbol:: { kw , sym, Ident , Symbol } ;
33+ use rustc_span:: symbol:: { sym, Ident , Symbol } ;
3434use rustc_span:: { self , ExternalSource , FileName , SourceFile , Span } ;
3535use rustc_target:: abi:: VariantIdx ;
3636use std:: hash:: Hash ;
@@ -1004,18 +1004,12 @@ impl EncodeContext<'tcx> {
10041004 }
10051005 }
10061006
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) ) )
10151009 }
10161010
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 ( ) )
10191013 }
10201014
10211015 fn encode_optimized_mir ( & mut self , def_id : LocalDefId ) {
0 commit comments