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.
1 parent 480ccc3 commit 4e28d99Copy full SHA for 4e28d99
clippy_lints/src/types.rs
@@ -357,13 +357,13 @@ impl Types {
357
let box_ty = match &last_path_segment(qpath).args.unwrap().args[0] {
358
GenericArg::Type(ty) => match &ty.kind {
359
TyKind::Path(qpath) => qpath,
360
- _ => panic!("Box that isn't a type"),
+ _ => return,
361
},
362
- _ => panic!("Rc without type argument"),
363
};
364
let inner_span = match &last_path_segment(&box_ty).args.unwrap().args[0] {
365
GenericArg::Type(ty) => ty.span,
366
- _ => panic!("Box without type argument"),
367
368
span_lint_and_sugg(
369
cx,
0 commit comments