mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Move structs to new loc
This commit is contained in:
parent
63c192b34a
commit
f135a8ea55
14 changed files with 66 additions and 30 deletions
|
@ -269,7 +269,7 @@ pub struct Struct {
|
|||
|
||||
impl Struct {
|
||||
pub fn module(self, db: &impl DefDatabase) -> Module {
|
||||
Module { id: self.id.module(db) }
|
||||
Module { id: self.id.lookup(db).container }
|
||||
}
|
||||
|
||||
pub fn krate(self, db: &impl DefDatabase) -> Option<Crate> {
|
||||
|
@ -290,7 +290,7 @@ impl Struct {
|
|||
}
|
||||
|
||||
pub fn ty(self, db: &impl HirDatabase) -> Type {
|
||||
Type::from_def(db, self.id.module(db).krate, self.id)
|
||||
Type::from_def(db, self.id.lookup(db).container.krate, self.id)
|
||||
}
|
||||
|
||||
fn variant_data(self, db: &impl DefDatabase) -> Arc<VariantData> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue