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.
2 parents e8794ff + 9022122 commit fb1b198Copy full SHA for fb1b198
clippy_lints/src/box_default.rs
@@ -70,7 +70,9 @@ impl LateLintPass<'_> for BoxDefault {
70
"try",
71
if is_plain_default(cx, arg_path) || given_type(cx, expr) {
72
"Box::default()".into()
73
- } else if let Some(arg_ty) = cx.typeck_results().expr_ty(arg).make_suggestable(cx.tcx, true) {
+ } else if let Some(arg_ty) =
74
+ cx.typeck_results().expr_ty(arg).make_suggestable(cx.tcx, true, None)
75
+ {
76
// Check if we can copy from the source expression in the replacement.
77
// We need the call to have no argument (see `explicit_default_type`).
78
if inner_call_args.is_empty()
0 commit comments