Repository navigation
Supertraits returns Unnormalized - #165538
Conversation
|
|
There was a problem hiding this comment.
Hmm, I'm a bit puzzled 🤔 I guess the big picture is that elaboration may return unnormalized trait bounds so let's mark them withUnnormalized wrapper and that feels correct to me. But this adds skip_normalization in some places while it adds skip_norm_wip in some other places. Could you explain me a bit?
The way I understand it, skip_normalization should be used when we're pretty sure the value will never need to be normalized. On the other hand, skip_norm_wip is for cases where we do intend to normalize the value eventually, just not right now. The long term plan is to get rid of skip_norm_wip across the codebase and instead use the unnormalized wrapper to pass these values around. So, while the goal is to remove most uses of skip_norm_wip, this pr actually introduces a few more 😛 . That's mainly because it's an intermediate step, and we will clean these up in subsequent prs. |
There was a problem hiding this comment.
Yeah, I'm aware what are those Unnormalized::*_wip methods for. What I was curious was the specific reason for the usages of Unnormalized::skip_normalization in each place in this PR 😅
But thinking again, I feel a bit more inclined to using skip_norm_wip instead because the current way we handle Unnormalized is pretty unprincipled and we already have skip_norm_wip in that module, though most them have been written in the adwin's initial work
|
BTW, I'd like to check the perf. Though this wouldn't affect the perf, I'd like to make it sure since next-solver is very close to the stabilization @bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
… r=<try> Supertraits returns Unnormalized
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (c92b081): comparison URL. Overall result: ❌ regressions - please read:Benchmarking means the PR may be perf-sensitive. Consider adding rollup=never if this change is not fit for rolling up. Next, please: If you can, justify the regressions found in this try perf run in writing along with @bors rollup=iffy rustc-perf Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary -0.7%, secondary 1.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary 0.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 460.778s -> 463.041s (0.49%) |
Let me write the reasoning on all places where I used skip normalization. Damn! how can these changes cause regression. 🫨 |
|
Yeah, that's surprising 🤔 I guess adding inline attribute on each |
50bdffe to
27aae54
Compare
I replaced all usages of skip_normalization with skip_norm_wip. I think it's better to make this distinction once we've properly consolidated the unnormalized APIs, since they're pretty fragmented right now. Once this PR and my other related PR land, I can start consolidating things and hopefully remove at least a few usages of skip_norm_wip here and elsewhere. |
|
Unknown value for argument "r". Run |
|
@bors r = @ShoyuVanilla |
|
Unknown value for argument "". Run |
|
@bors r=ShoyuVanilla |
…normalized, r=ShoyuVanilla Supertraits returns Unnormalized part of rust-lang#155345. It gets thorny pretty quickly. I kept the changes minimal to make them easier to review, but it'll take some time to streamline everything. r? @ShoyuVanilla
…uwer Rollup of 4 pull requests Successful merges: - #165538 (Supertraits returns Unnormalized) - #166033 (Abby: move span out of leaf region constraint) - #166399 (Add safety section for intrinsic volatile operations) - #166420 ([rustdoc] Fix search index generation: if crate content didn't change, it should generate the same search index)
… r=ShoyuVanilla Supertraits returns Unnormalized part of #155345. It gets thorny pretty quickly. I kept the changes minimal to make them easier to review, but it'll take some time to streamline everything. r? @ShoyuVanilla
|
@bors try jobs=dist-apple-various |
This comment has been minimized.
This comment has been minimized.
… r=<try> Supertraits returns Unnormalized try-job: dist-apple-various
|
@bors yield |
|
Auto build was cancelled. Cancelled workflows: The next pull request likely to be tested is #166456. |
…normalized, r=ShoyuVanilla Supertraits returns Unnormalized part of rust-lang#155345. It gets thorny pretty quickly. I kept the changes minimal to make them easier to review, but it'll take some time to streamline everything. r? @ShoyuVanilla
…uwer Rollup of 12 pull requests Successful merges: - #166340 (Revert "implement const Iterator for Range - #156216") - #165345 (Remove the 'eq', 'eq_trace', and 'goals_to_obligations' methods from 'At') - #165538 (Supertraits returns Unnormalized) - #165794 (`consider_impl_candidate` tweaks) - #160752 (Avoid inference constraints from opaque blanket impls) - #163187 (add `scalbn` and `ilogb` methods on floats) - #164541 (Add regression test for #152415) - #164543 (Add regression test for #151316) - #165920 (Introduce compute_abi helper and ComputeCallConv trait) - #166313 (Move `rustdoc-ui` tests in the right folder) - #166420 ([rustdoc] Fix search index generation: if crate content didn't change, it should generate the same search index) - #166485 (Allow passing `--exact-match` and `--purge` to `x perf`)
Rollup merge of #165538 - bit-aloo:2026-11-06-supertraits-unnormalized, r=ShoyuVanilla Supertraits returns Unnormalized part of #155345. It gets thorny pretty quickly. I kept the changes minimal to make them easier to review, but it'll take some time to streamline everything. r? @ShoyuVanilla
|
About the perf regression: |
…uwer Rollup of 12 pull requests Successful merges: - rust-lang/rust#166340 (Revert "implement const Iterator for Range - rust-lang/rust#156216") - rust-lang/rust#165345 (Remove the 'eq', 'eq_trace', and 'goals_to_obligations' methods from 'At') - rust-lang/rust#165538 (Supertraits returns Unnormalized) - rust-lang/rust#165794 (`consider_impl_candidate` tweaks) - rust-lang/rust#160752 (Avoid inference constraints from opaque blanket impls) - rust-lang/rust#163187 (add `scalbn` and `ilogb` methods on floats) - rust-lang/rust#164541 (Add regression test for rust-lang/rust#152415) - rust-lang/rust#164543 (Add regression test for rust-lang/rust#151316) - rust-lang/rust#165920 (Introduce compute_abi helper and ComputeCallConv trait) - rust-lang/rust#166313 (Move `rustdoc-ui` tests in the right folder) - rust-lang/rust#166420 ([rustdoc] Fix search index generation: if crate content didn't change, it should generate the same search index) - rust-lang/rust#166485 (Allow passing `--exact-match` and `--purge` to `x perf`)
…uwer Rollup of 12 pull requests Successful merges: - rust-lang/rust#166340 (Revert "implement const Iterator for Range - rust-lang/rust#156216") - rust-lang/rust#165345 (Remove the 'eq', 'eq_trace', and 'goals_to_obligations' methods from 'At') - rust-lang/rust#165538 (Supertraits returns Unnormalized) - rust-lang/rust#165794 (`consider_impl_candidate` tweaks) - rust-lang/rust#160752 (Avoid inference constraints from opaque blanket impls) - rust-lang/rust#163187 (add `scalbn` and `ilogb` methods on floats) - rust-lang/rust#164541 (Add regression test for rust-lang/rust#152415) - rust-lang/rust#164543 (Add regression test for rust-lang/rust#151316) - rust-lang/rust#165920 (Introduce compute_abi helper and ComputeCallConv trait) - rust-lang/rust#166313 (Move `rustdoc-ui` tests in the right folder) - rust-lang/rust#166420 ([rustdoc] Fix search index generation: if crate content didn't change, it should generate the same search index) - rust-lang/rust#166485 (Allow passing `--exact-match` and `--purge` to `x perf`)
View all comments
part of #155345.
It gets thorny pretty quickly. I kept the changes minimal to make them easier to review, but it'll take some time to streamline everything.
r? @ShoyuVanilla