We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
args.len()
1 parent 476e3b1 commit a0b0291Copy full SHA for a0b0291
clippy_lints/src/needless_path_new.rs
@@ -106,8 +106,6 @@ fn check_arguments<'tcx>(
106
for (argument, parameter) in iter::zip(arguments, parameters) {
107
if let ExprKind::Call(func, args) = argument.kind
108
&& is_path_new(func)
109
- // just to be extra sure that we have a correctly formed `Path::new(x)` call
110
- && args.len() == 1
111
&& implements_asref_path(cx.typeck_results().expr_ty(&args[0]))
112
&& implements_asref_path(*parameter)
113
{
0 commit comments