-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Prevent error reporting from outputting a recursion error if it finds an ambiguous trait impl during suggestions #89576
Conversation
Issue 89275 fix and test Fix librustdoc OverflowError usage rust tidy run Issue 89275 fix and test
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @cjgillot (or someone else) soon. Please see the contribution instructions for more information. |
@@ -140,6 +140,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { | |||
Err(e) => e, | |||
}; | |||
|
|||
self.set_tainted_by_errors(); |
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.
Ha! Smart!
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.
Haha thanks, super useful someone had already put that in!
@bors try @rust-timer queue r? @estebank
Correct, it's no longer a ZST, @tom7980.
Just in case I'll run perf, but don't expect this to cause any issues, so this is r=me barring perf issues. Can you update the title and description of the PR to be more descriptive? It helps to make these easy to grok without extra context (like opening a ticket on a browser) when someone is scanning the log. |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 0950d5a with merge 790a7f732ddc50efa5a77a0b883d77d397e2028c... |
☀️ Try build successful - checks-actions |
Queued 790a7f732ddc50efa5a77a0b883d77d397e2028c with parent 25ec827, future comparison URL. |
Finished benchmarking commit (790a7f732ddc50efa5a77a0b883d77d397e2028c): comparison url. Summary: This benchmark run did not return any relevant changes. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. Benchmarking 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 led to changes in compiler perf. @bors rollup=never |
Thanks for reviewing! Have updated the title to be much more descriptive, hopefully the more I work on the compiler the better I'll know if something may be a perf issue. |
Insufficient permissions to issue commands to rust-timer. |
@bors r+ |
📌 Commit 0950d5a has been approved by |
⌛ Testing commit 0950d5a with merge 203d745b027fb775d40b5f9ff5f1df4eb3dc1f2d... |
💔 Test failed - checks-actions |
A job failed! Check out the build log: (web) (plain) Click to see the possible cause of the failure (guessed by this bot)
|
Does this need to be retried again now the build system is fixed? |
It's retried already -- in the queue: https://bors.rust-lang.org/queue/rust |
☀️ Test successful - checks-actions |
Finished benchmarking commit (e0aaffd): comparison url. Summary: This benchmark run did not return any relevant changes. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression |
Set tainted errors bit before emitting coerce suggestions. Fixes rust-lang#100246. rust-lang#89576 basically got 99% of the way there but the match typechecking code (which calls `coerce_inner`) also needed a similar fix.
Set tainted errors bit before emitting coerce suggestions. Fixes rust-lang#100246. rust-lang#89576 basically got 99% of the way there but the match typechecking code (which calls `coerce_inner`) also needed a similar fix.
Closes #89275
This fixes the compiler reporting a recursion error during another already in progress error by trying to make a conversion method suggestion and encounters ambiguous trait implementations that can convert a the original type into a type that can then be recursively converted into itself via another method in the trait.
Updated OverflowError struct to be an enum so I could differentiate between passes - it's no longer a ZST but I don't think that should be a problem as they only generate when there's an error in compiling code anyway