Skip to content

Commit f53f5b4

Browse files
swap Ambiguity and Unimplemented in new trait engine
1 parent aee75f2 commit f53f5b4

File tree

1 file changed

+4
-2
lines changed
  • compiler/rustc_trait_selection/src/solve

1 file changed

+4
-2
lines changed

compiler/rustc_trait_selection/src/solve/fulfill.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ impl<'tcx> TraitEngine<'tcx> for FulfillmentCtxt<'tcx> {
5252
.drain(..)
5353
.map(|obligation| FulfillmentError {
5454
obligation: obligation.clone(),
55-
code: FulfillmentErrorCode::CodeSelectionError(SelectionError::Unimplemented),
55+
code: FulfillmentErrorCode::CodeAmbiguity,
5656
root_obligation: obligation,
5757
})
5858
.collect()
@@ -75,7 +75,9 @@ impl<'tcx> TraitEngine<'tcx> for FulfillmentCtxt<'tcx> {
7575
Err(NoSolution) => {
7676
errors.push(FulfillmentError {
7777
obligation: obligation.clone(),
78-
code: FulfillmentErrorCode::CodeAmbiguity,
78+
code: FulfillmentErrorCode::CodeSelectionError(
79+
SelectionError::Unimplemented,
80+
),
7981
root_obligation: obligation,
8082
});
8183
continue;

0 commit comments

Comments
 (0)