-
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
Improve suggestions for returning binding #99539
Improve suggestions for returning binding #99539
Conversation
r? @fee1-dead (rust-highfive has picked a reviewer for you, use r? to override) |
21ca82f
to
e6588dc
Compare
@bors try @rust-timer queue will probably just come back with noise.. |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
🔒 Merge conflict This pull request and the master branch diverged in a way that cannot be automatically merged. Please rebase on top of the latest master branch, and let the reviewer approve again. How do I rebase?Assuming
You may also read Git Rebasing to Resolve Conflicts by Drew Blessing for a short tutorial. Please avoid the "Resolve conflicts" button on GitHub. It uses Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Error message
|
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
e6588dc
to
d1db3cf
Compare
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit d1db3cf40b0bd96f6521ea338dce52457935eab5 with merge e55802f787a29518ae5d5174349d8aa47458e9f8... |
@@ -55,6 +47,14 @@ LL | fn return_targets_async_block_not_fn() -> u8 { | |||
| | | |||
| implicitly returns `()` as its body has no tail or `return` expression | |||
|
|||
error[E0271]: type mismatch resolving `<impl Future<Output = u8> as Future>::Output == ()` |
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.
The output of this test moved in the last PR, too... I think it's just some FxHash*
instability somewhere, but seems unrelated.
☀️ Try build successful - checks-actions |
Queued e55802f787a29518ae5d5174349d8aa47458e9f8 with parent be9cfb3, future comparison URL. |
Finished benchmarking commit (e55802f787a29518ae5d5174349d8aa47458e9f8): comparison url. Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results
CyclesResults
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 may lead to changes in compiler perf. @bors rollup=never Footnotes |
Well, at least it's not a regression lol. @bors rollup- |
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.
only done a few, expect more later
d1db3cf
to
a90010b
Compare
a90010b
to
8926dac
Compare
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.
Overall looks good, left some nits.
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.
Great work! Sorry for the one last nit. r= me once that is resolved.
fb63313
to
3eef023
Compare
@bors r=fee1-dead |
LL + s | ||
LL ~ |
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 was gonna make a comment about this and then I realized it is the elided //~ERROR
😅
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.
Yeah, it renders everything up to the //
on the next line, which is just whitespace...
// run-rustfix | ||
|
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.
Could we keep some rustfix version? What made it no longer apply neatly? I usually split files like these into two, one for things that are rustfix and another for the ones that aren't.
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.
It wasn't that, @fee1-dead just didn't think that this was MachineApplicable
worthy and I didn't feel strongly either way.
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 think there's a category between MachineApplicable
and MaybeIncorrect
that's like "probably right given no other options", which this suggestion falls into.
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.
given that this is already in the queue we could split this into two files in a followup PR.
= note: expected a closure with arguments `(((_, _), _),)` | ||
found a closure with arguments `(_,)` |
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.
Interesting regression 🤔
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.
It's not a regression, per se. The original note was nonsense, because the reason that this impl Fn(((_, _), _))
does not implement Fn<(_,)>
is unrelated to arg mismatch and has to do with some cyclical closure stuff. This was just revealed because now (((_, _), _),)
and (_,)
are "same type modulo infer".
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.
Ah! I see. Neat.
…-suggestions, r=fee1-dead Improve suggestions for returning binding Fixes rust-lang#99525 Also reworks the cause codes for match and if a bit, I think cleaning them up in a positive way. We no longer need to call `could_remove_semicolon` in successful code, which might save a few cycles?
Rollup of 6 pull requests Successful merges: - rust-lang#98174 (Rename `<*{mut,const} T>::as_{const,mut}` to `cast_`) - rust-lang#98868 (Fix unreachable coverage generation for inlined functions) - rust-lang#99393 (feat: omit suffixes in const generics (e.g. `1_i32`)) - rust-lang#99423 (Group CSS font rule) - rust-lang#99539 (Improve suggestions for returning binding) - rust-lang#99579 (Add same warning to Result::expect as Result::unwrap) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Fixes #99525
Also reworks the cause codes for match and if a bit, I think cleaning them up in a positive way.
We no longer need to call
could_remove_semicolon
in successful code, which might save a few cycles?