Skip to content

Commit 2cce088

Browse files
committedMay 10, 2024
Auto merge of #124952 - compiler-errors:no-error, r=lcnr
Rename some `FulfillmentErrorCode`/`ObligationCauseCode` variants to be less redundant 1. Rename some `FulfillmentErrorCode` variants. 2. Always use `ObligationCauseCode::` to prefix a code, rather than using a glob import and naming them through `traits::`. 3. Rename some `ObligationCauseCode` variants -- I wasn't particularly thorough with thinking of a new names for these, so could workshop them if necessary. 4. Misc stuff from renaming. r? lcnr
2 parents 6a19a87 + 6f77bfe commit 2cce088

File tree

48 files changed

+432
-393
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+432
-393
lines changed
 

‎compiler/rustc_borrowck/src/diagnostics/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1344,7 +1344,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
13441344
Applicability::MaybeIncorrect,
13451345
);
13461346
for error in errors {
1347-
if let FulfillmentErrorCode::SelectionError(
1347+
if let FulfillmentErrorCode::Select(
13481348
SelectionError::Unimplemented,
13491349
) = error.code
13501350
&& let ty::PredicateKind::Clause(ty::ClauseKind::Trait(

‎compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1283,7 +1283,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> {
12831283
}
12841284
// The type doesn't implement Clone because of unmet obligations.
12851285
for error in errors {
1286-
if let traits::FulfillmentErrorCode::SelectionError(
1286+
if let traits::FulfillmentErrorCode::Select(
12871287
traits::SelectionError::Unimplemented,
12881288
) = error.code
12891289
&& let ty::PredicateKind::Clause(ty::ClauseKind::Trait(

0 commit comments

Comments
 (0)