mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +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
|
@ -12,7 +12,7 @@ use hir::{
|
|||
AssocItem, Crate, HasSource, HirDisplay, ModuleDef,
|
||||
};
|
||||
use hir_def::FunctionId;
|
||||
use hir_ty::{Ty, TypeWalk};
|
||||
use hir_ty::TypeWalk;
|
||||
use ide_db::base_db::{
|
||||
salsa::{self, ParallelDatabase},
|
||||
SourceDatabaseExt,
|
||||
|
@ -187,12 +187,12 @@ impl AnalysisStatsCmd {
|
|||
for (expr_id, _) in body.exprs.iter() {
|
||||
let ty = &inference_result[expr_id];
|
||||
num_exprs += 1;
|
||||
if let Ty::Unknown = ty {
|
||||
if ty.is_unknown() {
|
||||
num_exprs_unknown += 1;
|
||||
} else {
|
||||
let mut is_partially_unknown = false;
|
||||
ty.walk(&mut |ty| {
|
||||
if let Ty::Unknown = ty {
|
||||
if ty.is_unknown() {
|
||||
is_partially_unknown = true;
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue