diff options
| author | lcnr <rust@lcnr.de> | 2022-03-18 13:33:40 +0100 |
|---|---|---|
| committer | lcnr <rust@lcnr.de> | 2022-03-30 11:23:58 +0200 |
| commit | a6153e8218e70e70f3c5d61adcb78d87d0e89152 (patch) | |
| tree | c8ac49b8e69dfaa8f5a6e03b3e86a798c44f439b /src/tools/clippy/clippy_utils | |
| parent | 260f17eafde04efeab63ceb0e83891a94fb710ad (diff) | |
| download | rust-a6153e8218e70e70f3c5d61adcb78d87d0e89152.tar.gz rust-a6153e8218e70e70f3c5d61adcb78d87d0e89152.zip | |
get clippy to compile again
Diffstat (limited to 'src/tools/clippy/clippy_utils')
| -rw-r--r-- | src/tools/clippy/clippy_utils/src/lib.rs | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/tools/clippy/clippy_utils/src/lib.rs b/src/tools/clippy/clippy_utils/src/lib.rs index cd20abd94ed..b55075943b2 100644 --- a/src/tools/clippy/clippy_utils/src/lib.rs +++ b/src/tools/clippy/clippy_utils/src/lib.rs @@ -77,9 +77,9 @@ use rustc_hir::intravisit::{walk_expr, FnKind, Visitor}; use rustc_hir::itemlikevisit::ItemLikeVisitor; use rustc_hir::LangItem::{OptionNone, ResultErr, ResultOk}; use rustc_hir::{ - def, lang_items, Arm, ArrayLen, BindingAnnotation, Block, BlockCheckMode, Body, Constness, Destination, Expr, + def, Arm, ArrayLen, BindingAnnotation, Block, BlockCheckMode, Body, Constness, Destination, Expr, ExprKind, FnDecl, ForeignItem, HirId, Impl, ImplItem, ImplItemKind, IsAsync, Item, ItemKind, LangItem, Local, - MatchSource, Mutability, Node, Param, Pat, PatKind, Path, PathSegment, PrimTy, QPath, Stmt, StmtKind, Target, + MatchSource, Mutability, Node, Param, Pat, PatKind, Path, PathSegment, PrimTy, QPath, Stmt, StmtKind, TraitItem, TraitItemKind, TraitRef, TyKind, UnOp, }; use rustc_lint::{LateContext, Level, Lint, LintContext}; @@ -479,12 +479,10 @@ pub fn def_path_res(cx: &LateContext<'_>, path: &[&str]) -> Res { _ => None, } } - fn find_primitive(tcx: TyCtxt<'_>, name: &str) -> Option<DefId> { - if let Some(&(index, Target::Impl)) = lang_items::ITEM_REFS.get(&Symbol::intern(name)) { - tcx.lang_items().items()[index] - } else { - None - } + fn find_primitive(_tcx: TyCtxt<'_>, _name: &str) -> Option<DefId> { + // FIXME: Deal with this without relying on lang items or by only + // looking at a single impl. + None } fn find_crate(tcx: TyCtxt<'_>, name: &str) -> Option<DefId> { tcx.crates(()) |
