mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
Add a hir::TypeRef as an intermediate between ast::TypeRef and ty::Ty
This commit is contained in:
parent
2870effd5c
commit
cdca397061
10 changed files with 219 additions and 95 deletions
|
@ -145,7 +145,7 @@ impl VariantData {
|
|||
.map(|(i, fd)| {
|
||||
Ok(StructField {
|
||||
name: SmolStr::new(i.to_string()),
|
||||
ty: Ty::new_opt(db, &module, fd.type_ref())?,
|
||||
ty: Ty::from_ast_opt(db, &module, fd.type_ref())?,
|
||||
})
|
||||
})
|
||||
.collect::<Cancelable<_>>()?;
|
||||
|
@ -160,7 +160,7 @@ impl VariantData {
|
|||
.name()
|
||||
.map(|n| n.text())
|
||||
.unwrap_or_else(|| SmolStr::new("[error]")),
|
||||
ty: Ty::new_opt(db, &module, fd.type_ref())?,
|
||||
ty: Ty::from_ast_opt(db, &module, fd.type_ref())?,
|
||||
})
|
||||
})
|
||||
.collect::<Cancelable<_>>()?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue