Skip to content

Commit 679787e

Browse files
committed
a
1 parent 112d5e4 commit 679787e

File tree

13 files changed

+42
-8
lines changed

13 files changed

+42
-8
lines changed

compiler/rustc_middle/src/ty/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ impl<'tcx> Ty<'tcx> {
209209
ty::Placeholder(..) => "higher-ranked type".into(),
210210
ty::Bound(..) => "bound type variable".into(),
211211
ty::Alias(ty::Projection | ty::Inherent, _) => "associated type".into(),
212-
ty::Alias(ty::Free, _) => "type alias".into(),
212+
ty::Alias(ty::Unresolved | ty::Free, _) => "type alias".into(),
213213
ty::Param(_) => "type parameter".into(),
214214
ty::Alias(ty::Opaque, ..) => "opaque type".into(),
215215
}

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@ pub trait PrettyPrinter<'tcx>: Printer<'tcx> + fmt::Write {
800800
}
801801
}
802802
ty::Foreign(def_id) => self.print_def_path(def_id, &[])?,
803-
ty::Alias(ty::Projection | ty::Inherent | ty::Free, ref data) => data.print(self)?,
803+
ty::Alias(ty::Unresolved | ty::Projection | ty::Inherent | ty::Free, ref data) => data.print(self)?,
804804
ty::Placeholder(placeholder) => placeholder.print(self)?,
805805
ty::Alias(ty::Opaque, ty::AliasTy { def_id, args, .. }) => {
806806
// We use verbose printing in 'NO_QUERIES' mode, to
@@ -3121,6 +3121,9 @@ define_print! {
31213121
p.print_def_path(self.def_id, self.args)?;
31223122
}
31233123
}
3124+
// FIXME(thispr): lol
3125+
ty::AliasTermKind::UnresolvedTy
3126+
| ty::AliasTermKind::UnresolvedConst => todo!(),
31243127
ty::AliasTermKind::FreeTy
31253128
| ty::AliasTermKind::FreeConst
31263129
| ty::AliasTermKind::OpaqueTy

compiler/rustc_middle/src/ty/util.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -935,6 +935,8 @@ impl<'tcx> TyCtxt<'tcx> {
935935
ty::AliasTermKind::OpaqueTy => Some(self.variances_of(def_id)),
936936
ty::AliasTermKind::InherentTy
937937
| ty::AliasTermKind::InherentConst
938+
| ty::AliasTermKind::UnresolvedTy
939+
| ty::AliasTermKind::UnresolvedConst
938940
| ty::AliasTermKind::FreeTy
939941
| ty::AliasTermKind::FreeConst
940942
| ty::AliasTermKind::UnevaluatedConst

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,7 @@ where
703703
}
704704

705705
ty::Alias(kind @ (ty::Projection | ty::Opaque), alias_ty) => (kind, alias_ty),
706-
ty::Alias(ty::Inherent | ty::Free, _) => {
706+
ty::Alias(ty::Unresolved | ty::Inherent | ty::Free, _) => {
707707
self.cx().delay_bug(format!("could not normalize {self_ty:?}, it is not WF"));
708708
return;
709709
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ where
4949

5050
ty::Dynamic(..)
5151
| ty::Param(..)
52-
| ty::Alias(ty::Projection | ty::Inherent | ty::Free, ..)
52+
| ty::Alias(ty::Unresolved | ty::Projection | ty::Inherent | ty::Free, ..)
5353
| ty::Placeholder(..)
5454
| ty::Bound(..)
5555
| ty::Infer(_) => {

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ where
5757
self.normalize_free_alias(goal)
5858
}
5959
ty::AliasTermKind::UnevaluatedConst => self.normalize_anon_const(goal),
60+
// FIXME(thispr)
61+
ty::AliasTermKind::UnresolvedTy | ty::AliasTermKind::UnresolvedConst => todo!(),
6062
}
6163
}
6264

@@ -156,6 +158,9 @@ where
156158
}
157159
}
158160
ty::AliasTermKind::OpaqueTy
161+
// FIXME(thispr): are we only handling rigid aliases here?
162+
| ty::AliasTermKind::UnresolvedTy
163+
| ty::AliasTermKind::UnresolvedConst
159164
| ty::AliasTermKind::InherentTy
160165
| ty::AliasTermKind::InherentConst
161166
| ty::AliasTermKind::FreeTy

compiler/rustc_public/src/unstable/convert/stable/ty.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ impl<'tcx> Stable<'tcx> for ty::AliasTyKind {
1717
fn stable(&self, _: &mut Tables<'_, BridgeTys>, _: &CompilerCtxt<'_, BridgeTys>) -> Self::T {
1818
match self {
1919
ty::Projection => crate::ty::AliasKind::Projection,
20+
// FIXME(thispr):
21+
ty::Unresolved => todo!(),
2022
ty::Inherent => crate::ty::AliasKind::Inherent,
2123
ty::Opaque => crate::ty::AliasKind::Opaque,
2224
ty::Free => crate::ty::AliasKind::Free,

compiler/rustc_trait_selection/src/error_reporting/infer/region.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
719719
ty::Projection | ty::Inherent => {
720720
format!("the associated type `{bound_kind}`")
721721
}
722-
ty::Free => format!("the type alias `{bound_kind}`"),
722+
ty::Unresolved | ty::Free => format!("the type alias `{bound_kind}`"),
723723
ty::Opaque => format!("the opaque type `{bound_kind}`"),
724724
},
725725
};

compiler/rustc_trait_selection/src/error_reporting/traits/fulfillment_errors.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1722,6 +1722,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
17221722
ty::CoroutineClosure(..) => Some(21),
17231723
ty::Pat(..) => Some(22),
17241724
ty::UnsafeBinder(..) => Some(23),
1725+
ty::Alias(ty::Unresolved, ..) => Some(24),
17251726
ty::Placeholder(..) | ty::Bound(..) | ty::Infer(..) | ty::Error(_) => None,
17261727
}
17271728
}

compiler/rustc_type_ir/src/flags.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,8 @@ impl<I: Interner> FlagComputation<I> {
279279

280280
ty::Alias(kind, data) => {
281281
self.add_flags(match kind {
282+
// FIXME(thispr): Add TypeFlags::HAS_TY_UNRESOLVED?
283+
ty::Unresolved => todo!(),
282284
ty::Projection => TypeFlags::HAS_TY_PROJECTION,
283285
ty::Free => TypeFlags::HAS_TY_FREE_ALIAS,
284286
ty::Opaque => TypeFlags::HAS_TY_OPAQUE,

0 commit comments

Comments
 (0)