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

@@ -38,8 +38,8 @@ declare_clippy_lint! {
declare_lint_pass!(EmptyEnum => [EMPTY_ENUM]);
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for EmptyEnum {
fn check_item(&mut self, cx: &LateContext<'_, '_>, item: &Item<'_>) {
impl<'tcx> LateLintPass<'tcx> for EmptyEnum {
fn check_item(&mut self, cx: &LateContext<'_>, item: &Item<'_>) {
let did = cx.tcx.hir().local_def_id(item.hir_id);
if let ItemKind::Enum(..) = item.kind {
let ty = cx.tcx.type_of(did);