@@ -30,7 +30,7 @@ use rustc_middle::ty::{self, SymbolName, Ty, TyCtxt};
3030use rustc_serialize:: { opaque, Encodable , Encoder , SpecializedEncoder } ;
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 ;
@@ -997,18 +997,12 @@ impl EncodeContext<'tcx> {
997997 }
998998 }
999999
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) ) )
10081002 }
10091003
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 ( ) )
10121006 }
10131007
10141008 fn encode_optimized_mir ( & mut self , def_id : LocalDefId ) {
0 commit comments