-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Switch from derivative
to derive-where
#127042
Conversation
rustbot has assigned @petrochenkov. Use |
The list of allowed third-party dependencies may have been modified! You must ensure that any new dependencies have compatible licenses before merging. These commits modify the If this was unintentional then you should revert the changes before this PR is merged. |
This comment has been minimized.
This comment has been minimized.
@bors try @rust-timer queue derives on very fundamental types may change their perf characteristics |
This comment has been minimized.
This comment has been minimized.
Switch from `derivative` to `derive-where` This is a part of the effort to get rid of `syn 1.*` in compiler's dependencies: rust-lang#109302 Derivative has not been maintained in nearly 3 years[^1]. It also depends on `syn 1.*`. This PR replaces `derivative` with `derive-where`[^2], a not dead alternative, which uses `syn 2.*`. A couple of `Debug` formats have changed around the skipped fields[^3], but I doubt this is an issue. [^1]: mcarton/rust-derivative#117 [^2]: https://lib.rs/crates/derive-where [^3]: See the changes in `tests/ui`
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (9fbecc0): comparison URL. Overall result: ❌✅ regressions and improvements - no action neededBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. @bors rollup=never Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)Results (primary 2.0%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResults (primary -2.5%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 697.296s -> 695.903s (-0.20%) |
The failures here are quite strange. The only thing that I did change was adding derivation of Eq to CanonicalVarKind, because without it the code refused to compile. My working theory is that However, what clippy complains about is actually derivations of Sounds like I need to do some investigation with |
#[allow(unused_qualifications)]
impl<I: Interner> ::std::cmp::Eq for CanonicalVarInfo<I> {}
#[automatically_derived]
impl<I: Interner> ::core::cmp::Eq for CanonicalVarInfo<I>
where
I: Interner,
{
#[inline]
fn assert_receiver_is_total_eq(&self) {
struct __AssertEq<__T: ::core::cmp::Eq + ?::core::marker::Sized>(
::core::marker::PhantomData<__T>,
);
let _: __AssertEq<CanonicalVarKind<I>>;
}
} So my theory seems to be correct.
The culprit for this one can also be seen above. It's the So, all in all, I would say Should I just silence the clippy warnings? |
The warnings are in |
Perf changes are noise. I think it's fine for us to. As a follow-up, we should look at not manually implementing Please rebase this PR, and I'll take another look at it just for certainty. I think I may have added some |
@rustbot author |
Sorry, I didn't finish my sentence.
[...] ignore the clippy warnings regarding manually derived impls. |
This comment has been minimized.
This comment has been minimized.
Done.
I will try to tackle this later in a separate PR |
☔ The latest upstream changes (presumably #127653) made this pull request unmergeable. Please resolve the merge conflicts. |
@bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (2f26b2a): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesResults (secondary -6.5%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 770.291s -> 771.056s (0.10%) |
Don't manually implement `PartialEq` for some types in `rustc_type_ir` > > As a follow-up, we should look at not manually implementing PartialEq for these types but instead going thru a derive > > I will try to tackle this later in a separate PR rust-lang#127042 (comment)
…r-errors Don't manually implement `PartialEq` for some types in `rustc_type_ir` > > As a follow-up, we should look at not manually implementing PartialEq for these types but instead going thru a derive > > I will try to tackle this later in a separate PR rust-lang#127042 (comment)
…r-errors Don't manually implement `PartialEq` for some types in `rustc_type_ir` > > As a follow-up, we should look at not manually implementing PartialEq for these types but instead going thru a derive > > I will try to tackle this later in a separate PR rust-lang#127042 (comment)
This is a part of the effort to get rid of
syn 1.*
in compiler's dependencies: #109302Derivative has not been maintained in nearly 3 years1. It also depends on
syn 1.*
.This PR replaces
derivative
withderive-where
2, a not dead alternative, which usessyn 2.*
.A couple of
Debug
formats have changed around the skipped fields3, but I doubt this is an issue.Footnotes
https://github.com/mcarton/rust-derivative/issues/117 ↩
https://lib.rs/crates/derive-where ↩
See the changes in
tests/ui
↩