@@ -55,18 +55,6 @@ impl<'tcx> UniverseInfo<'tcx> {
55
55
placeholder : ty:: PlaceholderRegion ,
56
56
cause : ObligationCause < ' tcx > ,
57
57
error_element : Option < ty:: PlaceholderRegion > ,
58
- ) {
59
- if let UniverseInfo :: TypeOp ( ref type_op_info) = * self {
60
- type_op_info. report_erroneous_element ( mbcx, placeholder, cause, error_element) ;
61
- } else {
62
- self . report_generic_error ( mbcx, cause) ;
63
- }
64
- }
65
-
66
- fn report_generic_error (
67
- & self ,
68
- mbcx : & mut MirBorrowckCtxt < ' _ , ' _ , ' tcx > ,
69
- cause : ObligationCause < ' tcx > ,
70
58
) {
71
59
match * self {
72
60
UniverseInfo :: RelateTys { expected, found } => {
@@ -79,8 +67,8 @@ impl<'tcx> UniverseInfo<'tcx> {
79
67
) ;
80
68
mbcx. buffer_error ( err) ;
81
69
}
82
- UniverseInfo :: TypeOp ( _ ) => {
83
- unreachable ! ( "This case should already have been handled!" ) ;
70
+ UniverseInfo :: TypeOp ( ref type_op_info ) => {
71
+ type_op_info . report_erroneous_element ( mbcx , placeholder , cause , error_element ) ;
84
72
}
85
73
UniverseInfo :: Other => {
86
74
// FIXME: This error message isn't great, but it doesn't show
0 commit comments