Uh oh!
There was an error while loading. Please reload this page.
Update Clippy - #74792
Merged
Merged
Conversation
The "use .next()" replacement advice is on the last line of the code snippet, where it is vulnerable to truncation. Display that advice at the beginning instead. closesrust-lang#5783
Closesrust-lang#2277 This was fixed when we fixedrust-lang#2542.
This lint catches cases where the last statement of a closure expecting an instance of Ord has a trailing semi-colon. It compiles since the closure ends up return () which also implements Ord but causes unexpected results in cases such as sort_by_key. Fixesrust-lang#5080 reprise: rebase, update and address all concerns
Reprise: new lint: Unintentional return of unit from closures expecting Ord This lint catches cases where the last statement of a closure expecting an instance of Ord has a trailing semi-colon. It compiles since the closure ends up return () which also implements Ord but causes unexpected results in cases such as sort_by_key. Fixesrust-lang#5080 Reprise of rust-lang#5348 where I addressed all the comments there changelog: add lint [`unit_return_expecting_ord`]
improve advice in iter_nth_zero fixesrust-lang#5783 *Please keep the line below* changelog: For iter_nth_zero, the "use .next()" replacement advice is on the last line of the code snippet, where it is vulnerable to truncation. Display that advice at the beginning instead.
Add test for `needless_range_loop` issue Closesrust-lang#2277 This was fixed when we fixedrust-lang#2542. changelog: none
In various ways, such as changing functions to take a `Symbol` instead of a `&str`.
Rustup r? @ghost changelog: none
…1995 Removing RHS snippet from SHADOW_UNRELATED message. Fixesrust-lang#5703 I am not sure if I reinvented the wheel here, but I could not really find a snippet function that did this truncation, so I created the function. Please tell me if there was a more obvious way to do this, I am new here. 😄 changelog: Truncates multi-line RHS in shadow_unrelated message if it has more than 5 lines.
Backport remerge rust-1.44.1 r? @ghost changelog: none
Since the beta/ directory already exists, we can't copy the complete master dir
Fix deploy script for beta deployment Since the `beta/` directory already exists, we can't copy the complete `master` dir changelog: none
Changelog [Rendered](https://github.com/flip1995/rust-clippy/blob/changelog/CHANGELOG.md) changelog: none
It's intended only for very temporary use.
…atthiaskrgr redundant_closure_call - don't lint when used more than once Fixesrust-lang#3354. changelog: fix redundant_closure_call false positive when closure called more than once
"Redundant" clones of `ManuallyDrop` are sometimes used for the side effect of
invoking the clone, without running the drop implementation of the inner type.
In other words, they aren't really redundant. For example, futures-rs crate:
```rust
#[allow(clippy::redundant_clone)] // The clone here isn't actually redundant.
unsafe fn increase_refcount<T: ArcWake>(data: *const ()) {
// Retain Arc, but don't touch refcount by wrapping in ManuallyDrop
let arc = mem::ManuallyDrop::new(Arc::<T>::from_raw(data as *const T));
// Now increase refcount, but don't drop new refcount either
let _arc_clone: mem::ManuallyDrop<_> = arc.clone();
}
```
Ignore redundant clone lint for ManuallyDrop.…arth
Ignore not really redundant clones of ManuallyDrop
"Redundant" clones of `ManuallyDrop` are sometimes used for the side effect of
invoking the clone, without running the drop implementation of the inner type.
In other words, they aren't really redundant. For example, futures-rs crate:
```rust
#[allow(clippy::redundant_clone)] // The clone here isn't actually redundant.
unsafe fn increase_refcount<T: ArcWake>(data: *const ()) {
// Retain Arc, but don't touch refcount by wrapping in ManuallyDrop
let arc = mem::ManuallyDrop::new(Arc::<T>::from_raw(data as *const T));
// Now increase refcount, but don't drop new refcount either
let _arc_clone: mem::ManuallyDrop<_> = arc.clone();
}
```
changelog: Ignore redundant clone lint for ManuallyDrop.This commit modifies the `substitute_normalize_and_test_predicates` query, renaming it to `impossible_predicates` and only checking predicates which do not require substs. By making this change, polymorphization doesn't have to explicitly support vtables. Signed-off-by: David Wood <david@davidtw.co>
trait_sel: only test predicates w/ no substs r? @ghost changelog: none
…earth Update Usage section of README.md Fixesrust-lang#5826 changelog: none
Use `(std::)f64::EPSILON` in the examples as suggested in the lints
`float_cmp(_const)` suggests using `{f32|f64}::EPSILON` and it'd be great if the docs mentioned it.
changelog: none…=yaahc Fix FP `useless_conversion` Fixrust-lang#5833. changelog: none
Manishearth
commented
Jul 26, 2020
Member
@bors r+ p=1 |
bors
commented
Jul 26, 2020
Collaborator
📌 Commit e4e1b8c has been approved by |
bors
commented
Jul 26, 2020
Collaborator
bors
commented
Jul 26, 2020
Collaborator
☀️ Test successful - checks-actions, checks-azure |
mark-i-m
commented
Jul 27, 2020
Contributor
Somehow this caused a massive speedup? https://perf.rust-lang.org/compare.html?start=62392966a3937362146d7228444c8d843d972857&end=6c8927b0cf80ceee19386026cf9d7fd4fd9d486f&stat=instructions:u Am I misunderstanding something? |
Mark-Simulacrum
commented
Jul 27, 2020
Member
See rust-lang/rustc-perf#728, some upstream (rustc-perf) work landed right before this commits benchmark. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Biweekly Clippy Sync
r? @Manishearth