|
3 | 3 |
|
4 | 4 | use std::sync; |
5 | 5 |
|
6 | | -use base_db::{Crate, impl_intern_key}; |
| 6 | +use base_db::Crate; |
7 | 7 | use hir_def::{ |
8 | 8 | AdtId, BlockId, CallableDefId, ConstParamId, DefWithBodyId, EnumVariantId, FunctionId, |
9 | 9 | GeneralConstId, GenericDefId, ImplId, LifetimeParamId, LocalFieldId, StaticId, TraitId, |
@@ -459,40 +459,44 @@ fn hir_database_is_dyn_compatible() { |
459 | 459 | fn _assert_dyn_compatible(_: &dyn HirDatabase) {} |
460 | 460 | } |
461 | 461 |
|
462 | | -#[salsa_macros::interned(no_lifetime, revisions = usize::MAX)] |
| 462 | +#[salsa_macros::interned(no_lifetime, debug, revisions = usize::MAX)] |
463 | 463 | #[derive(PartialOrd, Ord)] |
464 | 464 | pub struct InternedTypeOrConstParamId { |
465 | 465 | pub loc: TypeOrConstParamId, |
466 | 466 | } |
467 | | -impl ::std::fmt::Debug for InternedTypeOrConstParamId { |
468 | | - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { |
469 | | - f.debug_tuple(stringify!(InternedTypeOrConstParamId)) |
470 | | - .field(&format_args!("{:04x}", self.0.index())) |
471 | | - .finish() |
472 | | - } |
473 | | -} |
474 | 467 |
|
475 | | -#[salsa_macros::interned(no_lifetime, revisions = usize::MAX)] |
| 468 | +#[salsa_macros::interned(no_lifetime, debug, revisions = usize::MAX)] |
476 | 469 | #[derive(PartialOrd, Ord)] |
477 | 470 | pub struct InternedLifetimeParamId { |
478 | 471 | pub loc: LifetimeParamId, |
479 | 472 | } |
480 | | -impl ::std::fmt::Debug for InternedLifetimeParamId { |
481 | | - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { |
482 | | - f.debug_tuple(stringify!(InternedLifetimeParamId)) |
483 | | - .field(&format_args!("{:04x}", self.0.index())) |
484 | | - .finish() |
485 | | - } |
486 | | -} |
487 | 473 |
|
488 | | -impl_intern_key!(InternedConstParamId, ConstParamId); |
| 474 | +#[salsa_macros::interned(no_lifetime, debug, revisions = usize::MAX)] |
| 475 | +#[derive(PartialOrd, Ord)] |
| 476 | +pub struct InternedConstParamId { |
| 477 | + pub loc: ConstParamId, |
| 478 | +} |
489 | 479 |
|
490 | | -impl_intern_key!(InternedOpaqueTyId, ImplTraitId); |
| 480 | +#[salsa_macros::interned(no_lifetime, debug, revisions = usize::MAX)] |
| 481 | +#[derive(PartialOrd, Ord)] |
| 482 | +pub struct InternedOpaqueTyId { |
| 483 | + pub loc: ImplTraitId, |
| 484 | +} |
491 | 485 |
|
492 | 486 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord)] |
493 | 487 | pub struct InternedClosure(pub DefWithBodyId, pub ExprId); |
494 | | -impl_intern_key!(InternedClosureId, InternedClosure); |
| 488 | + |
| 489 | +#[salsa_macros::interned(no_lifetime, debug, revisions = usize::MAX)] |
| 490 | +#[derive(PartialOrd, Ord)] |
| 491 | +pub struct InternedClosureId { |
| 492 | + pub loc: InternedClosure, |
| 493 | +} |
495 | 494 |
|
496 | 495 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord)] |
497 | 496 | pub struct InternedCoroutine(pub DefWithBodyId, pub ExprId); |
498 | | -impl_intern_key!(InternedCoroutineId, InternedCoroutine); |
| 497 | + |
| 498 | +#[salsa_macros::interned(no_lifetime, debug, revisions = usize::MAX)] |
| 499 | +#[derive(PartialOrd, Ord)] |
| 500 | +pub struct InternedCoroutineId { |
| 501 | + pub loc: InternedCoroutine, |
| 502 | +} |
0 commit comments