aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src/lib.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-04-13 13:02:26 +0100
committerGitHub <[email protected]>2021-04-13 13:02:26 +0100
commit9beed98f2ab15f6d62283d09b6b96fa5f57a78d1 (patch)
treeb9b28d597d793ce7c12ee0c347ffe0edf0e5327b /crates/hir_def/src/lib.rs
parent03e0bf7f555ad4f3c8e127e009897b6fa83a6194 (diff)
parent26d2653dd64f139c89449cf4bab8bac737e930a5 (diff)
Merge #8432
8432: decl_check: consider outer scopes' allows r=jonas-schievink a=lf- Fix #8417. Also makes it less noisy about no_mangle annotated stuff the user can do nothing about. Note: this still is broken with bitfield! macros. A repro in an ignore test is included here. I believe this bug is elsewhere, and I don't think I can work around it here. I would like help filing the remaining bug, as it does actually affect users, but I don't know how to describe the behaviour (or even if it is unintended). Co-authored-by: Jade <[email protected]>
Diffstat (limited to 'crates/hir_def/src/lib.rs')
-rw-r--r--crates/hir_def/src/lib.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/crates/hir_def/src/lib.rs b/crates/hir_def/src/lib.rs
index d69116d51..ffee05500 100644
--- a/crates/hir_def/src/lib.rs
+++ b/crates/hir_def/src/lib.rs
@@ -435,6 +435,16 @@ impl_from!(
435 for AttrDefId 435 for AttrDefId
436); 436);
437 437
438impl From<AssocContainerId> for AttrDefId {
439 fn from(acid: AssocContainerId) -> Self {
440 match acid {
441 AssocContainerId::ModuleId(mid) => AttrDefId::ModuleId(mid),
442 AssocContainerId::ImplId(iid) => AttrDefId::ImplId(iid),
443 AssocContainerId::TraitId(tid) => AttrDefId::TraitId(tid),
444 }
445 }
446}
447
438#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] 448#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
439pub enum VariantId { 449pub enum VariantId {
440 EnumVariantId(EnumVariantId), 450 EnumVariantId(EnumVariantId),