diff options
| author | Michael Goulet <michael@errs.io> | 2024-05-29 22:23:49 -0400 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-06-03 20:36:27 -0400 |
| commit | 273b990554fa2a7efdd975ccf2ef490c6c90cbaf (patch) | |
| tree | 7700d52bda1445d58e4ef5153460c2a37dfd9221 /compiler/rustc_trait_selection/src/solve | |
| parent | 7c52d2db6348b038276198e88a835125849f322e (diff) | |
| download | rust-273b990554fa2a7efdd975ccf2ef490c6c90cbaf.tar.gz rust-273b990554fa2a7efdd975ccf2ef490c6c90cbaf.zip | |
Align Term methods with GenericArg methods
Diffstat (limited to 'compiler/rustc_trait_selection/src/solve')
| -rw-r--r-- | compiler/rustc_trait_selection/src/solve/assembly/structural_traits.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_trait_selection/src/solve/normalizes_to/opaque_types.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_trait_selection/src/solve/assembly/structural_traits.rs b/compiler/rustc_trait_selection/src/solve/assembly/structural_traits.rs index 48acf2a4e99..98f98d9992d 100644 --- a/compiler/rustc_trait_selection/src/solve/assembly/structural_traits.rs +++ b/compiler/rustc_trait_selection/src/solve/assembly/structural_traits.rs @@ -726,7 +726,7 @@ impl<'tcx> TypeFolder<TyCtxt<'tcx>> for ReplaceProjectionWith<'_, 'tcx> { ) .expect("expected to be able to unify goal projection with dyn's projection"), ); - proj.term.ty().unwrap() + proj.term.expect_type() } else { ty.super_fold_with(self) } diff --git a/compiler/rustc_trait_selection/src/solve/normalizes_to/opaque_types.rs b/compiler/rustc_trait_selection/src/solve/normalizes_to/opaque_types.rs index 67ec2f3be48..82464470b2a 100644 --- a/compiler/rustc_trait_selection/src/solve/normalizes_to/opaque_types.rs +++ b/compiler/rustc_trait_selection/src/solve/normalizes_to/opaque_types.rs @@ -17,7 +17,7 @@ impl<'tcx> EvalCtxt<'_, InferCtxt<'tcx>> { ) -> QueryResult<'tcx> { let tcx = self.interner(); let opaque_ty = goal.predicate.alias; - let expected = goal.predicate.term.ty().expect("no such thing as an opaque const"); + let expected = goal.predicate.term.as_type().expect("no such thing as an opaque const"); match (goal.param_env.reveal(), self.solver_mode()) { (Reveal::UserFacing, SolverMode::Normal) => { |
