File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -12,9 +12,11 @@ use std::iter;
1212
1313declare_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
3538declare_lint_pass ! ( NeedlessPathNew => [ NEEDLESS_PATH_NEW ] ) ;
You can’t perform that action at this time.
0 commit comments