Auto merge of #7284 - camsteffen:consts-reexport, r=flip1995
Remove clippy_utils::consts re-export changelog: none We got a straggler.
This commit is contained in:
commit
16e347f7b3
@ -3,9 +3,8 @@
|
||||
use rustc_middle::ty;
|
||||
use rustc_session::{declare_lint_pass, declare_tool_lint};
|
||||
|
||||
use crate::consts::{constant, Constant};
|
||||
|
||||
use clippy_utils::comparisons::{normalize_comparison, Rel};
|
||||
use clippy_utils::consts::{constant, Constant};
|
||||
use clippy_utils::diagnostics::span_lint_and_help;
|
||||
use clippy_utils::source::snippet;
|
||||
use clippy_utils::ty::is_isize_or_usize;
|
||||
|
@ -1,4 +1,4 @@
|
||||
use crate::consts::constant_simple;
|
||||
use clippy_utils::consts::constant_simple;
|
||||
use clippy_utils::diagnostics::span_lint;
|
||||
use rustc_hir as hir;
|
||||
use rustc_lint::{LateContext, LateLintPass};
|
||||
|
@ -1,4 +1,4 @@
|
||||
use crate::consts::{constant, Constant};
|
||||
use clippy_utils::consts::{constant, Constant};
|
||||
use clippy_utils::diagnostics::span_lint_and_help;
|
||||
use clippy_utils::source::snippet_opt;
|
||||
use clippy_utils::{is_direct_expn_of, is_expn_of, match_panic_call};
|
||||
|
@ -1,4 +1,4 @@
|
||||
use crate::consts::{constant, Constant};
|
||||
use clippy_utils::consts::{constant, Constant};
|
||||
use clippy_utils::diagnostics::{span_lint, span_lint_and_then};
|
||||
use clippy_utils::sugg::Sugg;
|
||||
use if_chain::if_chain;
|
||||
|
@ -1,4 +1,4 @@
|
||||
use crate::consts::{constant, Constant};
|
||||
use clippy_utils::consts::{constant, Constant};
|
||||
use clippy_utils::diagnostics::span_lint;
|
||||
use clippy_utils::{method_chain_args, sext};
|
||||
use if_chain::if_chain;
|
||||
|
@ -1 +0,0 @@
|
||||
pub use clippy_utils::consts::*;
|
@ -7,7 +7,7 @@
|
||||
use rustc_session::{declare_lint_pass, declare_tool_lint};
|
||||
use rustc_span::source_map::Spanned;
|
||||
|
||||
use crate::consts::{constant, Constant};
|
||||
use clippy_utils::consts::{constant, Constant};
|
||||
use clippy_utils::diagnostics::span_lint_and_sugg;
|
||||
use clippy_utils::paths;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
//! lint on C-like enums that are `repr(isize/usize)` and have values that
|
||||
//! don't fit into an `i32`
|
||||
|
||||
use crate::consts::{miri_to_const, Constant};
|
||||
use clippy_utils::consts::{miri_to_const, Constant};
|
||||
use clippy_utils::diagnostics::span_lint;
|
||||
use rustc_hir::{Item, ItemKind};
|
||||
use rustc_lint::{LateContext, LateLintPass};
|
||||
|
@ -1,11 +1,10 @@
|
||||
use clippy_utils::consts::{constant_simple, Constant};
|
||||
use clippy_utils::diagnostics::span_lint;
|
||||
use rustc_hir::{BinOpKind, Expr, ExprKind};
|
||||
use rustc_lint::{LateContext, LateLintPass};
|
||||
use rustc_session::{declare_lint_pass, declare_tool_lint};
|
||||
use rustc_span::source_map::Span;
|
||||
|
||||
use crate::consts::{constant_simple, Constant};
|
||||
|
||||
declare_clippy_lint! {
|
||||
/// **What it does:** Checks for erasing operations, e.g., `x * 0`.
|
||||
///
|
||||
|
@ -1,4 +1,4 @@
|
||||
use crate::consts::{
|
||||
use clippy_utils::consts::{
|
||||
constant, constant_simple, Constant,
|
||||
Constant::{Int, F32, F64},
|
||||
};
|
||||
|
@ -6,7 +6,7 @@
|
||||
use rustc_session::{declare_lint_pass, declare_tool_lint};
|
||||
use rustc_span::source_map::Span;
|
||||
|
||||
use crate::consts::{constant_simple, Constant};
|
||||
use clippy_utils::consts::{constant_simple, Constant};
|
||||
use clippy_utils::diagnostics::span_lint;
|
||||
use clippy_utils::{clip, unsext};
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
//! lint on indexing and slicing operations
|
||||
|
||||
use crate::consts::{constant, Constant};
|
||||
use clippy_utils::consts::{constant, Constant};
|
||||
use clippy_utils::diagnostics::{span_lint, span_lint_and_help};
|
||||
use clippy_utils::higher;
|
||||
use rustc_ast::ast::RangeLimits;
|
||||
|
@ -7,9 +7,8 @@
|
||||
use rustc_span::Span;
|
||||
use rustc_target::abi::LayoutOf;
|
||||
|
||||
use crate::consts::{constant, Constant};
|
||||
|
||||
use clippy_utils::comparisons::Rel;
|
||||
use clippy_utils::consts::{constant, Constant};
|
||||
use clippy_utils::diagnostics::span_lint;
|
||||
use clippy_utils::source::snippet;
|
||||
use clippy_utils::{comparisons, sext};
|
||||
|
@ -148,7 +148,6 @@ macro_rules! declare_clippy_lint {
|
||||
};
|
||||
}
|
||||
|
||||
mod consts;
|
||||
#[cfg(feature = "metadata-collector-lint")]
|
||||
mod deprecated_lints;
|
||||
mod utils;
|
||||
|
@ -1,5 +1,5 @@
|
||||
use super::WHILE_IMMUTABLE_CONDITION;
|
||||
use crate::consts::constant;
|
||||
use clippy_utils::consts::constant;
|
||||
use clippy_utils::diagnostics::span_lint_and_then;
|
||||
use clippy_utils::usage::mutated_variables;
|
||||
use if_chain::if_chain;
|
||||
|
@ -1,4 +1,4 @@
|
||||
use crate::consts::{constant, Constant};
|
||||
use clippy_utils::consts::{constant, Constant};
|
||||
use clippy_utils::diagnostics::{multispan_sugg, span_lint_and_then};
|
||||
use clippy_utils::source::snippet;
|
||||
use clippy_utils::usage::mutated_variables;
|
||||
|
@ -1,4 +1,4 @@
|
||||
use crate::consts::constant_simple;
|
||||
use clippy_utils::consts::constant_simple;
|
||||
use clippy_utils::diagnostics::span_lint_and_sugg;
|
||||
use clippy_utils::source::{indent_of, reindent_multiline, snippet_opt};
|
||||
use clippy_utils::ty::is_type_diagnostic_item;
|
||||
|
@ -1,4 +1,4 @@
|
||||
use crate::consts::{constant, miri_to_const, Constant};
|
||||
use clippy_utils::consts::{constant, miri_to_const, Constant};
|
||||
use clippy_utils::diagnostics::{
|
||||
multispan_sugg, span_lint_and_help, span_lint_and_note, span_lint_and_sugg, span_lint_and_then,
|
||||
};
|
||||
|
@ -1,4 +1,4 @@
|
||||
use crate::consts::{constant, Constant};
|
||||
use clippy_utils::consts::{constant, Constant};
|
||||
use clippy_utils::diagnostics::span_lint_and_sugg;
|
||||
use clippy_utils::is_trait_method;
|
||||
use clippy_utils::source::snippet_with_applicability;
|
||||
|
@ -1,4 +1,4 @@
|
||||
use crate::consts::{constant, Constant};
|
||||
use clippy_utils::consts::{constant, Constant};
|
||||
use clippy_utils::diagnostics::span_lint;
|
||||
use clippy_utils::is_trait_method;
|
||||
use rustc_hir as hir;
|
||||
|
@ -1,4 +1,4 @@
|
||||
use crate::consts::{constant_simple, Constant};
|
||||
use clippy_utils::consts::{constant_simple, Constant};
|
||||
use clippy_utils::diagnostics::span_lint;
|
||||
use clippy_utils::{match_def_path, match_trait_method, paths};
|
||||
use if_chain::if_chain;
|
||||
|
@ -17,7 +17,7 @@
|
||||
use rustc_span::source_map::{ExpnKind, Span};
|
||||
use rustc_span::symbol::sym;
|
||||
|
||||
use crate::consts::{constant, Constant};
|
||||
use clippy_utils::consts::{constant, Constant};
|
||||
use clippy_utils::sugg::Sugg;
|
||||
use clippy_utils::{
|
||||
expr_path_res, get_item_name, get_parent_expr, higher, in_constant, is_diag_trait_item, is_integer_const,
|
||||
|
@ -1,4 +1,4 @@
|
||||
use crate::consts::{constant, Constant};
|
||||
use clippy_utils::consts::{constant, Constant};
|
||||
use clippy_utils::diagnostics::span_lint_and_then;
|
||||
use clippy_utils::sext;
|
||||
use if_chain::if_chain;
|
||||
|
@ -1,3 +1,4 @@
|
||||
use clippy_utils::consts::{self, Constant};
|
||||
use clippy_utils::diagnostics::span_lint;
|
||||
use if_chain::if_chain;
|
||||
use rustc_hir::{BinOpKind, Expr, ExprKind, UnOp};
|
||||
@ -5,8 +6,6 @@
|
||||
use rustc_session::{declare_lint_pass, declare_tool_lint};
|
||||
use rustc_span::source_map::Span;
|
||||
|
||||
use crate::consts::{self, Constant};
|
||||
|
||||
declare_clippy_lint! {
|
||||
/// **What it does:** Checks for multiplication by -1 as a form of negation.
|
||||
///
|
||||
|
@ -1,4 +1,4 @@
|
||||
use crate::consts::{constant, Constant};
|
||||
use clippy_utils::consts::{constant, Constant};
|
||||
use clippy_utils::diagnostics::{span_lint, span_lint_and_sugg, span_lint_and_then};
|
||||
use clippy_utils::source::{snippet, snippet_opt, snippet_with_applicability};
|
||||
use clippy_utils::sugg::Sugg;
|
||||
|
@ -1,4 +1,4 @@
|
||||
use crate::consts::{constant, Constant};
|
||||
use clippy_utils::consts::{constant, Constant};
|
||||
use clippy_utils::diagnostics::{span_lint, span_lint_and_help};
|
||||
use clippy_utils::{match_def_path, paths};
|
||||
use if_chain::if_chain;
|
||||
|
@ -1,4 +1,4 @@
|
||||
use crate::consts::{constant_context, Constant};
|
||||
use clippy_utils::consts::{constant_context, Constant};
|
||||
use clippy_utils::diagnostics::span_lint_and_sugg;
|
||||
use clippy_utils::in_macro;
|
||||
use clippy_utils::source::snippet;
|
||||
|
@ -1,4 +1,4 @@
|
||||
use crate::consts::{constant_context, Constant};
|
||||
use clippy_utils::consts::{constant_context, Constant};
|
||||
use clippy_utils::diagnostics::span_lint;
|
||||
use clippy_utils::{is_expr_path_def_path, paths};
|
||||
use if_chain::if_chain;
|
||||
|
@ -1,4 +1,4 @@
|
||||
use crate::consts::{constant_simple, Constant};
|
||||
use clippy_utils::consts::{constant_simple, Constant};
|
||||
use clippy_utils::diagnostics::{span_lint, span_lint_and_help, span_lint_and_sugg, span_lint_and_then};
|
||||
use clippy_utils::source::snippet;
|
||||
use clippy_utils::ty::match_type;
|
||||
|
@ -1,5 +1,5 @@
|
||||
use crate::consts::{constant, Constant};
|
||||
use crate::rustc_target::abi::LayoutOf;
|
||||
use clippy_utils::consts::{constant, Constant};
|
||||
use clippy_utils::diagnostics::span_lint_and_sugg;
|
||||
use clippy_utils::higher;
|
||||
use clippy_utils::source::snippet_with_applicability;
|
||||
|
@ -1,4 +1,4 @@
|
||||
use crate::consts::{constant_simple, Constant};
|
||||
use clippy_utils::consts::{constant_simple, Constant};
|
||||
use clippy_utils::diagnostics::span_lint_and_help;
|
||||
use if_chain::if_chain;
|
||||
use rustc_hir::{BinOpKind, Expr, ExprKind};
|
||||
|
Loading…
Reference in New Issue
Block a user