Skip to content

Commit ab11b43

Browse files
committed
FailureCode::Error0038 is unreachable, so can be removed
1 parent b610ce7 commit ab11b43

File tree

1 file changed

+0
-6
lines changed
  • compiler/rustc_infer/src/infer/error_reporting

1 file changed

+0
-6
lines changed

compiler/rustc_infer/src/infer/error_reporting/mod.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ use crate::errors::TupleTrailingCommaSuggestion;
5454
use crate::infer;
5555
use crate::infer::error_reporting::nice_region_error::find_anon_type::find_anon_type;
5656
use crate::infer::ExpectedFound;
57-
use crate::traits::error_reporting::report_object_safety_error;
5857
use crate::traits::{
5958
IfExpressionCause, MatchExpressionArmCause, ObligationCause, ObligationCauseCode,
6059
PredicateObligation,
@@ -1912,10 +1911,6 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
19121911
let span = trace.cause.span();
19131912
let failure_code = trace.cause.as_failure_code(terr);
19141913
let mut diag = match failure_code {
1915-
FailureCode::Error0038(did) => {
1916-
let violations = self.tcx.object_safety_violations(did);
1917-
report_object_safety_error(self.tcx, span, did, violations)
1918-
}
19191914
FailureCode::Error0317(failure_str) => {
19201915
struct_span_err!(self.tcx.sess, span, E0317, "{}", failure_str)
19211916
}
@@ -2825,7 +2820,6 @@ impl<'tcx> InferCtxt<'tcx> {
28252820
}
28262821

28272822
pub enum FailureCode {
2828-
Error0038(DefId),
28292823
Error0317(&'static str),
28302824
Error0580(&'static str),
28312825
Error0308(&'static str),

0 commit comments

Comments
 (0)