mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 20:09:19 +00:00
Align code_model name with ungrammar
This commit is contained in:
parent
87886e8986
commit
f6ed16674c
22 changed files with 88 additions and 102 deletions
|
@ -10,8 +10,8 @@ use hir_expand::InFile;
|
|||
use syntax::ast;
|
||||
|
||||
use crate::{
|
||||
db::HirDatabase, Const, Enum, EnumVariant, Field, FieldSource, Function, Impl, LifetimeParam,
|
||||
MacroDef, Module, Static, Struct, Trait, TypeAlias, TypeParam, Union,
|
||||
db::HirDatabase, Const, Enum, Field, FieldSource, Function, Impl, LifetimeParam, MacroDef,
|
||||
Module, Static, Struct, Trait, TypeAlias, TypeParam, Union, Variant,
|
||||
};
|
||||
|
||||
pub trait HasSource {
|
||||
|
@ -73,7 +73,7 @@ impl HasSource for Enum {
|
|||
self.id.lookup(db.upcast()).source(db.upcast())
|
||||
}
|
||||
}
|
||||
impl HasSource for EnumVariant {
|
||||
impl HasSource for Variant {
|
||||
type Ast = ast::Variant;
|
||||
fn source(self, db: &dyn HirDatabase) -> InFile<ast::Variant> {
|
||||
self.parent.id.child_source(db.upcast()).map(|map| map[self.id].clone())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue