diff options
author | Seivan Heidari <[email protected]> | 2019-11-14 22:20:27 +0000 |
---|---|---|
committer | Seivan Heidari <[email protected]> | 2019-11-14 22:20:27 +0000 |
commit | c622413bc72ea56d5f62a16788d897cb61eca948 (patch) | |
tree | 9de3dbe8b5c935ed168efac4e70770e54fbe0714 /crates/ra_hir_def/src/lib.rs | |
parent | 0525778a3ad590492b51cc11085d815f9bb8f92b (diff) | |
parent | bbb022d3999b3038549ec6c309efb065231c896a (diff) |
Merge branch 'master' of https://github.com/rust-analyzer/rust-analyzer into feature/themes
Diffstat (limited to 'crates/ra_hir_def/src/lib.rs')
-rw-r--r-- | crates/ra_hir_def/src/lib.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/crates/ra_hir_def/src/lib.rs b/crates/ra_hir_def/src/lib.rs index 4a758bb83..3fab7965c 100644 --- a/crates/ra_hir_def/src/lib.rs +++ b/crates/ra_hir_def/src/lib.rs | |||
@@ -374,3 +374,13 @@ impl_froms!( | |||
374 | TypeAliasId, | 374 | TypeAliasId, |
375 | BuiltinType | 375 | BuiltinType |
376 | ); | 376 | ); |
377 | |||
378 | /// The defs which have a body. | ||
379 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] | ||
380 | pub enum DefWithBodyId { | ||
381 | FunctionId(FunctionId), | ||
382 | StaticId(StaticId), | ||
383 | ConstId(ConstId), | ||
384 | } | ||
385 | |||
386 | impl_froms!(DefWithBodyId: FunctionId, ConstId, StaticId); | ||