mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Remove unintentional changes
This commit is contained in:
parent
dc32f756e0
commit
d6f9e8806a
6 changed files with 13 additions and 16 deletions
|
@ -186,17 +186,18 @@ impl ModuleDef {
|
|||
module.visibility_of(db, self)
|
||||
}
|
||||
|
||||
pub fn name(&self, db: &dyn HirDatabase) -> Option<Name> {
|
||||
pub fn name(self, db: &dyn HirDatabase) -> Option<Name> {
|
||||
match self {
|
||||
ModuleDef::Module(m) => m.name(db),
|
||||
ModuleDef::Function(m) => Some(m.name(db)),
|
||||
ModuleDef::Adt(m) => Some(m.name(db)),
|
||||
ModuleDef::EnumVariant(m) => Some(m.name(db)),
|
||||
ModuleDef::Const(m) => m.name(db),
|
||||
ModuleDef::Static(m) => m.name(db),
|
||||
ModuleDef::Trait(m) => Some(m.name(db)),
|
||||
ModuleDef::TypeAlias(m) => Some(m.name(db)),
|
||||
ModuleDef::BuiltinType(m) => Some(m.as_name()),
|
||||
ModuleDef::Adt(it) => Some(it.name(db)),
|
||||
ModuleDef::Trait(it) => Some(it.name(db)),
|
||||
ModuleDef::Function(it) => Some(it.name(db)),
|
||||
ModuleDef::EnumVariant(it) => Some(it.name(db)),
|
||||
ModuleDef::TypeAlias(it) => Some(it.name(db)),
|
||||
ModuleDef::Module(it) => it.name(db),
|
||||
ModuleDef::Const(it) => it.name(db),
|
||||
ModuleDef::Static(it) => it.name(db),
|
||||
|
||||
ModuleDef::BuiltinType(it) => Some(it.as_name()),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue