rework implementation for inherent impls for builtin types
This commit is contained in:
parent
4558a125b6
commit
bef6f3e895
21 changed files with 364 additions and 413 deletions
|
@ -141,6 +141,16 @@ impl Key for ty::WithOptConstParam<LocalDefId> {
|
|||
}
|
||||
}
|
||||
|
||||
impl Key for SimplifiedType {
|
||||
#[inline(always)]
|
||||
fn query_crate_is_local(&self) -> bool {
|
||||
true
|
||||
}
|
||||
fn default_span(&self, _: TyCtxt<'_>) -> Span {
|
||||
DUMMY_SP
|
||||
}
|
||||
}
|
||||
|
||||
impl Key for (DefId, DefId) {
|
||||
#[inline(always)]
|
||||
fn query_crate_is_local(&self) -> bool {
|
||||
|
@ -215,6 +225,16 @@ impl Key for (CrateNum, DefId) {
|
|||
}
|
||||
}
|
||||
|
||||
impl Key for (CrateNum, SimplifiedType) {
|
||||
#[inline(always)]
|
||||
fn query_crate_is_local(&self) -> bool {
|
||||
self.0 == LOCAL_CRATE
|
||||
}
|
||||
fn default_span(&self, _: TyCtxt<'_>) -> Span {
|
||||
DUMMY_SP
|
||||
}
|
||||
}
|
||||
|
||||
impl Key for (DefId, SimplifiedType) {
|
||||
#[inline(always)]
|
||||
fn query_crate_is_local(&self) -> bool {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue