@@ -202,8 +202,8 @@ use syntax::source_map::{self, respan};
202
202
use syntax:: util:: move_map:: MoveMap ;
203
203
use syntax:: ptr:: P ;
204
204
use syntax:: symbol:: { Symbol , keywords} ;
205
+ use syntax:: parse:: ParseSess ;
205
206
use syntax_pos:: { DUMMY_SP , Span } ;
206
- use errors:: Handler ;
207
207
208
208
use self :: ty:: { LifetimeBounds , Path , Ptr , PtrTy , Self_ , Ty } ;
209
209
@@ -412,7 +412,7 @@ impl<'a> TraitDef<'a> {
412
412
match * item {
413
413
Annotatable :: Item ( ref item) => {
414
414
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) {
416
416
if let attr:: ReprPacked ( _) = r {
417
417
return true ;
418
418
}
@@ -811,10 +811,10 @@ impl<'a> TraitDef<'a> {
811
811
}
812
812
}
813
813
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 {
815
815
let mut repr_type_name = "isize" ;
816
816
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) {
818
818
repr_type_name = match * r {
819
819
attr:: ReprPacked ( _) | attr:: ReprSimd | attr:: ReprAlign ( _) | attr:: ReprTransparent =>
820
820
continue ,
@@ -1390,7 +1390,7 @@ impl<'a> MethodDef<'a> {
1390
1390
// discriminant_test = __self0_vi == __self1_vi && __self0_vi == __self2_vi && ...
1391
1391
let mut discriminant_test = cx. expr_bool ( sp, true ) ;
1392
1392
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) ;
1394
1394
1395
1395
let mut first_ident = None ;
1396
1396
for ( & ident, self_arg) in vi_idents. iter ( ) . zip ( & self_args) {
0 commit comments