-
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
Stabilize allow irrefutable if-let patterns #55639
Conversation
r? @oli-obk (rust_highfive has picked a reviewer for you, use r? to override) |
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 seems mostly good; But I'd also like tests ensuring that #[allow(...)]
and #[deny(...)]
to the right thing...
src/test/ui/rfc-2086-irrefutable_let_patterns/deny-irrefutable-if-let.stderr
Show resolved
Hide resolved
|
||
#[deny(irrefutable_let_patterns)] | ||
fn main() { | ||
if let _ = 5 { |
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.
Put an error check ~ error: irrefutable if-let pattern
or so here so that the test is more robust.
r? @estebank |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
Also, please keep the commit log clean of merges. Rebase on top of latest master instead. |
I should be able to do it. |
@estebank I am trying to implement your recommendations (including the rebase which doesn't seem to have gone very well) but I am getting compiling panics locally with build |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
You will need to fix the rebase. It seems like your best choice at this point might be to just compare against your local master to get the appropriate changes, as it might be easier to do correctly. Alternatively, you can try following https://medium.com/@jeffreymmeyers/recovering-a-bad-git-rebase-with-git-reflog-e6ddedf02329. You will also have to update the E0162 error cases and text in the index at |
☔ The latest upstream changes (presumably #56032) made this pull request unmergeable. Please resolve the merge conflicts. |
Ping from triage @Nokel81: It looks like your PR needs to be rebased. |
Hey @Nokel81; do you think you can get this into a ready state by Monday (2018-12-03)? |
@Centril I think I will be able to. |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
cc @eddyb, can you help out here? |
You're seeing doctest failures in rust/src/librustc_mir/diagnostics.rs Line 347 in 8ec22e7
rust/src/librustc_mir/diagnostics.rs Line 374 in 8ec22e7
|
@Nokel81 Search for the error codes, |
I will do a rebase later today |
src/test/ui/rfc-2086-irrefutable_let_patterns/allow_irrefutable_let_patterns.stderr
Outdated
Show resolved
Hide resolved
File: allow_irrefutable_let_patterns.rs
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
☔ The latest upstream changes (presumably #56557) made this pull request unmergeable. Please resolve the merge conflicts. |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
|
@@ -686,6 +683,9 @@ declare_features! ( | |||
(accepted, extern_crate_item_prelude, "1.31.0", Some(55599), None), | |||
// Allows use of the `:literal` macro fragment specifier (RFC 1576). | |||
(accepted, macro_literal_matcher, "1.31.0", Some(35625), None), | |||
// Allows irrefutable patterns in if-let and while-let statements (RFC 2086) | |||
(accepted, irrefutable_let_patterns, "1.32.0", Some(44495), None), |
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.
(accepted, irrefutable_let_patterns, "1.32.0", Some(44495), None), | |
(accepted, irrefutable_let_patterns, "1.33.0", Some(44495), None), |
It slipped so you'll have to bump the version.
☔ The latest upstream changes (presumably #57063) made this pull request unmergeable. Please resolve the merge conflicts. |
ping from triage @Nokel81 you need to address the changes requested and the conflicts |
#response_container_BBPPID{font-family: initial; font-size:initial; color: initial;} Thanks, I just haven't had enough time. Sorry! But thank you very much. Sebastian Malton From: notifications@github.comSent: January 11, 2019 10:15 PMTo: rust@noreply.github.comReply to: reply@reply.github.comCc: sebastian@malton.name; mention@noreply.github.comSubject: Re: [rust-lang/rust] Stabilize allow irrefutable if-let patterns (#55639) I've opened #57535 to stabilise if-let patterns, as we want to get it in before the beta cut-off. Thanks for your work, @Nokel81! You're a coauthor on the change, so your work didn't go to waste.
—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or mute the thread.
|
…rns, r=Centril Stabilise irrefutable if-let and while-let patterns This stabilises RFC 2086 (rust-lang#44495). This replaces rust-lang#55639, as we want to stabilise this in time for the beta cut-off. Closes rust-lang#55639. r? @Centril
This PR is for the stabilization of RFC 2086