-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove unnecessary trait bounds and derivations #65647
Conversation
I did this because I was trying to work out why
Overall, I did a thorough job eliminating unnecessary The whole process was very tedious, but it did find a few unnecessary trait bounds and many unnecessary derives. It would be nice if the compiler could identify at least some of these, the way it identifies unnecessary |
d0d6d21
to
f467bc5
Compare
f467bc5
to
ac6daed
Compare
📌 Commit ac6daed has been approved by |
…r=Centril Remove unnecessary trait bounds and derivations This PR removes unnecessary trait bounds and derivations from many types. r? @nikomatsakis
…r=Centril Remove unnecessary trait bounds and derivations This PR removes unnecessary trait bounds and derivations from many types. r? @nikomatsakis
Rollup of 7 pull requests Successful merges: - #62330 (Change untagged_unions to not allow union fields with drop) - #65092 (make is_power_of_two a const function) - #65621 (miri: add write_bytes method to Memory doing bounds-checks and supporting iterators) - #65647 (Remove unnecessary trait bounds and derivations) - #65653 (keep the root dir clean from debugging) - #65660 (Rename `ConstValue::Infer(InferConst::Canonical(..))` to `ConstValue::Bound(..)`) - #65663 (Fix typo from #65214) Failed merges: r? @ghost
Clippy needs some of these bounds.
Can we revert this? |
Just add necessary bounds for clippy I think. |
Can we do this for external types? |
I mean re-adding those bounds in rust repo, not in clippy side. |
Maybe Clippy could use Hashstable instead of Hash. |
Readd some PartialEq and Hash derives used by Clippy cc #65647 r? @Centril cc @Manishearth
bring back some Debug instances for Miri These were erroneously removed in rust-lang#65647, but Miri needs them. r? @Centril Cc @nnethercote @oli-obk
bring back some Debug instances for Miri These were erroneously removed in rust-lang#65647, but Miri needs them. r? @Centril Cc @nnethercote @oli-obk
Rustup to rust-lang/rust#65647 cc rust-lang/rust#65647 waiting on rust-lang/rust#65690 changelog: none
…etrochenkov Derive Eq and Hash for SourceInfo again In https://github.com/bjorn3/rustc_codegen_cranelift/blob/75c24b9c9677600422ec86fa9f4c78fe3678d2ce/src/common.rs#L368 I store it in a `indexmap::IndexSet`, which requires `Eq` and `Hash`. Unfortunately they were removed in rust-lang#65647, so I can't update to latest nightly.
@nnethercote Looks like this caused a lot of fallout - why not just remove |
This PR removes unnecessary trait bounds and derivations from many types.
r? @nikomatsakis