diff --git a/compiler/rustc_mir_build/src/thir/pattern/check_match.rs b/compiler/rustc_mir_build/src/thir/pattern/check_match.rs index 964a911ec0010..ed10657e71c69 100644 --- a/compiler/rustc_mir_build/src/thir/pattern/check_match.rs +++ b/compiler/rustc_mir_build/src/thir/pattern/check_match.rs @@ -569,7 +569,7 @@ fn check_for_bindings_named_same_as_variants( .any(|variant| variant.name == name && variant.ctor_kind() == Some(CtorKind::Const)) { let variant_count = edef.variants().len(); - let ty_path = with_no_trimmed_paths!({ cx.tcx.def_path_str(edef.did()) }); + let ty_path = with_no_trimmed_paths!(cx.tcx.def_path_str(edef.did())); cx.tcx.emit_spanned_lint( BINDINGS_WITH_VARIANT_NAME, cx.lint_level,