Skip to content

Commit d095938

Browse files
committed
Remove weak alias terminology
1 parent 7f69523 commit d095938

File tree

46 files changed

+104
-104
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+104
-104
lines changed

compiler/rustc_const_eval/src/util/type_name.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ impl<'tcx> Printer<'tcx> for AbsolutePathPrinter<'tcx> {
5656
| ty::Coroutine(def_id, args) => self.print_def_path(def_id, args),
5757
ty::Foreign(def_id) => self.print_def_path(def_id, &[]),
5858

59-
ty::Alias(ty::Weak, _) => bug!("type_name: unexpected weak projection"),
59+
ty::Alias(ty::Free, _) => bug!("type_name: unexpected weak projection"),
6060
ty::Alias(ty::Inherent, _) => bug!("type_name: unexpected inherent projection"),
6161
ty::CoroutineWitness(..) => bug!("type_name: unexpected `CoroutineWitness`"),
6262
}

compiler/rustc_hir_analysis/src/check/wfcheck.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1991,7 +1991,7 @@ fn check_variances_for_type_defn<'tcx>(
19911991
ItemKind::TyAlias(..) => {
19921992
assert!(
19931993
tcx.type_alias_is_lazy(item.owner_id),
1994-
"should not be computing variance of non-weak type alias"
1994+
"should not be computing variance of non-free type alias"
19951995
);
19961996
}
19971997
kind => span_bug!(item.span, "cannot compute the variances of {kind:?}"),
@@ -2223,7 +2223,7 @@ impl<'tcx> TypeVisitor<TyCtxt<'tcx>> for IsProbablyCyclical<'tcx> {
22232223
fn visit_ty(&mut self, ty: Ty<'tcx>) -> ControlFlow<(), ()> {
22242224
let def_id = match ty.kind() {
22252225
ty::Adt(adt_def, _) => Some(adt_def.did()),
2226-
ty::Alias(ty::Weak, alias_ty) => Some(alias_ty.def_id),
2226+
ty::Alias(ty::Free, alias_ty) => Some(alias_ty.def_id),
22272227
_ => None,
22282228
};
22292229
if let Some(def_id) = def_id {

compiler/rustc_hir_analysis/src/coherence/inherent_impls.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ impl<'tcx> InherentCollect<'tcx> {
150150
let id = id.owner_id.def_id;
151151
let item_span = self.tcx.def_span(id);
152152
let self_ty = self.tcx.type_of(id).instantiate_identity();
153-
let mut self_ty = self.tcx.peel_off_weak_alias_tys(self_ty);
153+
let mut self_ty = self.tcx.peel_off_free_alias_tys(self_ty);
154154
// We allow impls on pattern types exactly when we allow impls on the base type.
155155
// FIXME(pattern_types): Figure out the exact coherence rules we want here.
156156
while let ty::Pat(base, _) = *self_ty.kind() {
@@ -188,7 +188,7 @@ impl<'tcx> InherentCollect<'tcx> {
188188
| ty::CoroutineClosure(..)
189189
| ty::Coroutine(..)
190190
| ty::CoroutineWitness(..)
191-
| ty::Alias(ty::Weak, _)
191+
| ty::Alias(ty::Free, _)
192192
| ty::Bound(..)
193193
| ty::Placeholder(_)
194194
| ty::Infer(_) => {

compiler/rustc_hir_analysis/src/coherence/orphan.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ pub(crate) fn orphan_check_impl(
189189
ty::Projection => "associated type",
190190
// type Foo = (impl Sized, bool)
191191
// impl AutoTrait for Foo {}
192-
ty::Weak => "type alias",
192+
ty::Free => "type alias",
193193
// type Opaque = impl Trait;
194194
// impl AutoTrait for Opaque {}
195195
ty::Opaque => "opaque type",

compiler/rustc_hir_analysis/src/constrained_generic_params.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ pub(crate) fn parameters_for<'tcx>(
4949
include_nonconstraining: bool,
5050
) -> Vec<Parameter> {
5151
let mut collector = ParameterCollector { parameters: vec![], include_nonconstraining };
52-
let value = if !include_nonconstraining { tcx.expand_weak_alias_tys(value) } else { value };
52+
let value = if !include_nonconstraining { tcx.expand_free_alias_tys(value) } else { value };
5353
value.visit_with(&mut collector);
5454
collector.parameters
5555
}
@@ -68,9 +68,9 @@ impl<'tcx> TypeVisitor<TyCtxt<'tcx>> for ParameterCollector {
6868
{
6969
return;
7070
}
71-
// All weak alias types should've been expanded beforehand.
72-
ty::Alias(ty::Weak, _) if !self.include_nonconstraining => {
73-
bug!("unexpected weak alias type")
71+
// All free alias types should've been expanded beforehand.
72+
ty::Alias(ty::Free, _) if !self.include_nonconstraining => {
73+
bug!("unexpected free alias type")
7474
}
7575
ty::Param(param) => self.parameters.push(Parameter::from(param)),
7676
_ => {}

compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -958,7 +958,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
958958
// feature `lazy_type_alias` enabled get encoded as a type alias that normalization will
959959
// then actually instantiate the where bounds of.
960960
let alias_ty = ty::AliasTy::new_from_args(tcx, did, args);
961-
Ty::new_alias(tcx, ty::Weak, alias_ty)
961+
Ty::new_alias(tcx, ty::Free, alias_ty)
962962
} else {
963963
tcx.at(span).type_of(did).instantiate(tcx, args)
964964
}

compiler/rustc_hir_analysis/src/outlives/implicit_infer.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,10 @@ fn insert_required_predicates_to_be_wf<'tcx>(
157157
);
158158
}
159159

160-
ty::Alias(ty::Weak, alias) => {
160+
ty::Alias(ty::Free, alias) => {
161161
// This corresponds to a type like `Type<'a, T>`.
162162
// We check inferred and explicit predicates.
163-
debug!("Weak");
163+
debug!("Free");
164164
check_inferred_predicates(
165165
tcx,
166166
alias.def_id,

compiler/rustc_hir_analysis/src/variance/constraints.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ impl<'a, 'tcx> ConstraintContext<'a, 'tcx> {
107107
let current_item = &CurrentItem { inferred_start };
108108
let ty = tcx.type_of(def_id).instantiate_identity();
109109

110-
// The type as returned by `type_of` is the underlying type and generally not a weak projection.
110+
// The type as returned by `type_of` is the underlying type and generally not a free alias.
111111
// Therefore we need to check the `DefKind` first.
112112
if let DefKind::TyAlias = tcx.def_kind(def_id)
113113
&& tcx.type_alias_is_lazy(def_id)
@@ -282,7 +282,7 @@ impl<'a, 'tcx> ConstraintContext<'a, 'tcx> {
282282
self.add_constraints_from_invariant_args(current, data.args, variance);
283283
}
284284

285-
ty::Alias(ty::Weak, ref data) => {
285+
ty::Alias(ty::Free, ref data) => {
286286
self.add_constraints_from_args(current, data.def_id, data.args, variance);
287287
}
288288

compiler/rustc_hir_typeck/src/fn_ctxt/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ impl<'tcx> HirTyLowerer<'tcx> for FnCtxt<'_, 'tcx> {
337337
match ty.kind() {
338338
ty::Adt(adt_def, _) => Some(*adt_def),
339339
// FIXME(#104767): Should we handle bound regions here?
340-
ty::Alias(ty::Projection | ty::Inherent | ty::Weak, _)
340+
ty::Alias(ty::Projection | ty::Inherent | ty::Free, _)
341341
if !ty.has_escaping_bound_vars() =>
342342
{
343343
if self.next_trait_solver() {
@@ -357,7 +357,7 @@ impl<'tcx> HirTyLowerer<'tcx> for FnCtxt<'_, 'tcx> {
357357
// WF obligations that are registered elsewhere, but they have a
358358
// better cause code assigned to them in `add_required_obligations_for_hir`.
359359
// This means that they should shadow obligations with worse spans.
360-
if let ty::Alias(ty::Projection | ty::Weak, ty::AliasTy { args, def_id, .. }) =
360+
if let ty::Alias(ty::Projection | ty::Free, ty::AliasTy { args, def_id, .. }) =
361361
ty.kind()
362362
{
363363
self.add_required_obligations_for_hir(span, *def_id, args, hir_id);

compiler/rustc_infer/src/infer/relate/generalize.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ impl<'tcx> InferCtxt<'tcx> {
113113
}]);
114114
}
115115
// The old solver only accepts projection predicates for associated types.
116-
ty::Alias(ty::Inherent | ty::Weak | ty::Opaque, _) => {
116+
ty::Alias(ty::Inherent | ty::Free | ty::Opaque, _) => {
117117
return Err(TypeError::CyclicTy(source_ty));
118118
}
119119
_ => bug!("generalized `{source_ty:?} to infer, not an alias"),

compiler/rustc_lint/src/types.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1371,7 +1371,7 @@ impl<'a, 'tcx> ImproperCTypesVisitor<'a, 'tcx> {
13711371
ty::UnsafeBinder(_) => todo!("FIXME(unsafe_binder)"),
13721372

13731373
ty::Param(..)
1374-
| ty::Alias(ty::Projection | ty::Inherent | ty::Weak, ..)
1374+
| ty::Alias(ty::Projection | ty::Inherent | ty::Free, ..)
13751375
| ty::Infer(..)
13761376
| ty::Bound(..)
13771377
| ty::Error(_)

compiler/rustc_middle/src/query/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ rustc_queries! {
289289

290290
/// Returns whether the type alias given by `DefId` is lazy.
291291
///
292-
/// I.e., if the type alias expands / ought to expand to a [weak] [alias type]
292+
/// I.e., if the type alias expands / ought to expand to a [free] [alias type]
293293
/// instead of the underyling aliased type.
294294
///
295295
/// Relevant for features `lazy_type_alias` and `type_alias_impl_trait`.
@@ -298,7 +298,7 @@ rustc_queries! {
298298
///
299299
/// This query *may* panic if the given definition is not a type alias.
300300
///
301-
/// [weak]: rustc_middle::ty::Weak
301+
/// [free]: rustc_middle::ty::Free
302302
/// [alias type]: rustc_middle::ty::AliasTy
303303
query type_alias_is_lazy(key: DefId) -> bool {
304304
desc { |tcx|
@@ -2280,7 +2280,7 @@ rustc_queries! {
22802280
/// Do not call this query directly: Invoke `normalize` instead.
22812281
///
22822282
/// </div>
2283-
query normalize_canonicalized_weak_ty(
2283+
query normalize_canonicalized_free_alias(
22842284
goal: CanonicalAliasGoal<'tcx>
22852285
) -> Result<
22862286
&'tcx Canonical<'tcx, canonical::QueryResponse<'tcx, NormalizationResult<'tcx>>>,

compiler/rustc_middle/src/traits/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ pub enum ObligationCauseCode<'tcx> {
404404
/// Requirement for a `const N: Ty` to implement `Ty: ConstParamTy`
405405
ConstParam(Ty<'tcx>),
406406

407-
/// Obligations emitted during the normalization of a weak type alias.
407+
/// Obligations emitted during the normalization of a free type alias.
408408
TypeAlias(ObligationCauseCodeHandle<'tcx>, Span, DefId),
409409
}
410410

compiler/rustc_middle/src/traits/query.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ pub struct MethodAutoderefBadTy<'tcx> {
181181
pub ty: Canonical<'tcx, QueryResponse<'tcx, Ty<'tcx>>>,
182182
}
183183

184-
/// Result of the `normalize_canonicalized_{{,inherent_}projection,weak}_ty` queries.
184+
/// Result of the `normalize_canonicalized_{{,inherent_}projection,free}_ty` queries.
185185
#[derive(Clone, Debug, HashStable, TypeFoldable, TypeVisitable)]
186186
pub struct NormalizationResult<'tcx> {
187187
/// Result of the normalization.

compiler/rustc_middle/src/ty/context.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ impl<'tcx> Interner for TyCtxt<'tcx> {
226226
}
227227
}
228228
DefKind::OpaqueTy => ty::Opaque,
229-
DefKind::TyAlias => ty::Weak,
229+
DefKind::TyAlias => ty::Free,
230230
kind => bug!("unexpected DefKind in AliasTy: {kind:?}"),
231231
}
232232
}
@@ -242,7 +242,7 @@ impl<'tcx> Interner for TyCtxt<'tcx> {
242242
}
243243
}
244244
DefKind::OpaqueTy => ty::AliasTermKind::OpaqueTy,
245-
DefKind::TyAlias => ty::AliasTermKind::WeakTy,
245+
DefKind::TyAlias => ty::AliasTermKind::FreeTy,
246246
DefKind::AssocConst => ty::AliasTermKind::ProjectionConst,
247247
DefKind::AnonConst | DefKind::Const | DefKind::Ctor(_, CtorKind::Const) => {
248248
ty::AliasTermKind::UnevaluatedConst

compiler/rustc_middle/src/ty/error.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ impl<'tcx> Ty<'tcx> {
205205
ty::Placeholder(..) => "higher-ranked type".into(),
206206
ty::Bound(..) => "bound type variable".into(),
207207
ty::Alias(ty::Projection | ty::Inherent, _) => "associated type".into(),
208-
ty::Alias(ty::Weak, _) => "type alias".into(),
208+
ty::Alias(ty::Free, _) => "type alias".into(),
209209
ty::Param(_) => "type parameter".into(),
210210
ty::Alias(ty::Opaque, ..) => "opaque type".into(),
211211
}

compiler/rustc_middle/src/ty/inhabitedness/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ impl<'tcx> Ty<'tcx> {
127127
InhabitedPredicate::True
128128
}
129129
Never => InhabitedPredicate::False,
130-
Param(_) | Alias(ty::Projection | ty::Weak, _) => InhabitedPredicate::GenericType(self),
130+
Param(_) | Alias(ty::Projection | ty::Free, _) => InhabitedPredicate::GenericType(self),
131131
Alias(ty::Opaque, alias_ty) => {
132132
match alias_ty.def_id.as_local() {
133133
// Foreign opaque is considered inhabited.

compiler/rustc_middle/src/ty/print/pretty.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -820,7 +820,7 @@ pub trait PrettyPrinter<'tcx>: Printer<'tcx> + fmt::Write {
820820
ty::Foreign(def_id) => {
821821
p!(print_def_path(def_id, &[]));
822822
}
823-
ty::Alias(ty::Projection | ty::Inherent | ty::Weak, ref data) => {
823+
ty::Alias(ty::Projection | ty::Inherent | ty::Free, ref data) => {
824824
p!(print(data))
825825
}
826826
ty::Placeholder(placeholder) => match placeholder.bound.kind {
@@ -3205,7 +3205,7 @@ define_print! {
32053205
p!(print_def_path(self.def_id, self.args));
32063206
}
32073207
}
3208-
| ty::AliasTermKind::WeakTy
3208+
| ty::AliasTermKind::FreeTy
32093209
| ty::AliasTermKind::OpaqueTy
32103210
| ty::AliasTermKind::UnevaluatedConst
32113211
| ty::AliasTermKind::ProjectionConst => {

compiler/rustc_middle/src/ty/sty.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ impl<'tcx> Ty<'tcx> {
489489
(kind, tcx.def_kind(alias_ty.def_id)),
490490
(ty::Opaque, DefKind::OpaqueTy)
491491
| (ty::Projection | ty::Inherent, DefKind::AssocTy)
492-
| (ty::Weak, DefKind::TyAlias)
492+
| (ty::Free, DefKind::TyAlias)
493493
);
494494
Ty::new(tcx, Alias(kind, alias_ty))
495495
}

compiler/rustc_middle/src/ty/util.rs

+21-21
Original file line numberDiff line numberDiff line change
@@ -911,7 +911,7 @@ impl<'tcx> TyCtxt<'tcx> {
911911
|| self.extern_crate(key).is_some_and(|e| e.is_direct())
912912
}
913913

914-
/// Expand any [weak alias types][weak] contained within the given `value`.
914+
/// Expand any [free alias types][free] contained within the given `value`.
915915
///
916916
/// This should be used over other normalization routines in situations where
917917
/// it's important not to normalize other alias types and where the predicates
@@ -926,19 +926,19 @@ impl<'tcx> TyCtxt<'tcx> {
926926
/// <div class="warning">
927927
/// This delays a bug on overflow! Therefore you need to be certain that the
928928
/// contained types get fully normalized at a later stage. Note that even on
929-
/// overflow all well-behaved weak alias types get expanded correctly, so the
929+
/// overflow all well-behaved free alias types get expanded correctly, so the
930930
/// result is still useful.
931931
/// </div>
932932
///
933-
/// [weak]: ty::Weak
934-
pub fn expand_weak_alias_tys<T: TypeFoldable<TyCtxt<'tcx>>>(self, value: T) -> T {
935-
value.fold_with(&mut WeakAliasTypeExpander { tcx: self, depth: 0 })
933+
/// [free]: ty::Free
934+
pub fn expand_free_alias_tys<T: TypeFoldable<TyCtxt<'tcx>>>(self, value: T) -> T {
935+
value.fold_with(&mut FreeAliasTypeExpander { tcx: self, depth: 0 })
936936
}
937937

938-
/// Peel off all [weak alias types] in this type until there are none left.
938+
/// Peel off all [free alias types] in this type until there are none left.
939939
///
940-
/// This only expands weak alias types in “head” / outermost positions. It can
941-
/// be used over [expand_weak_alias_tys] as an optimization in situations where
940+
/// This only expands free alias types in “head” / outermost positions. It can
941+
/// be used over [expand_free_alias_tys] as an optimization in situations where
942942
/// one only really cares about the *kind* of the final aliased type but not
943943
/// the types the other constituent types alias.
944944
///
@@ -947,17 +947,17 @@ impl<'tcx> TyCtxt<'tcx> {
947947
/// type gets fully normalized at a later stage.
948948
/// </div>
949949
///
950-
/// [weak]: ty::Weak
951-
/// [expand_weak_alias_tys]: Self::expand_weak_alias_tys
952-
pub fn peel_off_weak_alias_tys(self, mut ty: Ty<'tcx>) -> Ty<'tcx> {
953-
let ty::Alias(ty::Weak, _) = ty.kind() else { return ty };
950+
/// [free]: ty::Free
951+
/// [expand_free_alias_tys]: Self::expand_free_alias_tys
952+
pub fn peel_off_free_alias_tys(self, mut ty: Ty<'tcx>) -> Ty<'tcx> {
953+
let ty::Alias(ty::Free, _) = ty.kind() else { return ty };
954954

955955
let limit = self.recursion_limit();
956956
let mut depth = 0;
957957

958-
while let ty::Alias(ty::Weak, alias) = ty.kind() {
958+
while let ty::Alias(ty::Free, alias) = ty.kind() {
959959
if !limit.value_within_limit(depth) {
960-
let guar = self.dcx().delayed_bug("overflow expanding weak alias type");
960+
let guar = self.dcx().delayed_bug("overflow expanding free alias type");
961961
return Ty::new_error(self, guar);
962962
}
963963

@@ -985,7 +985,7 @@ impl<'tcx> TyCtxt<'tcx> {
985985
}
986986
ty::AliasTermKind::OpaqueTy => Some(self.variances_of(def_id)),
987987
ty::AliasTermKind::InherentTy
988-
| ty::AliasTermKind::WeakTy
988+
| ty::AliasTermKind::FreeTy
989989
| ty::AliasTermKind::UnevaluatedConst
990990
| ty::AliasTermKind::ProjectionConst => None,
991991
}
@@ -1078,25 +1078,25 @@ impl<'tcx> TypeFolder<TyCtxt<'tcx>> for OpaqueTypeExpander<'tcx> {
10781078
}
10791079
}
10801080

1081-
struct WeakAliasTypeExpander<'tcx> {
1081+
struct FreeAliasTypeExpander<'tcx> {
10821082
tcx: TyCtxt<'tcx>,
10831083
depth: usize,
10841084
}
10851085

1086-
impl<'tcx> TypeFolder<TyCtxt<'tcx>> for WeakAliasTypeExpander<'tcx> {
1086+
impl<'tcx> TypeFolder<TyCtxt<'tcx>> for FreeAliasTypeExpander<'tcx> {
10871087
fn cx(&self) -> TyCtxt<'tcx> {
10881088
self.tcx
10891089
}
10901090

10911091
fn fold_ty(&mut self, ty: Ty<'tcx>) -> Ty<'tcx> {
1092-
if !ty.has_type_flags(ty::TypeFlags::HAS_TY_WEAK) {
1092+
if !ty.has_type_flags(ty::TypeFlags::HAS_TY_FREE_ALIAS) {
10931093
return ty;
10941094
}
1095-
let ty::Alias(ty::Weak, alias) = ty.kind() else {
1095+
let ty::Alias(ty::Free, alias) = ty.kind() else {
10961096
return ty.super_fold_with(self);
10971097
};
10981098
if !self.tcx.recursion_limit().value_within_limit(self.depth) {
1099-
let guar = self.tcx.dcx().delayed_bug("overflow expanding weak alias type");
1099+
let guar = self.tcx.dcx().delayed_bug("overflow expanding free alias type");
11001100
return Ty::new_error(self.tcx, guar);
11011101
}
11021102

@@ -1107,7 +1107,7 @@ impl<'tcx> TypeFolder<TyCtxt<'tcx>> for WeakAliasTypeExpander<'tcx> {
11071107
}
11081108

11091109
fn fold_const(&mut self, ct: ty::Const<'tcx>) -> ty::Const<'tcx> {
1110-
if !ct.has_type_flags(ty::TypeFlags::HAS_TY_WEAK) {
1110+
if !ct.has_type_flags(ty::TypeFlags::HAS_TY_FREE_ALIAS) {
11111111
return ct;
11121112
}
11131113
ct.super_fold_with(self)

compiler/rustc_middle/src/ty/visit.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ impl<'tcx> TyCtxt<'tcx> {
139139
{
140140
let mut collector = LateBoundRegionsCollector::new(just_constrained);
141141
let value = value.skip_binder();
142-
let value = if just_constrained { self.expand_weak_alias_tys(value) } else { value };
142+
let value = if just_constrained { self.expand_free_alias_tys(value) } else { value };
143143
value.visit_with(&mut collector);
144144
collector.regions
145145
}
@@ -182,8 +182,8 @@ impl<'tcx> TypeVisitor<TyCtxt<'tcx>> for LateBoundRegionsCollector {
182182
ty::Alias(ty::Projection | ty::Inherent | ty::Opaque, _) => {
183183
return;
184184
}
185-
// All weak alias types should've been expanded beforehand.
186-
ty::Alias(ty::Weak, _) => bug!("unexpected weak alias type"),
185+
// All free alias types should've been expanded beforehand.
186+
ty::Alias(ty::Free, _) => bug!("unexpected free alias type"),
187187
_ => {}
188188
}
189189
}

compiler/rustc_next_trait_solver/src/solve/assembly/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ where
595595
}
596596

597597
ty::Alias(kind @ (ty::Projection | ty::Opaque), alias_ty) => (kind, alias_ty),
598-
ty::Alias(ty::Inherent | ty::Weak, _) => {
598+
ty::Alias(ty::Inherent | ty::Free, _) => {
599599
self.cx().delay_bug(format!("could not normalize {self_ty:?}, it is not WF"));
600600
return;
601601
}

0 commit comments

Comments
 (0)