Skip to content

Commit 3018167

Browse files
Remove some more unused codepaths in (region) error reporting
1 parent af8b197 commit 3018167

File tree

2 files changed

+2
-7
lines changed
  • compiler
    • rustc_infer/src/infer/error_reporting
    • rustc_middle/src/traits

2 files changed

+2
-7
lines changed

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

-6
Original file line numberDiff line numberDiff line change
@@ -2909,9 +2909,6 @@ impl<'tcx> ObligationCauseExt<'tcx> for ObligationCause<'tcx> {
29092909
CompareImplItemObligation { kind: ty::AssocKind::Const, .. } => {
29102910
"const is compatible with trait"
29112911
}
2912-
ExprAssignable => "expression is assignable",
2913-
IfExpression { .. } => "`if` and `else` have incompatible types",
2914-
IfExpressionWithNoElse => "`if` missing an `else` returns `()`",
29152912
MainFunctionType => "`main` function has the correct type",
29162913
StartFunctionType => "`#[start]` function has the correct type",
29172914
LangFunctionType(_) => "lang item function has the correct type",
@@ -2932,9 +2929,6 @@ impl IntoDiagnosticArg for ObligationCauseAsDiagArg<'_> {
29322929
CompareImplItemObligation { kind: ty::AssocKind::Fn, .. } => "method_compat",
29332930
CompareImplItemObligation { kind: ty::AssocKind::Type, .. } => "type_compat",
29342931
CompareImplItemObligation { kind: ty::AssocKind::Const, .. } => "const_compat",
2935-
ExprAssignable => "expr_assignable",
2936-
IfExpression { .. } => "if_else_different",
2937-
IfExpressionWithNoElse => "no_else",
29382932
MainFunctionType => "fn_main_correct_type",
29392933
StartFunctionType => "fn_start_correct_type",
29402934
LangFunctionType(_) => "fn_lang_correct_type",

compiler/rustc_middle/src/traits/mod.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,8 @@ pub enum ObligationCauseCode<'tcx> {
340340
parent_code: InternedObligationCauseCode<'tcx>,
341341
},
342342

343-
/// Error derived when matching traits/impls; see ObligationCause for more details
343+
/// Error derived when checking an impl item is compatible with
344+
/// its corresponding trait item's definition
344345
CompareImplItemObligation {
345346
impl_item_def_id: LocalDefId,
346347
trait_item_def_id: DefId,

0 commit comments

Comments
 (0)