Skip to content

Commit 5e56705

Browse files
committed
Add better code comments for peculiarities
1 parent c582470 commit 5e56705

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

‎compiler/rustc_middle/src/ty/context.rs‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1730,9 +1730,7 @@ impl<'a, 'tcx> Lift<TyCtxt<'tcx>> for Interned<'a, RegionKind<'a>> {
17301730
}
17311731
}
17321732

1733-
// `rustc_type_ir::Const<I>` is only the generic wrapper; lifting it delegates
1734-
// to `I::InternedConstKind`, so the concrete interned const representation
1735-
// must itself implement `Lift`.
1733+
// FIXME: unclear why exactly the macro doesn't work.
17361734
impl<'a, 'tcx> Lift<TyCtxt<'tcx>> for Interned<'a, WithCachedTypeInfo<ConstKind<'a>>> {
17371735
type Lifted = Interned<'tcx, WithCachedTypeInfo<ConstKind<'tcx>>>;
17381736

‎compiler/rustc_type_ir/src/interner.rs‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,10 @@ pub trait Interner:
177177
type Symbol: Symbol<Self>;
178178

179179
// Things stored inside of tys
180+
181+
// `TypeVisitable<Self>` is required to prevent a problem where the flags
182+
// on `Const` indicated that an error was present, as the visitor could no
183+
// longer reach the corresponding ErrorGuaranteed
180184
type ErrorGuaranteed: Copy + Debug + Hash + Eq + TypeVisitable<Self>;
181185
type BoundExistentialPredicates: BoundExistentialPredicates<Self>;
182186
type AllocId: Copy + Debug + Hash + Eq;

0 commit comments

Comments
 (0)