allow concrete self types in consts
This commit is contained in:
parent
7402a39447
commit
e5b82a56c5
11 changed files with 141 additions and 18 deletions
|
@ -199,7 +199,14 @@ pub enum Res<Id = hir::HirId> {
|
|||
|
||||
// Type namespace
|
||||
PrimTy(hir::PrimTy),
|
||||
SelfTy(Option<DefId> /* trait */, Option<DefId> /* impl */),
|
||||
/// `Self`, with both an optional trait and impl `DefId`.
|
||||
///
|
||||
/// HACK: impl self types also have an optional requirement to not mention
|
||||
/// any generic parameters to allow the following with `min_const_generics`.
|
||||
/// `impl Foo { fn test() -> [u8; std::mem::size_of::<Self>()]`.
|
||||
///
|
||||
/// Once `lazy_normalization_consts` is stable, this bodge can be removed again.
|
||||
SelfTy(Option<DefId> /* trait */, Option<(DefId, bool)> /* impl */),
|
||||
ToolMod, // e.g., `rustfmt` in `#[rustfmt::skip]`
|
||||
|
||||
// Value namespace
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue