mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-18 11:34:11 +00:00
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 {
|
||||
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);
|
||||
if is_expn_of(expr.span, "unimplemented").is_some() {
|
||||
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 {
|
||||
match (l, r) {
|
||||
(StructRest::Base(lb), StructRest::Base(rb)) => eq_expr(lb, rb),
|
||||
(StructRest::Rest(_), StructRest::Rest(_)) => true,
|
||||
(StructRest::None, StructRest::None) => true,
|
||||
(StructRest::Rest(_), StructRest::Rest(_)) | (StructRest::None, StructRest::None) => true,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user