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

Change naive_bytecount applicability to MaybeIncorrect #3984

Merged
merged 1 commit into from Apr 18, 2019

Conversation

@phansch
Copy link
Member

@phansch phansch commented Apr 17, 2019

We can't use MachineApplicable here as applying the fix will cause
another error because bytecount would first have to be added to the
Cargo.toml.

Example:

error: You appear to be counting bytes the naive way
  --> $DIR/bytecount.rs:5:13
   |
LL |     let _ = x.iter().filter(|&&a| a == 0).count(); // naive byte count
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: Consider using the bytecount crate: `bytecount::count(x, 0)`

Just replacing it with the suggestion is not enough.

cc #3630

We can't use `MachineApplicable` here as applying the fix will cause
another error because `bytecount` would first have to be added to the
Cargo.toml.
@phansch phansch changed the title Change naive_bytecount applicability MaybeIncorrect Change naive_bytecount applicability to MaybeIncorrect Apr 17, 2019
@flip1995
Copy link
Member

@flip1995 flip1995 commented Apr 18, 2019

@bors r+

@bors
Copy link
Contributor

@bors bors commented Apr 18, 2019

📌 Commit 01ea9bd has been approved by flip1995

@bors
Copy link
Contributor

@bors bors commented Apr 18, 2019

Testing commit 01ea9bd with merge b834dbb...

bors added a commit that referenced this issue Apr 18, 2019
Change naive_bytecount applicability to MaybeIncorrect

We can't use `MachineApplicable` here as applying the fix will cause
another error because `bytecount` would first have to be added to the
Cargo.toml.

Example:

```
error: You appear to be counting bytes the naive way
  --> $DIR/bytecount.rs:5:13
   |
LL |     let _ = x.iter().filter(|&&a| a == 0).count(); // naive byte count
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: Consider using the bytecount crate: `bytecount::count(x, 0)`
```

Just replacing it with the suggestion is not enough.

cc #3630
@bors
Copy link
Contributor

@bors bors commented Apr 18, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: flip1995
Pushing b834dbb to master...

@bors bors merged commit 01ea9bd into rust-lang:master Apr 18, 2019
3 checks passed
3 checks passed
@travis-ci[bot]
Travis CI - Pull Request Build Passed
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
@bors
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants