-
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
selection failure: recompute applicable impls #103252
Conversation
fe839c3
to
026ef10
Compare
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 026ef1007007420a7e7e7ca26b12ff73d1c7fd1d with merge 693bcdf375a5de5bd69df28f9984da1c1c64bea5... |
☀️ Try build successful - checks-actions |
Queued 693bcdf375a5de5bd69df28f9984da1c1c64bea5 with parent ebdde35, future comparison URL. |
Finished benchmarking commit (693bcdf375a5de5bd69df28f9984da1c1c64bea5): comparison URL. Overall result: ✅ 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)ResultsThis 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.
CyclesThis benchmark run did not return any relevant results for this metric. Footnotes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is going to take me more time than I have right now to do a real review, but I'm somewhat concerned about the extra duplicate diagnostics here. I'd like to get @estebank's okay on that.
I'll try to do an actual review by end of this weekend.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes themselves make sense to me, but as I said, I'd like @estebank's thoughts on duplicated errors
026ef10
to
cc5ffcf
Compare
compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sad to see duplicated errors, but I can also see a path forward to deduplicate based purely on the main span if that's our only choice. I'm looking further to see if I can think of a deduplication mechanism we can use before landing, but won't block moving forward.
cc5ffcf
to
2afa416
Compare
@bors r=jackh726 |
📌 Commit 2afa416a30b6ed286864c81760caf2fbeb43dc91 has been approved by It is now in the queue for this repository. |
⌛ Testing commit 2afa416a30b6ed286864c81760caf2fbeb43dc91 with merge 4cdc4e4b913b4e277a85a689a0e7babe239ac714... |
This comment has been minimized.
This comment has been minimized.
💔 Test failed - checks-actions |
📌 Commit 689dcc4dee059af553c4324afd474afe853cfef5 has been approved by It is now in the queue for this repository. |
⌛ Testing commit 689dcc4dee059af553c4324afd474afe853cfef5 with merge 8b47b1072029bed5d029c44d7c9200dca1e0bfbc... |
💔 Test failed - checks-actions |
This comment has been minimized.
This comment has been minimized.
689dcc4
to
a45ea63
Compare
a45ea63
to
91d5a32
Compare
@@ -38,7 +38,7 @@ impl<'tcx> TraitEngineExt<'tcx> for dyn TraitEngine<'tcx> { | |||
|
|||
fn new_in_snapshot(tcx: TyCtxt<'tcx>) -> Box<Self> { | |||
if tcx.sess.opts.unstable_opts.chalk { | |||
Box::new(ChalkFulfillmentContext::new()) | |||
Box::new(ChalkFulfillmentContext::new_in_snapshot()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed for the changes here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, because ObligationCtxt::new_in_snapshot
is used in fn recompute_ambiguous_candidates
inside of a snapshot
@bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (85f4f41): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis 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.
CyclesThis benchmark run did not return any relevant results for this metric. |
The way we currently skip errors for ambiguous trait obligations seems pretty fragile so we get some duplicate errors because of this.
Removing this info from selection errors changes this system to be closer to my image of our new trait solver and is also making it far easier to change overflow errors to be non-fatal ✨
r? types cc @estebank