diff options
| author | Michael Goulet <michael@errs.io> | 2023-01-19 04:50:14 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2023-01-19 16:15:28 +0000 |
| commit | f53f5b4463a28b44d036342f0a849390495f6a9b (patch) | |
| tree | d0352d3fd5dfe39fdb7b3ffa772962a35b00b328 | |
| parent | aee75f25cbfb187f74d2b8453b0d902ad6ced391 (diff) | |
| download | rust-f53f5b4463a28b44d036342f0a849390495f6a9b.tar.gz rust-f53f5b4463a28b44d036342f0a849390495f6a9b.zip | |
swap Ambiguity and Unimplemented in new trait engine
| -rw-r--r-- | compiler/rustc_trait_selection/src/solve/fulfill.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/rustc_trait_selection/src/solve/fulfill.rs b/compiler/rustc_trait_selection/src/solve/fulfill.rs index b086c0684d2..a6240666ed4 100644 --- a/compiler/rustc_trait_selection/src/solve/fulfill.rs +++ b/compiler/rustc_trait_selection/src/solve/fulfill.rs @@ -52,7 +52,7 @@ impl<'tcx> TraitEngine<'tcx> for FulfillmentCtxt<'tcx> { .drain(..) .map(|obligation| FulfillmentError { obligation: obligation.clone(), - code: FulfillmentErrorCode::CodeSelectionError(SelectionError::Unimplemented), + code: FulfillmentErrorCode::CodeAmbiguity, root_obligation: obligation, }) .collect() @@ -75,7 +75,9 @@ impl<'tcx> TraitEngine<'tcx> for FulfillmentCtxt<'tcx> { Err(NoSolution) => { errors.push(FulfillmentError { obligation: obligation.clone(), - code: FulfillmentErrorCode::CodeAmbiguity, + code: FulfillmentErrorCode::CodeSelectionError( + SelectionError::Unimplemented, + ), root_obligation: obligation, }); continue; |
