diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-08-22 14:48:08 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-22 14:48:08 +0000 |
commit | b3bb2e194c814434e80b9b427df37fe24fc70e6c (patch) | |
tree | c4ec2996ceb9c03ff927ead206b66147f3955404 /gcc/rust | |
parent | ac3be517de2c0ec596eeee754b863243cb071098 (diff) | |
parent | 2d681bdeda9e6c049457a20c45d045925595a8e9 (diff) | |
download | gcc-b3bb2e194c814434e80b9b427df37fe24fc70e6c.zip gcc-b3bb2e194c814434e80b9b427df37fe24fc70e6c.tar.gz gcc-b3bb2e194c814434e80b9b427df37fe24fc70e6c.tar.bz2 |
Merge #641
641: Ignore impl trait blocks in overlap pass r=philberty a=philberty
Ignore trait-impls in overlapping check this needs some though for generics traits.
Co-authored-by: Philip Herron <philip.herron@embecosm.com>
Diffstat (limited to 'gcc/rust')
-rw-r--r-- | gcc/rust/typecheck/rust-hir-inherent-impl-overlap.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/rust/typecheck/rust-hir-inherent-impl-overlap.h b/gcc/rust/typecheck/rust-hir-inherent-impl-overlap.h index 0879360..134d314 100644 --- a/gcc/rust/typecheck/rust-hir-inherent-impl-overlap.h +++ b/gcc/rust/typecheck/rust-hir-inherent-impl-overlap.h @@ -109,6 +109,10 @@ public: // generate mappings pass.mappings->iterate_impl_items ( [&] (HirId id, HIR::ImplItem *impl_item, HIR::ImplBlock *impl) -> bool { + // ignoring trait-impls might need thought later on + if (impl->has_trait_ref ()) + return true; + pass.process_impl_item (id, impl_item, impl); return true; }); |