mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
Separate Ty
and TyKind
like in Chalk
Currently `Ty` just wraps `TyKind`, but this allows us to change most places to already use `intern` / `interned`.
This commit is contained in:
parent
7accf6bc37
commit
6c32bbf3ca
20 changed files with 756 additions and 620 deletions
|
@ -10,7 +10,9 @@ use stdx::panic_context;
|
|||
|
||||
use crate::{db::HirDatabase, DebruijnIndex, Substs};
|
||||
|
||||
use super::{Canonical, GenericPredicate, HirDisplay, ProjectionTy, TraitRef, Ty, TypeWalk};
|
||||
use super::{
|
||||
Canonical, GenericPredicate, HirDisplay, ProjectionTy, TraitRef, Ty, TyKind, TypeWalk,
|
||||
};
|
||||
|
||||
use self::chalk::{from_chalk, Interner, ToChalk};
|
||||
|
||||
|
@ -132,7 +134,7 @@ pub(crate) fn trait_solve_query(
|
|||
log::info!("trait_solve_query({})", goal.value.value.display(db));
|
||||
|
||||
if let Obligation::Projection(pred) = &goal.value.value {
|
||||
if let Ty::BoundVar(_) = &pred.projection_ty.parameters[0] {
|
||||
if let TyKind::BoundVar(_) = &pred.projection_ty.parameters[0].interned(&Interner) {
|
||||
// Hack: don't ask Chalk to normalize with an unknown self type, it'll say that's impossible
|
||||
return Some(Solution::Ambig(Guidance::Unknown));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue