mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-03 18:09:42 +00:00
Rustup to rust-lang/rust#69076
This commit is contained in:
parent
df64ea682c
commit
00861d100d
4 changed files with 9 additions and 5 deletions
|
@ -134,7 +134,7 @@ fn check_trait_items(cx: &LateContext<'_, '_>, visited_trait: &Item<'_>, trait_i
|
|||
// fill the set with current and super traits
|
||||
fn fill_trait_set(traitt: DefId, set: &mut FxHashSet<DefId>, cx: &LateContext<'_, '_>) {
|
||||
if set.insert(traitt) {
|
||||
for supertrait in rustc_infer::traits::supertrait_def_ids(cx.tcx, traitt) {
|
||||
for supertrait in rustc_trait_selection::traits::supertrait_def_ids(cx.tcx, traitt) {
|
||||
fill_trait_set(supertrait, set, cx);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,6 +51,8 @@ extern crate rustc_span;
|
|||
#[allow(unused_extern_crates)]
|
||||
extern crate rustc_target;
|
||||
#[allow(unused_extern_crates)]
|
||||
extern crate rustc_trait_selection;
|
||||
#[allow(unused_extern_crates)]
|
||||
extern crate rustc_typeck;
|
||||
|
||||
use rustc::session::Session;
|
||||
|
|
|
@ -12,12 +12,12 @@ use rustc_errors::{Applicability, DiagnosticBuilder};
|
|||
use rustc_hir::intravisit::FnKind;
|
||||
use rustc_hir::{BindingAnnotation, Body, FnDecl, GenericArg, HirId, ItemKind, Node, PatKind, QPath, TyKind};
|
||||
use rustc_infer::infer::TyCtxtInferExt;
|
||||
use rustc_infer::traits;
|
||||
use rustc_infer::traits::misc::can_type_implement_copy;
|
||||
use rustc_lint::{LateContext, LateLintPass};
|
||||
use rustc_session::{declare_lint_pass, declare_tool_lint};
|
||||
use rustc_span::{Span, Symbol};
|
||||
use rustc_target::spec::abi::Abi;
|
||||
use rustc_trait_selection::traits;
|
||||
use rustc_trait_selection::traits::misc::can_type_implement_copy;
|
||||
use rustc_typeck::expr_use_visitor as euv;
|
||||
use std::borrow::Cow;
|
||||
|
||||
|
|
|
@ -47,12 +47,14 @@ use rustc_hir::{
|
|||
MatchSource, Param, Pat, PatKind, Path, PathSegment, QPath, TraitItem, TraitItemKind, TraitRef, TyKind, Unsafety,
|
||||
};
|
||||
use rustc_infer::infer::TyCtxtInferExt;
|
||||
use rustc_infer::traits::predicate_for_trait_def;
|
||||
use rustc_lint::{LateContext, Level, Lint, LintContext};
|
||||
use rustc_span::hygiene::{ExpnKind, MacroKind};
|
||||
use rustc_span::source_map::original_sp;
|
||||
use rustc_span::symbol::{self, kw, Symbol};
|
||||
use rustc_span::{BytePos, Pos, Span, DUMMY_SP};
|
||||
use rustc_trait_selection::traits::predicate_for_trait_def;
|
||||
use rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt;
|
||||
use rustc_trait_selection::traits::query::normalize::AtExt;
|
||||
use smallvec::SmallVec;
|
||||
|
||||
use crate::consts::{constant, Constant};
|
||||
|
@ -1387,7 +1389,7 @@ pub fn is_trait_impl_item(cx: &LateContext<'_, '_>, hir_id: HirId) -> bool {
|
|||
/// }
|
||||
/// ```
|
||||
pub fn fn_has_unsatisfiable_preds(cx: &LateContext<'_, '_>, did: DefId) -> bool {
|
||||
use rustc_infer::traits;
|
||||
use rustc_trait_selection::traits;
|
||||
let predicates = cx
|
||||
.tcx
|
||||
.predicates_of(did)
|
||||
|
|
Loading…
Reference in a new issue