Skip to content

Commit ec4549f

Browse files
committed
Auto merge of #122822 - matthiaskrgr:rollup-rjgmnbe, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - #122222 (deref patterns: bare-bones feature gate and typechecking) - #122358 (Don't ICE when encountering bound regions in generator interior type) - #122696 (Add bare metal riscv32 target.) - #122773 (make "expected paren or brace" error translatable) - #122795 (Inherit `RUSTC_BOOTSTRAP` when testing wasm) - #122799 (Replace closures with `_` when suggesting fully qualified path for method call) - #122801 (Fix misc printing issues in emit=stable_mir) - #122806 (Make `type_ascribe!` not a built-in) Failed merges: - #122771 (add some comments to hir::ModuleItems) r? `@ghost` `@rustbot` modify labels: rollup
2 parents bf6d8e3 + ebc6a3b commit ec4549f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

clippy_lints/src/box_default.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@ impl LateLintPass<'_> for BoxDefault {
7070
"try",
7171
if is_plain_default(cx, arg_path) || given_type(cx, expr) {
7272
"Box::default()".into()
73-
} else if let Some(arg_ty) = cx.typeck_results().expr_ty(arg).make_suggestable(cx.tcx, true) {
73+
} else if let Some(arg_ty) =
74+
cx.typeck_results().expr_ty(arg).make_suggestable(cx.tcx, true, None)
75+
{
7476
// Check if we can copy from the source expression in the replacement.
7577
// We need the call to have no argument (see `explicit_default_type`).
7678
if inner_call_args.is_empty()

0 commit comments

Comments
 (0)