diff options
| author | bors <bors@rust-lang.org> | 2023-08-08 02:27:38 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-08-08 02:27:38 +0000 |
| commit | 8e7fd551311d424e4e63fa45906a2a928fce96a7 (patch) | |
| tree | d3afa2d901c697b08d0039dee07833fd15f48e47 /compiler/rustc_trait_selection/src | |
| parent | 443c3161dd04f4c1b656a626f9079921bee9c326 (diff) | |
| parent | 07b2c971a1f9a2db803bb93e6751f8a451fc664d (diff) | |
| download | rust-8e7fd551311d424e4e63fa45906a2a928fce96a7.tar.gz rust-8e7fd551311d424e4e63fa45906a2a928fce96a7.zip | |
Auto merge of #114604 - matthiaskrgr:rollup-o1jltfn, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - #114376 (Avoid exporting __rust_alloc_error_handler_should_panic more than once.) - #114413 (Warn when #[macro_export] is applied on decl macros) - #114497 (Revert #98333 "Re-enable atomic loads and stores for all RISC-V targets") - #114500 (Remove arm crypto target feature) - #114566 (Store the laziness of type aliases in their `DefKind`) - #114594 (Structurally normalize weak and inherent in new solver) - #114596 (Rename method in `opt-dist`) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_trait_selection/src')
| -rw-r--r-- | compiler/rustc_trait_selection/src/solve/project_goals.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/structural_normalize.rs | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/compiler/rustc_trait_selection/src/solve/project_goals.rs b/compiler/rustc_trait_selection/src/solve/project_goals.rs index 75cf33d8194..e1980f4d7bb 100644 --- a/compiler/rustc_trait_selection/src/solve/project_goals.rs +++ b/compiler/rustc_trait_selection/src/solve/project_goals.rs @@ -58,7 +58,7 @@ impl<'tcx> EvalCtxt<'_, 'tcx> { } DefKind::AnonConst => self.normalize_anon_const(goal), DefKind::OpaqueTy => self.normalize_opaque_type(goal), - DefKind::TyAlias => self.normalize_weak_type(goal), + DefKind::TyAlias { .. } => self.normalize_weak_type(goal), kind => bug!("unknown DefKind {} in projection goal: {goal:#?}", kind.descr(def_id)), } } diff --git a/compiler/rustc_trait_selection/src/traits/structural_normalize.rs b/compiler/rustc_trait_selection/src/traits/structural_normalize.rs index 84746eba3ec..d3c4dc45923 100644 --- a/compiler/rustc_trait_selection/src/traits/structural_normalize.rs +++ b/compiler/rustc_trait_selection/src/traits/structural_normalize.rs @@ -22,7 +22,9 @@ impl<'tcx> StructurallyNormalizeExt<'tcx> for At<'_, 'tcx> { assert!(!ty.is_ty_var(), "should have resolved vars before calling"); if self.infcx.next_trait_solver() { - while let ty::Alias(ty::Projection, projection_ty) = *ty.kind() { + while let ty::Alias(ty::Projection | ty::Inherent | ty::Weak, projection_ty) = + *ty.kind() + { let new_infer_ty = self.infcx.next_ty_var(TypeVariableOrigin { kind: TypeVariableOriginKind::NormalizeProjectionType, span: self.cause.span, |
