Skip to content

Commit a0b50bc

Browse files
Make impl_internable! macro public
1 parent fab1c06 commit a0b50bc

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

crates/hir_def/src/intern.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,10 @@ pub trait Internable: Hash + Eq + 'static {
185185
fn storage() -> &'static InternStorage<Self>;
186186
}
187187

188-
macro_rules! impl_internable {
188+
/// Implements `Internable` for a given list of types, making them usable with `Interned`.
189+
#[macro_export]
190+
#[doc(hidden)]
191+
macro_rules! _impl_internable {
189192
( $($t:path),+ $(,)? ) => { $(
190193
impl Internable for $t {
191194
fn storage() -> &'static InternStorage<Self> {
@@ -196,10 +199,12 @@ macro_rules! impl_internable {
196199
)+ };
197200
}
198201

202+
pub use crate::_impl_internable as impl_internable;
203+
199204
impl_internable!(
200205
crate::type_ref::TypeRef,
201206
crate::type_ref::TraitRef,
202207
crate::path::ModPath,
203208
GenericParams,
204-
str
209+
str,
205210
);

0 commit comments

Comments
 (0)