Skip to content

Commit b8a8b68

Browse files
committed
Formatting.
1 parent ded269f commit b8a8b68

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

compiler/rustc_lint/src/panic_fmt.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ fn check_panic<'tcx>(cx: &LateContext<'tcx>, f: &'tcx hir::Expr<'tcx>, arg: &'tc
5353
let looks_like_placeholder = match (open, close) {
5454
(Some(_), Some(_)) => true,
5555
(Some(_), None) | (None, Some(_)) => false,
56-
(None, None) => return // OK, no braces.
56+
(None, None) => return, // OK, no braces.
5757
};
5858
let expn = f.span.ctxt().outer_expn_data();
5959
if let Some(id) = expn.macro_def_id {
@@ -64,9 +64,10 @@ fn check_panic<'tcx>(cx: &LateContext<'tcx>, f: &'tcx hir::Expr<'tcx>, arg: &'tc
6464
// Unwrap another level of macro expansion if this
6565
// panic!() was expanded from assert!().
6666
let parent = expn.call_site.ctxt().outer_expn_data();
67-
if parent.macro_def_id.map_or(false, |id| {
68-
cx.tcx.is_diagnostic_item(sym::assert_macro, id)
69-
}) {
67+
if parent
68+
.macro_def_id
69+
.map_or(false, |id| cx.tcx.is_diagnostic_item(sym::assert_macro, id))
70+
{
7071
parent
7172
} else {
7273
expn

0 commit comments

Comments
 (0)