diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-11-24 11:28:51 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2019-11-24 11:28:51 +0000 |
commit | 982a32aca317deb91ae03346cbc7880bd7d4429b (patch) | |
tree | f2e52047aa684cc4d8b253b3071cfa5a2d753ac9 /crates/ra_db/src | |
parent | ea3124c12a52f28163a6375b6a5e3c79fc14312d (diff) | |
parent | 9c766db5ff9dad3ca13539c186f40f657380a831 (diff) |
Merge #2382
2382: Remove ids module r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_db/src')
-rw-r--r-- | crates/ra_db/src/lib.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/crates/ra_db/src/lib.rs b/crates/ra_db/src/lib.rs index f9d012cb0..e8852531b 100644 --- a/crates/ra_db/src/lib.rs +++ b/crates/ra_db/src/lib.rs | |||
@@ -15,6 +15,20 @@ pub use crate::{ | |||
15 | pub use relative_path::{RelativePath, RelativePathBuf}; | 15 | pub use relative_path::{RelativePath, RelativePathBuf}; |
16 | pub use salsa; | 16 | pub use salsa; |
17 | 17 | ||
18 | #[macro_export] | ||
19 | macro_rules! impl_intern_key { | ||
20 | ($name:ident) => { | ||
21 | impl $crate::salsa::InternKey for $name { | ||
22 | fn from_intern_id(v: $crate::salsa::InternId) -> Self { | ||
23 | $name(v) | ||
24 | } | ||
25 | fn as_intern_id(&self) -> $crate::salsa::InternId { | ||
26 | self.0 | ||
27 | } | ||
28 | } | ||
29 | }; | ||
30 | } | ||
31 | |||
18 | pub trait CheckCanceled { | 32 | pub trait CheckCanceled { |
19 | /// Aborts current query if there are pending changes. | 33 | /// Aborts current query if there are pending changes. |
20 | /// | 34 | /// |