diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2021-01-30 12:06:04 +0100 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2021-02-15 19:24:58 +0100 |
| commit | 5b68fc16edaa0f798368d1a28d78b82f640e24ef (patch) | |
| tree | d2d95735279fe89de56df674f2816df0c431929b /clippy_lints/src/utils | |
| parent | ce0a47ab8c0af153fe7124ecd26c82b5430ea604 (diff) | |
Use ItemId as a strongly typed index.
Diffstat (limited to 'clippy_lints/src/utils')
| -rw-r--r-- | clippy_lints/src/utils/author.rs | 2 | ||||
| -rw-r--r-- | clippy_lints/src/utils/inspector.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/clippy_lints/src/utils/author.rs b/clippy_lints/src/utils/author.rs index ca60d335262..6e3d4fde107 100644 --- a/clippy_lints/src/utils/author.rs +++ b/clippy_lints/src/utils/author.rs @@ -130,7 +130,7 @@ impl<'tcx> LateLintPass<'tcx> for Author { } fn check_stmt(&mut self, cx: &LateContext<'tcx>, stmt: &'tcx hir::Stmt<'_>) { - if !has_attr(cx.sess(), stmt.kind.attrs(|id| cx.tcx.hir().item(id.id))) { + if !has_attr(cx.sess(), stmt.kind.attrs(|id| cx.tcx.hir().item(id))) { return; } prelude(); diff --git a/clippy_lints/src/utils/inspector.rs b/clippy_lints/src/utils/inspector.rs index 9bec24be9e4..b52083af6fd 100644 --- a/clippy_lints/src/utils/inspector.rs +++ b/clippy_lints/src/utils/inspector.rs @@ -109,7 +109,7 @@ impl<'tcx> LateLintPass<'tcx> for DeepCodeInspector { } fn check_stmt(&mut self, cx: &LateContext<'tcx>, stmt: &'tcx hir::Stmt<'_>) { - if !has_attr(cx.sess(), stmt.kind.attrs(|id| cx.tcx.hir().item(id.id))) { + if !has_attr(cx.sess(), stmt.kind.attrs(|id| cx.tcx.hir().item(id))) { return; } match stmt.kind { |
