Implementation of RFC 2086 - Allow Irrefutable Let patterns#49469
Implementation of RFC 2086 - Allow Irrefutable Let patterns#49469bors merged 7 commits intorust-lang:masterfrom Nokel81:allow-irrefutable-let-patterns
Conversation
There was a problem hiding this comment.
Change this comment to
// gate-test-irrefutable_let_pattern
so that the computer can recognize it.
Please fix the filename of the new unstable book entry. It should be called |
There was a problem hiding this comment.
This should be #[allow(irrefutable_let_pattern)] I believe.
This comment has been minimized.
This comment has been minimized.
|
I don't quite understand what that message means, how would I make it correspond? |
kennytm
left a comment
There was a problem hiding this comment.
You forgot to rename allow_irrefutable_lets.md
There was a problem hiding this comment.
This line is too long. Split it into two lines:
#[allow(…)]
//~^ ERROR …
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@TimNN looks like the bot got some false result |
This comment has been minimized.
This comment has been minimized.
|
Okay, now I am confused. What is the conversion for naming the unstable book file? |
(Author fixed the code; Travis is still unhappy)
|
@Nokel81 🤔 Maybe try to use hyphens instead of underscores? Tidy should be fixed to suggest the naming convention if this is the case 😑 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
So here it says to use |
nikomatsakis
left a comment
There was a problem hiding this comment.
These changes look great! Presuming we can pacify travis, the only thing I think we need is a test. I imagine something that (a) enables the feature gate and then (b) adds #![deny(irrefutable_let_pattern)] and shows that indeed we get a lint error.
There was a problem hiding this comment.
Why do you have the allow here? Without the feature gate, there shouldn't be any lints generated, right?
There was a problem hiding this comment.
That is correct, however, from the RFC the default is a deny lint.
There was a problem hiding this comment.
So what I think is we should have, make sure that it fails with no gates or allow. Add the feature gate and check that it denies and then one with the feature gate and the allow
There was a problem hiding this comment.
This test was here to make sure that the feature gate was also required
There was a problem hiding this comment.
the default is a deny lint
Hmm, that's odd. We don't usually do deny-by-default lints...
There was a problem hiding this comment.
In any case I agree testing all the combinations is good. The matter of default setting is separate and can be discussed on the tracking issue.
|
☔ The latest upstream changes (presumably #49696) made this pull request unmergeable. Please resolve the merge conflicts. |
|
So while looking in |
I would have expected the default to be "warn", not allow |
|
Makes more sense now |
|
(Please remember to squash the commits with an informative message before merging this.) |
|
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 |
|
Ok, this failure is legit. Apparently Travis times out (30m) while doctesting the new page in the unstable book. |
|
Is "doctest" a specific thing? Is there a page I can read so I can manually check the unstable book page?Or do I have to write some explicit tests for the page?
|
|
Doctesting means trying to compile code snippets in a documentation page. It's done automatically to ensure all code snippets in the Rust documentation are valid. The only code block in that page is this, so that's probably the cause. |
|
I see, will fix this tonight then.
|
|
@pietroalbini I have looked into the code that is in the unstable book page but it is the exact same (except for comments) of the code in |
|
@Nokel81 can you try not having an infinite loop in that snippet? |
|
r=me if travis is happy |
|
@bors r=nikomatsakis |
|
📌 Commit 9168034 has been approved by |
|
⌛ Testing commit 9168034 with merge c191d63009a37669b90dd060ed2000e20b22a0e6... |
|
💔 Test failed - status-travis |
|
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 |
1 similar comment
|
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 |
|
@bors retry |
…matsakis Implementation of RFC 2086 - Allow Irrefutable Let patterns This is the set of changes for RFC2086. Tracking issue #44495. Rendered [here](rust-lang/rfcs#2086)
|
☀️ Test successful - status-appveyor, status-travis |
This is the set of changes for RFC2086. Tracking issue #44495. Rendered here