diff options
Diffstat (limited to 'crates/hir_def/src/data.rs')
-rw-r--r-- | crates/hir_def/src/data.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/hir_def/src/data.rs b/crates/hir_def/src/data.rs index 135a6698e..d2bb381be 100644 --- a/crates/hir_def/src/data.rs +++ b/crates/hir_def/src/data.rs | |||
@@ -22,6 +22,7 @@ pub struct FunctionData { | |||
22 | pub name: Name, | 22 | pub name: Name, |
23 | pub params: Vec<Interned<TypeRef>>, | 23 | pub params: Vec<Interned<TypeRef>>, |
24 | pub ret_type: Interned<TypeRef>, | 24 | pub ret_type: Interned<TypeRef>, |
25 | pub async_ret_type: Option<Interned<TypeRef>>, | ||
25 | pub attrs: Attrs, | 26 | pub attrs: Attrs, |
26 | pub visibility: RawVisibility, | 27 | pub visibility: RawVisibility, |
27 | pub abi: Option<Interned<str>>, | 28 | pub abi: Option<Interned<str>>, |
@@ -63,6 +64,7 @@ impl FunctionData { | |||
63 | }) | 64 | }) |
64 | .collect(), | 65 | .collect(), |
65 | ret_type: func.ret_type.clone(), | 66 | ret_type: func.ret_type.clone(), |
67 | async_ret_type: func.async_ret_type.clone(), | ||
66 | attrs: item_tree.attrs(db, krate, ModItem::from(loc.id.value).into()), | 68 | attrs: item_tree.attrs(db, krate, ModItem::from(loc.id.value).into()), |
67 | visibility: item_tree[func.visibility].clone(), | 69 | visibility: item_tree[func.visibility].clone(), |
68 | abi: func.abi.clone(), | 70 | abi: func.abi.clone(), |
@@ -112,7 +114,7 @@ pub struct TypeAliasData { | |||
112 | pub visibility: RawVisibility, | 114 | pub visibility: RawVisibility, |
113 | pub is_extern: bool, | 115 | pub is_extern: bool, |
114 | /// Bounds restricting the type alias itself (eg. `type Ty: Bound;` in a trait or impl). | 116 | /// Bounds restricting the type alias itself (eg. `type Ty: Bound;` in a trait or impl). |
115 | pub bounds: Vec<TypeBound>, | 117 | pub bounds: Vec<Interned<TypeBound>>, |
116 | } | 118 | } |
117 | 119 | ||
118 | impl TypeAliasData { | 120 | impl TypeAliasData { |
@@ -141,7 +143,6 @@ pub struct TraitData { | |||
141 | pub is_auto: bool, | 143 | pub is_auto: bool, |
142 | pub is_unsafe: bool, | 144 | pub is_unsafe: bool, |
143 | pub visibility: RawVisibility, | 145 | pub visibility: RawVisibility, |
144 | pub bounds: Box<[TypeBound]>, | ||
145 | } | 146 | } |
146 | 147 | ||
147 | impl TraitData { | 148 | impl TraitData { |
@@ -155,7 +156,6 @@ impl TraitData { | |||
155 | let module_id = tr_loc.container; | 156 | let module_id = tr_loc.container; |
156 | let container = AssocContainerId::TraitId(tr); | 157 | let container = AssocContainerId::TraitId(tr); |
157 | let visibility = item_tree[tr_def.visibility].clone(); | 158 | let visibility = item_tree[tr_def.visibility].clone(); |
158 | let bounds = tr_def.bounds.clone(); | ||
159 | let mut expander = Expander::new(db, tr_loc.id.file_id(), module_id); | 159 | let mut expander = Expander::new(db, tr_loc.id.file_id(), module_id); |
160 | 160 | ||
161 | let items = collect_items( | 161 | let items = collect_items( |
@@ -168,7 +168,7 @@ impl TraitData { | |||
168 | 100, | 168 | 100, |
169 | ); | 169 | ); |
170 | 170 | ||
171 | Arc::new(TraitData { name, items, is_auto, is_unsafe, visibility, bounds }) | 171 | Arc::new(TraitData { name, items, is_auto, is_unsafe, visibility }) |
172 | } | 172 | } |
173 | 173 | ||
174 | pub fn associated_types(&self) -> impl Iterator<Item = TypeAliasId> + '_ { | 174 | pub fn associated_types(&self) -> impl Iterator<Item = TypeAliasId> + '_ { |