Skip to content

Commit 1f63044

Browse files
committed
WIP: don't change parameters referring to generic args used in return type
1 parent 9fc93dd commit 1f63044

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

clippy_lints/src/needless_path_new.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ fn check_arguments<'tcx>(
107107
let inputs_and_output = fn_sig.inputs().iter().copied().chain([fn_sig.output()]);
108108
inputs_and_output.filter(|i| i.contains(*g)).count() < 2
109109
})
110+
// don't want to mess with the output type, since that probably has some additional
111+
// restrictions imposed from the outside, which we don't want to bother checking
112+
.filter(|g| !fn_sig.output().contains(*g))
110113
.collect();
111114
dbg!(&generic_args_we_can_change);
112115

0 commit comments

Comments
 (0)