@@ -15,7 +15,7 @@ use rustc_middle::hir::nested_filter;
1515use rustc_middle:: traits:: Reveal ;
1616use rustc_middle:: ty:: {
1717 self , Binder , BoundConstness , GenericParamDefKind , ImplPolarity , ParamEnv , PredicateKind , TraitPredicate , TraitRef ,
18- Ty , TyCtxt , Visibility ,
18+ Ty , TyCtxt ,
1919} ;
2020use rustc_session:: { declare_lint_pass, declare_tool_lint} ;
2121use rustc_span:: source_map:: Span ;
@@ -425,7 +425,7 @@ struct UnsafeVisitor<'a, 'tcx> {
425425impl < ' tcx > Visitor < ' tcx > for UnsafeVisitor < ' _ , ' tcx > {
426426 type NestedFilter = nested_filter:: All ;
427427
428- fn visit_fn ( & mut self , kind : FnKind < ' tcx > , decl : & ' tcx FnDecl < ' _ > , body_id : BodyId , span : Span , id : HirId ) {
428+ fn visit_fn ( & mut self , kind : FnKind < ' tcx > , decl : & ' tcx FnDecl < ' _ > , body_id : BodyId , _ : Span , id : HirId ) {
429429 if self . has_unsafe {
430430 return ;
431431 }
@@ -438,7 +438,7 @@ impl<'tcx> Visitor<'tcx> for UnsafeVisitor<'_, 'tcx> {
438438 }
439439 }
440440
441- walk_fn ( self , kind, decl, body_id, span , id) ;
441+ walk_fn ( self , kind, decl, body_id, id) ;
442442 }
443443
444444 fn visit_expr ( & mut self , expr : & ' tcx Expr < ' _ > ) {
@@ -464,7 +464,7 @@ impl<'tcx> Visitor<'tcx> for UnsafeVisitor<'_, 'tcx> {
464464fn check_partial_eq_without_eq < ' tcx > ( cx : & LateContext < ' tcx > , span : Span , trait_ref : & hir:: TraitRef < ' _ > , ty : Ty < ' tcx > ) {
465465 if_chain ! {
466466 if let ty:: Adt ( adt, substs) = ty. kind( ) ;
467- if cx. tcx. visibility( adt. did( ) ) == Visibility :: Public ;
467+ if cx. tcx. visibility( adt. did( ) ) . is_public ( ) ;
468468 if let Some ( eq_trait_def_id) = cx. tcx. get_diagnostic_item( sym:: Eq ) ;
469469 if let Some ( def_id) = trait_ref. trait_def_id( ) ;
470470 if cx. tcx. is_diagnostic_item( sym:: PartialEq , def_id) ;
0 commit comments