@@ -202,8 +202,8 @@ use syntax::source_map::{self, respan};
202202use syntax:: util:: move_map:: MoveMap ;
203203use syntax:: ptr:: P ;
204204use syntax:: symbol:: { Symbol , keywords} ;
205+ use syntax:: parse:: ParseSess ;
205206use syntax_pos:: { DUMMY_SP , Span } ;
206- use errors:: Handler ;
207207
208208use self :: ty:: { LifetimeBounds , Path , Ptr , PtrTy , Self_ , Ty } ;
209209
@@ -412,7 +412,7 @@ impl<'a> TraitDef<'a> {
412412 match * item {
413413 Annotatable :: Item ( ref item) => {
414414 let is_packed = item. attrs . iter ( ) . any ( |attr| {
415- for r in attr:: find_repr_attrs ( & cx. parse_sess . span_diagnostic , attr) {
415+ for r in attr:: find_repr_attrs ( & cx. parse_sess , attr) {
416416 if let attr:: ReprPacked ( _) = r {
417417 return true ;
418418 }
@@ -811,10 +811,10 @@ impl<'a> TraitDef<'a> {
811811 }
812812}
813813
814- fn find_repr_type_name ( diagnostic : & Handler , type_attrs : & [ ast:: Attribute ] ) -> & ' static str {
814+ fn find_repr_type_name ( sess : & ParseSess , type_attrs : & [ ast:: Attribute ] ) -> & ' static str {
815815 let mut repr_type_name = "isize" ;
816816 for a in type_attrs {
817- for r in & attr:: find_repr_attrs ( diagnostic , a) {
817+ for r in & attr:: find_repr_attrs ( sess , a) {
818818 repr_type_name = match * r {
819819 attr:: ReprPacked ( _) | attr:: ReprSimd | attr:: ReprAlign ( _) | attr:: ReprTransparent =>
820820 continue ,
@@ -1390,7 +1390,7 @@ impl<'a> MethodDef<'a> {
13901390 // discriminant_test = __self0_vi == __self1_vi && __self0_vi == __self2_vi && ...
13911391 let mut discriminant_test = cx. expr_bool ( sp, true ) ;
13921392
1393- let target_type_name = find_repr_type_name ( & cx. parse_sess . span_diagnostic , type_attrs) ;
1393+ let target_type_name = find_repr_type_name ( & cx. parse_sess , type_attrs) ;
13941394
13951395 let mut first_ident = None ;
13961396 for ( & ident, self_arg) in vi_idents. iter ( ) . zip ( & self_args) {
0 commit comments