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.
1 parent 0cc146e commit cdbcdd1Copy full SHA for cdbcdd1
clippy_lints/src/needless_path_new.rs
@@ -87,14 +87,16 @@ fn check_arguments<'tcx>(
87
88
if let ty::FnDef(def_id, ..) = type_definition.kind() {
89
let parameters = dbg!(type_definition.fn_sig(tcx)).skip_binder().inputs();
90
+
91
+ let bounds = tcx.param_env(def_id).caller_bounds();
92
+ dbg!(bounds);
93
94
for (argument, parameter) in iter::zip(arguments, parameters) {
95
if let ExprKind::Call(func, args) = argument.kind
96
&& is_path_new(func)
97
&& implements_asref_path(cx.typeck_results().expr_ty(&args[0]))
98
&& implements_asref_path(*parameter)
99
{
- let bounds = tcx.param_env(def_id).caller_bounds();
- dbg!(bounds);
100
span_lint_and_sugg(
101
cx,
102
NEEDLESS_PATH_NEW,
0 commit comments