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

Downgrade match_wild_err_arm to pedantic and update help messages #5622

Merged
merged 2 commits into from
May 20, 2020

Conversation

elichai
Copy link
Contributor

@elichai elichai commented May 20, 2020

Hi,
This fixes #3688 and downgrades match_wild_err_arm to pedantic.
There are a lot of different reasons in that issue, for me the biggest are:

  1. Rust's errors aren't like Java's exceptions because they're type safe and in most cases the type of error can't change by itself.
  2. Sometimes matching can be more ergonomic, and before the track_caller feature got introduced it was actually easier to track the panic location with explicit panic! than with expect.

Currently clippy is failing to build because of a breaking change in rust-lang/rust#69171 I tried fixing it but it is too complex for my little knowledge of clippy and rustc so I'll leave that to people who know what they're doing :)

Another thing, if rustc is breaking clippy a lot then maybe it's better to use something like miri does, where it's hard codes the latest tested rustc commit and they keep bumping it, that way when you develop locally it should work even if there was a breaking change (https://github.com/rust-lang/miri/blob/master/rustup-toolchain#L23-L29)

changelog: Downgrade match_wild_err_arm to pedantic

@elichai elichai force-pushed the 2020-05-match_wild_err_arm branch from 98a0d1d to 9ff599f Compare May 20, 2020 11:11
@flip1995 flip1995 added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label May 20, 2020
@flip1995
Copy link
Member

Thanks! We currently looking in pinning a nightly.

@bors r+

@bors
Copy link
Collaborator

bors commented May 20, 2020

📌 Commit 9ff599f has been approved by flip1995

@bors
Copy link
Collaborator

bors commented May 20, 2020

🔒 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 self is your fork and upstream is this repository, you can resolve the conflict following these steps:

  1. git checkout 2020-05-match_wild_err_arm (switch to your branch)
  2. git fetch upstream master (retrieve the latest master)
  3. git rebase upstream/master -p (rebase on top of it)
  4. Follow the on-screen instruction to resolve conflicts (check git status if you got lost).
  5. git push self 2020-05-match_wild_err_arm --force-with-lease (update this PR)

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 git merge instead of git rebase which makes the PR commit history more difficult to read.

Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Cargo.lock conflict is handled during merge and rebase. This is normal, and you should still perform step 5 to update this PR.

Error message
Auto-merging src/lintlist/mod.rs
Auto-merging clippy_lints/src/matches.rs
Auto-merging clippy_lints/src/lib.rs
CONFLICT (content): Merge conflict in clippy_lints/src/lib.rs
Automatic merge failed; fix conflicts and then commit the result.

@flip1995 flip1995 added S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties labels May 20, 2020
@bors
Copy link
Collaborator

bors commented May 20, 2020

☔ The latest upstream changes (presumably #5582) made this pull request unmergeable. Please resolve the merge conflicts.

@elichai elichai force-pushed the 2020-05-match_wild_err_arm branch from 9ff599f to 2db7f1a Compare May 20, 2020 13:46
@elichai
Copy link
Contributor Author

elichai commented May 20, 2020

@flip1995 Thanks!
I rebased on master and also pushed a commit updating a stderr change that is unrelated.

@flip1995
Copy link
Member

@bors r+

Thanks!

@bors
Copy link
Collaborator

bors commented May 20, 2020

📌 Commit 2db7f1a has been approved by flip1995

@bors
Copy link
Collaborator

bors commented May 20, 2020

⌛ Testing commit 2db7f1a with merge 20f09e1...

@bors
Copy link
Collaborator

bors commented May 20, 2020

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: flip1995
Pushing 20f09e1 to master...

@bors bors merged commit 20f09e1 into rust-lang:master May 20, 2020
@elichai elichai deleted the 2020-05-match_wild_err_arm branch May 21, 2020 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

match_wild_err_arm: Err(_) is not wild
3 participants