about summary refs log tree commit diff
path: root/clippy_utils/src/paths.rs
AgeCommit message (Collapse)AuthorLines
2025-02-20Merge remote-tracking branch 'upstream/master' into rustupPhilipp Krones-6/+0
2025-02-12New lint: `unbuffered_bytes`jonathan-0/+1
2025-01-09Merge commit '19e305bb57a7595f2a8d81f521c0dd8bf854e739' into ↵Philipp Krones-0/+2
clippy-subtree-update
2024-12-29Move more def paths into `clippy_utils::paths`Guillaume Gomez-0/+2
2024-12-26Merge commit '609cd310be44677ae31d452a17b0f8207e1abfe1' into ↵Philipp Krones-1/+0
clippy-subtree-update
2024-12-15Merge remote-tracking branch 'upstream/master' into rustupPhilipp Krones-1/+0
2024-11-28Merge commit 'ff4a26d442bead94a4c96fb1de967374bc4fbd8e' into ↵Philipp Krones-1/+1
clippy-subtree-update
2024-11-15Move MSRV implementation to clippy_utilsPhilipp Krones-1/+1
2024-09-24Merge commit '7901289135257ca0fbed3a5522526f95b0f5edba' into ↵Philipp Krones-1/+5
clippy-subtree-update
2024-09-22Merge remote-tracking branch 'upstream/master' into rustupPhilipp Krones-1/+5
2024-09-20[Clippy] Remove final std paths for diagnostic itemGnomedDev-2/+1
2024-09-19Categorise paths in `clippy_utils::paths`GnomedDev-13/+20
2024-09-19[Clippy] Swap `open_options` to use diagnostic items instead of pathsGnomedDev-2/+0
2024-09-19[Clippy] Swap `iter_over_hash_type` to use diagnostic items instead of pathsGnomedDev-8/+0
2024-09-19[Clippy] Swap `non_octal_unix_permissions` to use diagnostic item instead of ↵GnomedDev-2/+0
path
2024-09-19[Clippy] Swap `unnecessary_owned_empty_strings` to use diagnostic item ↵GnomedDev-1/+0
instead of path
2024-09-19[Clippy] Swap `manual_strip` to use diagnostic items instead of pathsGnomedDev-3/+0
2024-09-19[Clippy] Swap `unnecessary_to_owned` to use diagnostic item instead of pathGnomedDev-1/+0
2024-09-19[Clippy] Swap `instant_subtraction` to use diagnostic item instead of pathGnomedDev-1/+0
2024-09-19[Clippy] Swap `waker_clone_wake` to use diagnostic item instead of pathGnomedDev-1/+0
2024-09-19[Clippy] Swap `filter_map_bool_then` to use diagnostic item instead of pathGnomedDev-1/+0
2024-09-19[Clippy] Swap `manual_while_let_some` to use diagnostic items instead of pathsGnomedDev-4/+0
2024-09-19[Clippy] Swap `repeat_vec_with_capacity` to use diagnostic item instead of pathGnomedDev-1/+0
2024-09-19[Clippy] Swap `VecArgs::hir` to use diagnostic items instead of pathsGnomedDev-3/+0
2024-09-19[Clippy] Swap `single_char_add_str`/`format_push_string` to use diagnostic ↵GnomedDev-2/+0
items instead of paths
2024-09-19[Clippy] Swap `manual_main_separator_str` to use diagnostic item instead of pathGnomedDev-1/+0
2024-09-19[Clippy] Swap `redundant_clone` to use diagnostic items instead of pathsGnomedDev-2/+0
2024-09-19[Clippy] Swap `float_equality_without_abs` to use diagnostic items instead ↵GnomedDev-2/+0
of paths
2024-09-19[Clippy] Swap `option_as_ref_deref` to use diagnostic items instead of pathsGnomedDev-7/+0
2024-09-19[Clippy] Swap `lines_filter_map_ok` to use a diagnostic item instead of pathGnomedDev-1/+0
2024-09-19[Clippy] Swap `map_entry` to use diagnostic items instead of pathsGnomedDev-4/+0
2024-09-18[Clippy] Swap `manual_retain` to use diagnostic items instead of pathsGnomedDev-9/+0
2024-08-27new lint: `zombie_processes`y21-0/+4
2024-08-25check std::panic::panic_any in panic lintkyoto7250-0/+1
2024-08-08Merge commit 'cb806113e0f83a8f9b47d35b453b676543bcc40e' into ↵Philipp Krones-1/+0
clippy-subtree-update
2024-08-08Merge remote-tracking branch 'upstream/master' into rustupPhilipp Krones-1/+0
2024-07-11Merge commit 'b794b8e08c16517a941dc598bb1483e8e12a8592' into ↵Philipp Krones-0/+1
clippy-subtree-update
2024-07-05Auto merge of #11656 - y21:unnecessary_string_from_utf8, r=Jarchobors-0/+1
[`unnecessary_to_owned`]: catch `to_owned` on byte slice to create temporary `&str` Closes #11648 Detects the pattern `&String::from_utf8(bytes.to_vec()).unwrap()` and suggests `core::str::from_utf8(bytes).unwrap()`, which avoids the unnecessary intermediate allocation. I decided to put this in the existing `unnecessary_to_owned` lint (rather than creating a new lint) for a few reasons: - we get to use some of its logic (for example, recognizing any of the functions in the `to_owned` family, e.g. `to_vec`) - the actual inefficient operation that can be avoided here is the call to `.to_vec()`, so this is in a way similar to the other cases caught by `unnecessary_to_owned`, just through a bunch of type conversions - we can make this more "generic" later and catch other cases, so imo it's best not to tie this lint specifically to the `String` type changelog: [`unnecessary_to_owned`]: catch `&String::from_utf8(bytes.to_vec()).unwrap()` and suggest `core::str::from_utf8(bytes).unwrap()`
2024-06-27Merge commit '68a799aea9b65e2444fbecfe32217ce7d5a3604f' into ↵Philipp Krones-1/+0
clippy-subtree-update
2024-06-20resolve `clippy::invalid_paths` on `bool::then`Kisaragi Marine-1/+0
2024-06-20[`unnecessary_to_owned`]: catch to_owned from byte slice to stringy21-0/+1
2024-05-02Auto merge of #12743 - CBSpeir:remove-paths-vec_resize, r=y21bors-3/+0
Remove `dead_code` paths The following paths are `dead_code` and can be removed: ### `clippy_utils::paths::VEC_RESIZE` * Introduced when `vec_resize_to_zero` lint added in PR https://github.com/rust-lang/rust-clippy/pull/5637 * No longer used after commit https://github.com/rust-lang/rust-clippy/pull/8957/commits/8acc4d2f1e255e0e97e48b7a285a7d6db4a03bd6 ### `clippy_utils::paths::SLICE_GET` * Introduced when `get_first` lint added in PR https://github.com/rust-lang/rust-clippy/pull/8882 * No longer used after commit https://github.com/rust-lang/rust-clippy/pull/8957/commits/a8d80d531f1d358c26295eb3d81624594544dd4b ### `clippy_utils::paths::STR_BYTES` * Introduced when `bytes_count_to_len` lint added in PR https://github.com/rust-lang/rust-clippy/pull/8711 * No longer used after commit https://github.com/rust-lang/rust-clippy/pull/8957/commits/ba6a4595285e38f35970e66db903475989e0be6f When the lints were moved into the `Methods` lint pass, they switched from using paths to diagnostic items. However, the paths were never removed. This occurred in PR https://github.com/rust-lang/rust-clippy/pull/8957. This relates to issue https://github.com/rust-lang/rust-clippy/issues/5393 changelog: none
2024-05-02Merge remote-tracking branch 'upstream/master' into rustupPhilipp Krones-2/+0
2024-05-01Remove clippy_utils::paths::{SLICE_GET, STR_BYTES}Christopher B. Speir-2/+0
Both clippy_utils::paths::SLICE_GET and clippy_utils::paths::STR_BYTES are dead_code and can therefore be removed.
2024-05-01Remove clippy_utils::paths::VEC_RESIZEChristopher B. Speir-1/+0
This path is no longer used and can be removed.
2024-03-21Merge commit '9d6f41691ed9dbfaec2a2df2661c42451f2fe0d3' into ↵Philipp Krones-0/+2
clippy-subtree-update
2024-03-13[`unused_enumerate_index`]: trigger on method callsEthiraric-0/+2
The lint used to check for patterns looking like: ```rs for (_, x) in some_iter.enumerate() { // Index is ignored } ``` This commit further checks for chained method calls constructs where we can detect that the index is unused. Currently, this checks only for the following patterns: ```rs some_iter.enumerate().map_function(|(_, x)| ..) let x = some_iter.enumerate(); x.map_function(|(_, x)| ..) ``` where `map_function` is one of `all`, `any`, `filter_map`, `find_map`, `flat_map`, `for_each` or `map`. Fixes #12411.
2024-03-07Merge commit '93f0a9a91f58c9b2153868f458402155fb6265bb' into ↵Philipp Krones-1/+0
clippy-subtree-update
2024-03-07Merge remote-tracking branch 'upstream/master' into rustupPhilipp Krones-1/+0
2024-02-28Rename `DiagnosticBuilder` as `Diag`.Nicholas Nethercote-1/+1
Much better! Note that this involves renaming (and updating the value of) `DIAGNOSTIC_BUILDER` in clippy.