This commit is contained in:
Yuki Okushi 2020-01-11 09:06:09 +09:00
parent 1d7d4e9217
commit 8daa2784c7
3 changed files with 3 additions and 6 deletions

View File

@ -11,7 +11,7 @@ use rustc::traits;
use rustc::traits::misc::can_type_implement_copy;
use rustc::ty::{self, RegionKind, TypeFoldable};
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
use rustc_errors::Applicability;
use rustc_errors::{Applicability, DiagnosticBuilder};
use rustc_hir::intravisit::FnKind;
use rustc_hir::*;
use rustc_session::declare_tool_lint;
@ -20,7 +20,6 @@ use rustc_target::spec::abi::Abi;
use rustc_typeck::expr_use_visitor as euv;
use std::borrow::Cow;
use syntax::ast::Attribute;
use syntax::errors::DiagnosticBuilder;
declare_clippy_lint! {
/// **What it does:** Checks for functions taking arguments by value, but not

View File

@ -10,7 +10,7 @@ use rustc::lint::{in_external_macro, LateContext, LateLintPass, LintArray, LintC
use rustc::ty::layout::LayoutOf;
use rustc::ty::{self, InferTy, Ty, TyCtxt, TypeckTables};
use rustc::{declare_lint_pass, impl_lint_pass};
use rustc_errors::Applicability;
use rustc_errors::{Applicability, DiagnosticBuilder};
use rustc_hir as hir;
use rustc_hir::intravisit::{walk_body, walk_expr, walk_ty, FnKind, NestedVisitorMap, Visitor};
use rustc_hir::*;
@ -21,7 +21,6 @@ use rustc_span::symbol::{sym, Symbol};
use rustc_target::spec::abi::Abi;
use rustc_typeck::hir_ty_to_ty;
use syntax::ast::{FloatTy, IntTy, LitFloatType, LitIntType, LitKind, UintTy};
use syntax::errors::DiagnosticBuilder;
use crate::consts::{constant, Constant};
use crate::utils::paths;

View File

@ -1,11 +1,10 @@
//! Clippy wrappers around rustc's diagnostic functions.
use rustc::lint::{LateContext, Lint, LintContext};
use rustc_errors::{Applicability, CodeSuggestion, Substitution, SubstitutionPart, SuggestionStyle};
use rustc_errors::{Applicability, CodeSuggestion, DiagnosticBuilder, Substitution, SubstitutionPart, SuggestionStyle};
use rustc_hir::HirId;
use rustc_span::source_map::{MultiSpan, Span};
use std::env;
use syntax::errors::DiagnosticBuilder;
/// Wrapper around `DiagnosticBuilder` that adds a link to Clippy documentation for the emitted lint
struct DiagnosticWrapper<'a>(DiagnosticBuilder<'a>);