Skip to content
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

Rustup #6071

Merged
merged 8 commits into from
Sep 21, 2020
Merged

Rustup #6071

merged 8 commits into from
Sep 21, 2020

Conversation

ebroto
Copy link
Member

@ebroto ebroto commented Sep 21, 2020

r? @ghost

changelog: none

CDirkx and others added 8 commits September 20, 2020 03:32
Update the test `redundant_pattern_matching`: check if `is_ok` and `is_err` are suggested within const contexts.
Also removes the `redundant_pattern_matching_const_result` test, as it is no longer needed.
`is_ok` and `is_err` are stabilized as const and can thus always be suggested.
Co-authored-by: Ralf Jung <post@ralfj.de>
Stabilize some Result methods as const

Stabilize the following methods of Result as const:
 - `is_ok`
 - `is_err`
 - `as_ref`

A test is also included, analogous to the test for `const_option`.

These methods are currently const under the unstable feature `const_result` (tracking issue: #67520).
I believe these methods to be eligible for stabilization because of the stabilization of #49146 (Allow if and match in constants) and the trivial implementations, see also: [PR#75463](rust-lang/rust#75463) and [PR#76135](rust-lang/rust#76135).

Note: these methods are the only methods currently under the `const_result` feature, thus this PR results in the removal of the feature.

Related: #76225
Update the test `redundant_pattern_matching`: check if `is_some` and `is_none` are suggested within const contexts.
Removes `can_suggest` from as it is no longer used.
Reverts rust-clippy#5724.
This is to avoid the 200 lines stderr file limit
@ebroto
Copy link
Member Author

ebroto commented Sep 21, 2020

@bors r+ p=9001

@bors
Copy link
Collaborator

bors commented Sep 21, 2020

📌 Commit 4117ae1 has been approved by ebroto

@bors
Copy link
Collaborator

bors commented Sep 21, 2020

⌛ Testing commit 4117ae1 with merge 78fbb04...

@bors
Copy link
Collaborator

bors commented Sep 21, 2020

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: ebroto
Pushing 78fbb04 to master...

@bors bors merged commit 78fbb04 into rust-lang:master Sep 21, 2020
@ebroto ebroto deleted the rustup branch September 21, 2020 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants