mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +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
|
@ -23,8 +23,10 @@ pub trait FromSource: Sized {
|
|||
impl FromSource for Struct {
|
||||
type Ast = ast::StructDef;
|
||||
fn from_source(db: &(impl DefDatabase + AstDatabase), src: InFile<Self::Ast>) -> Option<Self> {
|
||||
let id = from_source(db, src)?;
|
||||
Some(Struct { id })
|
||||
analyze_container(db, src.as_ref().map(|it| it.syntax()))[keys::STRUCT]
|
||||
.get(&src)
|
||||
.copied()
|
||||
.map(Struct::from)
|
||||
}
|
||||
}
|
||||
impl FromSource for Union {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue