declare_lint_pass!(ErasingOp => [ERASING_OP]);
-impl<'a, 'tcx> LateLintPass<'a, 'tcx> for ErasingOp {
- fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, e: &'tcx Expr<'_>) {
+impl<'tcx> LateLintPass<'tcx> for ErasingOp {
+ fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) {
if e.span.from_expansion() {
return;
}
}
}
-fn check(cx: &LateContext<'_, '_>, e: &Expr<'_>, span: Span) {
- if let Some(Constant::Int(0)) = constant_simple(cx, cx.tables, e) {
+fn check(cx: &LateContext<'_>, e: &Expr<'_>, span: Span) {
+ if let Some(Constant::Int(0)) = constant_simple(cx, cx.typeck_results(), e) {
span_lint(
cx,
ERASING_OP,