@@ -14,7 +14,6 @@ use rustc::ty::{self, Ty, TyCtxt, TyKind};
1414use rustc:: ty:: subst:: { InternalSubsts , SubstsRef } ;
1515use rustc:: lint;
1616use rustc_errors:: { Applicability , DiagnosticBuilder } ;
17- use rustc:: util:: common:: ErrorReported ;
1817
1918use rustc:: hir:: def:: * ;
2019use rustc:: hir:: def_id:: DefId ;
@@ -27,14 +26,11 @@ use std::slice;
2726use syntax:: ptr:: P ;
2827use syntax_pos:: { Span , DUMMY_SP , MultiSpan } ;
2928
30- pub ( crate ) fn check_match < ' a , ' tcx > (
31- tcx : TyCtxt < ' a , ' tcx , ' tcx > ,
32- def_id : DefId ,
33- ) -> Result < ( ) , ErrorReported > {
29+ pub ( crate ) fn check_match < ' a , ' tcx > ( tcx : TyCtxt < ' a , ' tcx , ' tcx > , def_id : DefId ) {
3430 let body_id = if let Some ( id) = tcx. hir ( ) . as_local_hir_id ( def_id) {
3531 tcx. hir ( ) . body_owned_by ( id)
3632 } else {
37- return Ok ( ( ) ) ;
33+ return ;
3834 } ;
3935
4036 MatchVisitor {
@@ -44,7 +40,6 @@ pub(crate) fn check_match<'a, 'tcx>(
4440 param_env : tcx. param_env ( def_id) ,
4541 identity_substs : InternalSubsts :: identity_for_item ( tcx, def_id) ,
4642 } . visit_body ( tcx. hir ( ) . body ( body_id) ) ;
47- Ok ( ( ) )
4843}
4944
5045fn create_e0004 < ' a > ( sess : & ' a Session , sp : Span , error_message : String ) -> DiagnosticBuilder < ' a > {
0 commit comments