Skip to content

Commit ef2bf79

Browse files
committed
update lint declaration
1 parent c40aaf9 commit ef2bf79

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

clippy_lints/src/needless_path_new.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@ use std::iter;
1212

1313
declare_clippy_lint! {
1414
/// ### What it does
15+
/// Detects expressions being enclosed in `Path::new` when passed to a function that accepts
16+
/// `impl AsRef<Path>`, when the enclosed expression could be used.
1517
///
1618
/// ### Why is this bad?
17-
/// Too verbose
19+
/// It is unnecessarily verbose
1820
///
1921
/// ### Example
2022
/// ```no_run
@@ -26,10 +28,11 @@ declare_clippy_lint! {
2628
/// # use std::{fs, path::Path};
2729
/// fs::write("foo.txt", "foo");
2830
/// ```
29-
#[clippy::version = "1.88.0"]
31+
#[clippy::version = "1.89.0"]
3032
pub NEEDLESS_PATH_NEW,
3133
nursery,
32-
"default lint description"
34+
"an argument passed to a function that accepts `impl AsRef<Path>` \
35+
being enclosed in `Path::new` when the argument implements the trait"
3336
}
3437

3538
declare_lint_pass!(NeedlessPathNew => [NEEDLESS_PATH_NEW]);

0 commit comments

Comments
 (0)