mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
internal: Remove SELF_REF hack for self referential SyntaxContexts
This commit is contained in:
parent
36fb1409ed
commit
5136705fad
21 changed files with 245 additions and 129 deletions
|
@ -19,8 +19,12 @@ use stdx::never;
|
|||
use triomphe::Arc;
|
||||
|
||||
use crate::{
|
||||
consteval::try_const_usize, db::HirDatabase, infer::normalize, layout::adt::struct_variant_idx,
|
||||
utils::ClosureSubst, Interner, ProjectionTy, Substitution, TraitEnvironment, Ty,
|
||||
consteval::try_const_usize,
|
||||
db::{HirDatabase, InternedClosure},
|
||||
infer::normalize,
|
||||
layout::adt::struct_variant_idx,
|
||||
utils::ClosureSubst,
|
||||
Interner, ProjectionTy, Substitution, TraitEnvironment, Ty,
|
||||
};
|
||||
|
||||
pub use self::{
|
||||
|
@ -391,7 +395,7 @@ pub fn layout_of_ty_query(
|
|||
}
|
||||
}
|
||||
TyKind::Closure(c, subst) => {
|
||||
let (def, _) = db.lookup_intern_closure((*c).into());
|
||||
let InternedClosure(def, _) = db.lookup_intern_closure((*c).into());
|
||||
let infer = db.infer(def);
|
||||
let (captures, _) = infer.closure_info(c);
|
||||
let fields = captures
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue