1
Fork 0

Use 'tcx for references to AccessLevels wherever possible.

This commit is contained in:
Eduard-Mihai Burtescu 2020-06-25 23:41:36 +03:00
parent 590e07bbc2
commit 30c046ede4
156 changed files with 966 additions and 1041 deletions

View file

@ -27,8 +27,8 @@ declare_clippy_lint! {
declare_lint_pass!(ZeroDiv => [ZERO_DIVIDED_BY_ZERO]);
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for ZeroDiv {
fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx Expr<'_>) {
impl<'tcx> LateLintPass<'tcx> for ZeroDiv {
fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) {
// check for instances of 0.0/0.0
if_chain! {
if let ExprKind::Binary(ref op, ref left, ref right) = expr.kind;