aboutsummaryrefslogtreecommitdiff
path: root/crates/hir
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir')
-rw-r--r--crates/hir/src/attrs.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/crates/hir/src/attrs.rs b/crates/hir/src/attrs.rs
index 2603411eb..953960e14 100644
--- a/crates/hir/src/attrs.rs
+++ b/crates/hir/src/attrs.rs
@@ -1,3 +1,4 @@
1//! Attributes & documentation for hir types.
1use hir_def::{ 2use hir_def::{
2 attr::Attrs, 3 attr::Attrs,
3 db::DefDatabase, 4 db::DefDatabase,
@@ -11,7 +12,6 @@ use stdx::impl_from;
11use crate::{ 12use crate::{
12 doc_links::Resolvable, Adt, Const, Enum, EnumVariant, Field, Function, GenericDef, ImplDef, 13 doc_links::Resolvable, Adt, Const, Enum, EnumVariant, Field, Function, GenericDef, ImplDef,
13 Local, MacroDef, Module, ModuleDef, Static, Struct, Trait, TypeAlias, TypeParam, Union, 14 Local, MacroDef, Module, ModuleDef, Static, Struct, Trait, TypeAlias, TypeParam, Union,
14 VariantDef,
15}; 15};
16 16
17#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] 17#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
@@ -83,7 +83,7 @@ impl Resolvable for ModuleDef {
83 83
84impl Resolvable for TypeParam { 84impl Resolvable for TypeParam {
85 fn resolver<D: DefDatabase + HirDatabase>(&self, db: &D) -> Option<Resolver> { 85 fn resolver<D: DefDatabase + HirDatabase>(&self, db: &D) -> Option<Resolver> {
86 Some(Into::<ModuleId>::into(self.module(db)).resolver(db)) 86 Some(ModuleId::from(self.module(db)).resolver(db))
87 } 87 }
88 88
89 fn try_into_module_def(self) -> Option<ModuleDef> { 89 fn try_into_module_def(self) -> Option<ModuleDef> {
@@ -93,7 +93,7 @@ impl Resolvable for TypeParam {
93 93
94impl Resolvable for MacroDef { 94impl Resolvable for MacroDef {
95 fn resolver<D: DefDatabase + HirDatabase>(&self, db: &D) -> Option<Resolver> { 95 fn resolver<D: DefDatabase + HirDatabase>(&self, db: &D) -> Option<Resolver> {
96 Some(Into::<ModuleId>::into(self.module(db)?).resolver(db)) 96 Some(ModuleId::from(self.module(db)?).resolver(db))
97 } 97 }
98 98
99 fn try_into_module_def(self) -> Option<ModuleDef> { 99 fn try_into_module_def(self) -> Option<ModuleDef> {
@@ -103,7 +103,7 @@ impl Resolvable for MacroDef {
103 103
104impl Resolvable for Field { 104impl Resolvable for Field {
105 fn resolver<D: DefDatabase + HirDatabase>(&self, db: &D) -> Option<Resolver> { 105 fn resolver<D: DefDatabase + HirDatabase>(&self, db: &D) -> Option<Resolver> {
106 Some(Into::<VariantId>::into(Into::<VariantDef>::into(self.parent_def(db))).resolver(db)) 106 Some(VariantId::from(self.parent_def(db)).resolver(db))
107 } 107 }
108 108
109 fn try_into_module_def(self) -> Option<ModuleDef> { 109 fn try_into_module_def(self) -> Option<ModuleDef> {
@@ -113,7 +113,7 @@ impl Resolvable for Field {
113 113
114impl Resolvable for ImplDef { 114impl Resolvable for ImplDef {
115 fn resolver<D: DefDatabase + HirDatabase>(&self, db: &D) -> Option<Resolver> { 115 fn resolver<D: DefDatabase + HirDatabase>(&self, db: &D) -> Option<Resolver> {
116 Some(Into::<ModuleId>::into(self.module(db)).resolver(db)) 116 Some(ModuleId::from(self.module(db)).resolver(db))
117 } 117 }
118 118
119 fn try_into_module_def(self) -> Option<ModuleDef> { 119 fn try_into_module_def(self) -> Option<ModuleDef> {
@@ -123,7 +123,7 @@ impl Resolvable for ImplDef {
123 123
124impl Resolvable for Local { 124impl Resolvable for Local {
125 fn resolver<D: DefDatabase + HirDatabase>(&self, db: &D) -> Option<Resolver> { 125 fn resolver<D: DefDatabase + HirDatabase>(&self, db: &D) -> Option<Resolver> {
126 Some(Into::<ModuleId>::into(self.module(db)).resolver(db)) 126 Some(ModuleId::from(self.module(db)).resolver(db))
127 } 127 }
128 128
129 fn try_into_module_def(self) -> Option<ModuleDef> { 129 fn try_into_module_def(self) -> Option<ModuleDef> {