mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
Use Ty::apply instead of simple and fix method resolution.
This commit is contained in:
parent
eb96964756
commit
3fff5aa4d7
3 changed files with 14 additions and 8 deletions
|
@ -250,6 +250,14 @@ impl Ty {
|
|||
TypeCtor::Adt(def_id) => {
|
||||
return Some(std::iter::once(def_id.module(db.upcast()).krate).collect())
|
||||
}
|
||||
TypeCtor::ForeignType(type_alias_id) => {
|
||||
return Some(
|
||||
std::iter::once(
|
||||
type_alias_id.lookup(db.upcast()).module(db.upcast()).krate,
|
||||
)
|
||||
.collect(),
|
||||
)
|
||||
}
|
||||
TypeCtor::Bool => lang_item_crate!("bool"),
|
||||
TypeCtor::Char => lang_item_crate!("char"),
|
||||
TypeCtor::Float(f) => match f.bitness {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue