diff options
| author | lcnr <rust@lcnr.de> | 2023-03-14 14:19:06 +0100 |
|---|---|---|
| committer | lcnr <rust@lcnr.de> | 2023-03-21 09:57:20 +0100 |
| commit | 791ce0b7b5d03649bc9014d5b0abb78f3c6f2cfd (patch) | |
| tree | 4a321c50deba262c65a0dc552fbfaca8cc70de14 /compiler/rustc_trait_selection/src/traits/auto_trait.rs | |
| parent | 84c47b8279b39e165dfebeb529eb6d92592e4f8d (diff) | |
| download | rust-791ce0b7b5d03649bc9014d5b0abb78f3c6f2cfd.tar.gz rust-791ce0b7b5d03649bc9014d5b0abb78f3c6f2cfd.zip | |
remove some trait solver helpers
they add more complexity then they are worth. It's confusing which of these helpers should be used in which context.
Diffstat (limited to 'compiler/rustc_trait_selection/src/traits/auto_trait.rs')
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/auto_trait.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/auto_trait.rs b/compiler/rustc_trait_selection/src/traits/auto_trait.rs index 1870d3a2daf..dbf6775afc2 100644 --- a/compiler/rustc_trait_selection/src/traits/auto_trait.rs +++ b/compiler/rustc_trait_selection/src/traits/auto_trait.rs @@ -180,8 +180,9 @@ impl<'tcx> AutoTraitFinder<'tcx> { // At this point, we already have all of the bounds we need. FulfillmentContext is used // to store all of the necessary region/lifetime bounds in the InferContext, as well as // an additional sanity check. - let errors = - super::fully_solve_bound(&infcx, ObligationCause::dummy(), full_env, ty, trait_did); + let ocx = ObligationCtxt::new(&infcx); + ocx.register_bound(ObligationCause::dummy(), full_env, ty, trait_did); + let errors = ocx.select_all_or_error(); if !errors.is_empty() { panic!("Unable to fulfill trait {:?} for '{:?}': {:?}", trait_did, ty, errors); } |
