Rustup to rust-lang/rust#67953
This commit is contained in:
@@ -3,6 +3,7 @@ use rustc::ty::{self, Ty};
|
|||||||
use rustc_hir::intravisit as visit;
|
use rustc_hir::intravisit as visit;
|
||||||
use rustc_hir::HirIdSet;
|
use rustc_hir::HirIdSet;
|
||||||
use rustc_hir::{self, *};
|
use rustc_hir::{self, *};
|
||||||
|
use rustc_infer::infer::TyCtxtInferExt;
|
||||||
use rustc_lint::{LateContext, LateLintPass};
|
use rustc_lint::{LateContext, LateLintPass};
|
||||||
use rustc_session::{declare_tool_lint, impl_lint_pass};
|
use rustc_session::{declare_tool_lint, impl_lint_pass};
|
||||||
use rustc_span::source_map::Span;
|
use rustc_span::source_map::Span;
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ fn check_trait_items(cx: &LateContext<'_, '_>, visited_trait: &Item<'_>, trait_i
|
|||||||
// fill the set with current and super traits
|
// fill the set with current and super traits
|
||||||
fn fill_trait_set(traitt: DefId, set: &mut FxHashSet<DefId>, cx: &LateContext<'_, '_>) {
|
fn fill_trait_set(traitt: DefId, set: &mut FxHashSet<DefId>, cx: &LateContext<'_, '_>) {
|
||||||
if set.insert(traitt) {
|
if set.insert(traitt) {
|
||||||
for supertrait in rustc::traits::supertrait_def_ids(cx.tcx, traitt) {
|
for supertrait in rustc_infer::traits::supertrait_def_ids(cx.tcx, traitt) {
|
||||||
fill_trait_set(supertrait, set, cx);
|
fill_trait_set(supertrait, set, cx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,6 +33,8 @@ extern crate rustc_hir;
|
|||||||
#[allow(unused_extern_crates)]
|
#[allow(unused_extern_crates)]
|
||||||
extern crate rustc_index;
|
extern crate rustc_index;
|
||||||
#[allow(unused_extern_crates)]
|
#[allow(unused_extern_crates)]
|
||||||
|
extern crate rustc_infer;
|
||||||
|
#[allow(unused_extern_crates)]
|
||||||
extern crate rustc_lexer;
|
extern crate rustc_lexer;
|
||||||
#[allow(unused_extern_crates)]
|
#[allow(unused_extern_crates)]
|
||||||
extern crate rustc_lint;
|
extern crate rustc_lint;
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ use rustc_hir::def::{DefKind, Res};
|
|||||||
use rustc_hir::def_id;
|
use rustc_hir::def_id;
|
||||||
use rustc_hir::intravisit::{walk_block, walk_expr, walk_pat, walk_stmt, NestedVisitorMap, Visitor};
|
use rustc_hir::intravisit::{walk_block, walk_expr, walk_pat, walk_stmt, NestedVisitorMap, Visitor};
|
||||||
use rustc_hir::*;
|
use rustc_hir::*;
|
||||||
|
use rustc_infer::infer::TyCtxtInferExt;
|
||||||
use rustc_lint::{LateContext, LateLintPass, LintContext};
|
use rustc_lint::{LateContext, LateLintPass, LintContext};
|
||||||
use rustc_session::{declare_lint_pass, declare_tool_lint};
|
use rustc_session::{declare_lint_pass, declare_tool_lint};
|
||||||
use rustc_span::source_map::Span;
|
use rustc_span::source_map::Span;
|
||||||
|
|||||||
@@ -5,13 +5,14 @@ use crate::utils::{
|
|||||||
};
|
};
|
||||||
use if_chain::if_chain;
|
use if_chain::if_chain;
|
||||||
use matches::matches;
|
use matches::matches;
|
||||||
use rustc::traits;
|
|
||||||
use rustc::traits::misc::can_type_implement_copy;
|
|
||||||
use rustc::ty::{self, TypeFoldable};
|
use rustc::ty::{self, TypeFoldable};
|
||||||
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
|
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
|
||||||
use rustc_errors::{Applicability, DiagnosticBuilder};
|
use rustc_errors::{Applicability, DiagnosticBuilder};
|
||||||
use rustc_hir::intravisit::FnKind;
|
use rustc_hir::intravisit::FnKind;
|
||||||
use rustc_hir::*;
|
use rustc_hir::*;
|
||||||
|
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_lint::{LateContext, LateLintPass};
|
||||||
use rustc_session::{declare_lint_pass, declare_tool_lint};
|
use rustc_session::{declare_lint_pass, declare_tool_lint};
|
||||||
use rustc_span::{Span, Symbol};
|
use rustc_span::{Span, Symbol};
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ use if_chain::if_chain;
|
|||||||
use matches::matches;
|
use matches::matches;
|
||||||
use rustc::hir::map::Map;
|
use rustc::hir::map::Map;
|
||||||
use rustc::traits;
|
use rustc::traits;
|
||||||
use rustc::traits::predicate_for_trait_def;
|
|
||||||
use rustc::ty::{
|
use rustc::ty::{
|
||||||
self,
|
self,
|
||||||
layout::{self, IntegerExt},
|
layout::{self, IntegerExt},
|
||||||
@@ -42,6 +41,8 @@ use rustc_hir::def_id::{DefId, CRATE_DEF_INDEX, LOCAL_CRATE};
|
|||||||
use rustc_hir::intravisit::{NestedVisitorMap, Visitor};
|
use rustc_hir::intravisit::{NestedVisitorMap, Visitor};
|
||||||
use rustc_hir::Node;
|
use rustc_hir::Node;
|
||||||
use rustc_hir::*;
|
use rustc_hir::*;
|
||||||
|
use rustc_infer::infer::TyCtxtInferExt;
|
||||||
|
use rustc_infer::traits::predicate_for_trait_def;
|
||||||
use rustc_lint::{LateContext, Level, Lint, LintContext};
|
use rustc_lint::{LateContext, Level, Lint, LintContext};
|
||||||
use rustc_span::hygiene::{ExpnKind, MacroKind};
|
use rustc_span::hygiene::{ExpnKind, MacroKind};
|
||||||
use rustc_span::source_map::original_sp;
|
use rustc_span::source_map::original_sp;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ use rustc_data_structures::fx::FxHashSet;
|
|||||||
use rustc_hir::def::Res;
|
use rustc_hir::def::Res;
|
||||||
use rustc_hir::intravisit::{walk_expr, NestedVisitorMap, Visitor};
|
use rustc_hir::intravisit::{walk_expr, NestedVisitorMap, Visitor};
|
||||||
use rustc_hir::*;
|
use rustc_hir::*;
|
||||||
|
use rustc_infer::infer::TyCtxtInferExt;
|
||||||
use rustc_lint::LateContext;
|
use rustc_lint::LateContext;
|
||||||
use rustc_span::symbol::Ident;
|
use rustc_span::symbol::Ident;
|
||||||
use rustc_typeck::expr_use_visitor::*;
|
use rustc_typeck::expr_use_visitor::*;
|
||||||
|
|||||||
Reference in New Issue
Block a user