Fix dogfood errors
This commit is contained in:
parent
dd4e471b3f
commit
5ee0a400fc
@ -73,7 +73,7 @@ declare_lint_pass!(PanicUnimplemented => [UNIMPLEMENTED, UNREACHABLE, TODO, PANI
|
|||||||
|
|
||||||
impl<'tcx> LateLintPass<'tcx> for PanicUnimplemented {
|
impl<'tcx> LateLintPass<'tcx> for PanicUnimplemented {
|
||||||
fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) {
|
fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) {
|
||||||
if let Some(_) = match_panic_call(cx, expr) {
|
if match_panic_call(cx, expr).is_some() {
|
||||||
let span = get_outer_span(expr);
|
let span = get_outer_span(expr);
|
||||||
if is_expn_of(expr.span, "unimplemented").is_some() {
|
if is_expn_of(expr.span, "unimplemented").is_some() {
|
||||||
span_lint(
|
span_lint(
|
||||||
|
@ -110,8 +110,7 @@ pub fn eq_expr_opt(l: &Option<P<Expr>>, r: &Option<P<Expr>>) -> bool {
|
|||||||
pub fn eq_struct_rest(l: &StructRest, r: &StructRest) -> bool {
|
pub fn eq_struct_rest(l: &StructRest, r: &StructRest) -> bool {
|
||||||
match (l, r) {
|
match (l, r) {
|
||||||
(StructRest::Base(lb), StructRest::Base(rb)) => eq_expr(lb, rb),
|
(StructRest::Base(lb), StructRest::Base(rb)) => eq_expr(lb, rb),
|
||||||
(StructRest::Rest(_), StructRest::Rest(_)) => true,
|
(StructRest::Rest(_), StructRest::Rest(_)) | (StructRest::None, StructRest::None) => true,
|
||||||
(StructRest::None, StructRest::None) => true,
|
|
||||||
_ => false,
|
_ => false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user