File tree 1 file changed +3
-3
lines changed
src/tools/clippy/clippy_utils/src
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -191,13 +191,13 @@ impl<'a> PanicExpn<'a> {
191
191
if !macro_backtrace ( expr. span ) . any ( |macro_call| is_panic ( cx, macro_call. def_id ) ) {
192
192
return None ;
193
193
}
194
- let ExprKind :: Call ( callee, [ arg] ) = expr. kind else { return None } ;
195
- let ExprKind :: Path ( QPath :: Resolved ( _, path) ) = callee. kind else { return None } ;
194
+ let ExprKind :: Call ( callee, [ arg] ) = & expr. kind else { return None } ;
195
+ let ExprKind :: Path ( QPath :: Resolved ( _, path) ) = & callee. kind else { return None } ;
196
196
let result = match path. segments . last ( ) . unwrap ( ) . ident . as_str ( ) {
197
197
"panic" if arg. span . ctxt ( ) == expr. span . ctxt ( ) => Self :: Empty ,
198
198
"panic" | "panic_str" => Self :: Str ( arg) ,
199
199
"panic_display" => {
200
- let ExprKind :: AddrOf ( _, _, e) = arg. kind else { return None } ;
200
+ let ExprKind :: AddrOf ( _, _, e) = & arg. kind else { return None } ;
201
201
Self :: Display ( e)
202
202
} ,
203
203
"panic_fmt" => Self :: Format ( FormatArgsExpn :: parse ( cx, arg) ?) ,
You can’t perform that action at this time.
0 commit comments