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

Add some testcases for recent rustfix update #8880

Merged
merged 2 commits into from
May 24, 2022

Conversation

hellow554
Copy link
Contributor

changelog: none

This adds a testcase for a bugfix that has been fixed by https://github.com/rust-lang/rustfix/tree/v0.6.1

rustfix is pulled in by compiletest_rs. So to test that the correct rustfix version is used, I added one (and a half) testcase.

I tried to add a testcase for #8734 as well, but interesting enough the rustfix is wrong:

 fn issue8734() {
     let _ = [0u8, 1, 2, 3]
         .into_iter()
-        .and_then(|n| match n {
+        .flat_map(|n| match n {
+            1 => [n
+                .saturating_add(1)
             1 => [n
                 .saturating_add(1)
                 .saturating_add(1)
                 .saturating_add(1)
                 .saturating_add(1)
                 .saturating_add(1)
                 .saturating_add(1)
                 .saturating_add(1)
                 .saturating_add(1)],
             n => [n],
         });
 }

this needs some investigation and then this testcase needs to be enabled by commenting it out

closes #8878
related to #8734

@rust-highfive
Copy link

r? @Manishearth

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label May 24, 2022
@Manishearth
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented May 24, 2022

📌 Commit 04297de has been approved by Manishearth

@bors
Copy link
Contributor

bors commented May 24, 2022

⌛ Testing commit 04297de with merge 67a0891...

@bors
Copy link
Contributor

bors commented May 24, 2022

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: Manishearth
Pushing 67a0891 to master...

@bors bors merged commit 67a0891 into rust-lang:master May 24, 2022
@hellow554 hellow554 deleted the rustfix_update branch May 25, 2022 05:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clippy slice panic on --fix
4 participants