mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 20:42:04 +00:00
fix: Make value_ty query fallible
This commit is contained in:
parent
35e05e07fb
commit
8f4f5a6cce
8 changed files with 59 additions and 38 deletions
|
@ -3786,7 +3786,9 @@ impl Type {
|
|||
}
|
||||
|
||||
fn from_value_def(db: &dyn HirDatabase, def: impl Into<ValueTyDefId> + HasResolver) -> Type {
|
||||
let ty = db.value_ty(def.into());
|
||||
let Some(ty) = db.value_ty(def.into()) else {
|
||||
return Type::new(db, def, TyKind::Error.intern(Interner));
|
||||
};
|
||||
let substs = TyBuilder::unknown_subst(
|
||||
db,
|
||||
match def.into() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue