Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rustup to https://github.com/rust-lang/rust/pull/67853 #4992

Merged
merged 1 commit into from Jan 4, 2020
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

@@ -3,9 +3,9 @@ use rustc::declare_lint_pass;
use rustc::hir::*;
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
use rustc_session::declare_tool_lint;
use rustc_span::symbol;
use std::f64::consts as f64;
use syntax::ast::{FloatTy, LitFloatType, LitKind};
use syntax::symbol;

declare_clippy_lint! {
/// **What it does:** Checks for floating point literals that approximate
@@ -4,7 +4,7 @@ use rustc::hir;
use rustc::impl_lint_pass;
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
use rustc_session::declare_tool_lint;
use syntax::source_map::Span;
use rustc_span::source_map::Span;

declare_clippy_lint! {
/// **What it does:** Checks for plain integer arithmetic.
@@ -15,10 +15,10 @@ use rustc::lint::{
use rustc::ty;
use rustc_errors::Applicability;
use rustc_session::declare_tool_lint;
use rustc_span::source_map::Span;
use rustc_span::symbol::Symbol;
use semver::Version;
use syntax::ast::{AttrKind, AttrStyle, Attribute, Lit, LitKind, MetaItemKind, NestedMetaItem};
use syntax::source_map::Span;
use syntax::util::lev_distance::find_best_match_for_name;

declare_clippy_lint! {
@@ -7,8 +7,8 @@ use rustc::impl_lint_pass;
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
use rustc_errors::Applicability;
use rustc_session::declare_tool_lint;
use rustc_span::source_map::Span;
use syntax::ast::LitKind;
use syntax::source_map::Span;

declare_clippy_lint! {
/// **What it does:** Checks for incompatible bit masks in comparisons.
@@ -9,8 +9,8 @@ use rustc::hir::*;
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
use rustc_errors::Applicability;
use rustc_session::declare_tool_lint;
use rustc_span::source_map::Span;
use syntax::ast::LitKind;
use syntax::source_map::Span;

declare_clippy_lint! {
/// **What it does:** Checks for boolean expressions that can be written more
@@ -6,7 +6,8 @@ use crate::utils::span_lint;
use rustc::declare_lint_pass;
use rustc::lint::{EarlyContext, EarlyLintPass, LintArray, LintPass};
use rustc_session::declare_tool_lint;
use syntax::{ast::*, source_map::DUMMY_SP};
use rustc_span::source_map::DUMMY_SP;
use syntax::ast::*;

declare_clippy_lint! {
/// **What it does:** Checks to see if all common metadata is defined in
@@ -5,9 +5,9 @@ use rustc::hir::*;
use rustc::impl_lint_pass;
use rustc::lint::{LateContext, LateLintPass, LintArray, LintContext, LintPass};
use rustc_session::declare_tool_lint;
use rustc_span::source_map::Span;
use rustc_span::BytePos;
use syntax::ast::Attribute;
use syntax::source_map::Span;

use crate::utils::{match_type, paths, snippet_opt, span_help_and_lint, LimitStack};

@@ -6,9 +6,9 @@ use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
use rustc::ty::Ty;
use rustc_data_structures::fx::FxHashMap;
use rustc_session::declare_tool_lint;
use rustc_span::symbol::Symbol;
use std::collections::hash_map::Entry;
use std::hash::BuildHasherDefault;
use syntax::symbol::Symbol;

declare_clippy_lint! {
/// **What it does:** Checks for consecutive `if`s with the same condition.
@@ -3,8 +3,8 @@ use rustc::declare_lint_pass;
use rustc::lint::{EarlyContext, EarlyLintPass, LintArray, LintPass};
use rustc_errors::Applicability;
use rustc_session::declare_tool_lint;
use rustc_span::source_map::Span;
use syntax::ast;
use syntax::source_map::Span;
use syntax::tokenstream::TokenStream;

declare_clippy_lint! {
@@ -6,7 +6,7 @@ use rustc::hir::*;
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
use rustc::ty::{self, Ty};
use rustc_session::declare_tool_lint;
use syntax::source_map::Span;
use rustc_span::source_map::Span;

declare_clippy_lint! {
/// **What it does:** Checks for deriving `Hash` but implementing `PartialEq`
@@ -5,10 +5,10 @@ use rustc::impl_lint_pass;
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
use rustc_data_structures::fx::FxHashSet;
use rustc_session::declare_tool_lint;
use rustc_span::source_map::{BytePos, MultiSpan, Span};
use rustc_span::Pos;
use std::ops::Range;
use syntax::ast::{AttrKind, Attribute};
use syntax::source_map::{BytePos, MultiSpan, Span};
use url::Url;

declare_clippy_lint! {
@@ -5,7 +5,7 @@ use rustc::hir::*;
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
use rustc_errors::Applicability;
use rustc_session::declare_tool_lint;
use syntax::source_map::Span;
use rustc_span::source_map::Span;

use crate::utils::{snippet_with_applicability, span_lint_and_sugg, SpanlessEq};

@@ -4,7 +4,7 @@ use rustc::hir::*;
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
use rustc_errors::Applicability;
use rustc_session::declare_tool_lint;
use syntax::source_map::Spanned;
use rustc_span::source_map::Spanned;

use crate::consts::{constant, Constant};
use crate::utils::paths;
@@ -8,7 +8,7 @@ use rustc::hir::*;
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
use rustc_errors::Applicability;
use rustc_session::declare_tool_lint;
use syntax::source_map::Span;
use rustc_span::source_map::Span;

declare_clippy_lint! {
/// **What it does:** Checks for uses of `contains_key` + `insert` on `HashMap`
@@ -6,7 +6,7 @@ use rustc::hir::def::{DefKind, Res};
use rustc::hir::*;
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
use rustc_session::declare_tool_lint;
use syntax::source_map::Span;
use rustc_span::source_map::Span;

declare_clippy_lint! {
/// **What it does:** Checks for `use Enum::*`.
@@ -5,9 +5,9 @@ use crate::utils::{span_help_and_lint, span_lint};
use rustc::impl_lint_pass;
use rustc::lint::{EarlyContext, EarlyLintPass, Lint, LintArray, LintPass};
use rustc_session::declare_tool_lint;
use rustc_span::source_map::Span;
use rustc_span::symbol::Symbol;
use syntax::ast::*;
use syntax::source_map::Span;
use syntax::symbol::Symbol;

declare_clippy_lint! {
/// **What it does:** Detects enumeration variants that are prefixed or suffixed
@@ -2,7 +2,7 @@ use rustc::declare_lint_pass;
use rustc::hir::*;
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
use rustc_session::declare_tool_lint;
use syntax::source_map::Span;
use rustc_span::source_map::Span;

use crate::consts::{constant_simple, Constant};
use crate::utils::span_lint;
@@ -6,8 +6,8 @@ use rustc::ty::layout::LayoutOf;
use rustc::ty::{self, Ty};
use rustc::util::nodemap::HirIdSet;
use rustc_session::declare_tool_lint;
use rustc_span::source_map::Span;
use rustc_typeck::expr_use_visitor::*;
use syntax::source_map::Span;

use crate::utils::span_lint;

@@ -9,8 +9,8 @@ use rustc::hir::*;
use rustc::lint::{LateContext, LateLintPass, LintArray, LintContext, LintPass};
use rustc_errors::Applicability;
use rustc_session::declare_tool_lint;
use rustc_span::source_map::Span;
use syntax::ast::LitKind;
use syntax::source_map::Span;

declare_clippy_lint! {
/// **What it does:** Checks for the use of `format!("string literal with no
@@ -11,9 +11,9 @@ use rustc::ty::{self, Ty};
use rustc_data_structures::fx::FxHashSet;
use rustc_errors::Applicability;
use rustc_session::declare_tool_lint;
use rustc_span::source_map::Span;
use rustc_target::spec::abi::Abi;
use syntax::ast::Attribute;
use syntax::source_map::Span;

declare_clippy_lint! {
/// **What it does:** Checks for functions with too many parameters.
@@ -7,9 +7,9 @@ use rustc::hir::{BinOpKind, Expr, ExprKind};
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
use rustc_errors::Applicability;
use rustc_session::declare_tool_lint;
use rustc_span::source_map::Spanned;
use rustc_span::symbol::Symbol;
use syntax::ast::LitKind;
use syntax::source_map::Spanned;
use syntax::symbol::Symbol;

declare_clippy_lint! {
/// **What it does:** Checks for using `x.get(x.len() - 1)` instead of
@@ -3,7 +3,7 @@ use rustc::hir::*;
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
use rustc::ty;
use rustc_session::declare_tool_lint;
use syntax::source_map::Span;
use rustc_span::source_map::Span;

use crate::consts::{constant_simple, Constant};
use crate::utils::{clip, snippet, span_lint, unsext};
@@ -11,7 +11,7 @@ use rustc::{
};
use rustc_errors::Applicability;
use rustc_session::declare_tool_lint;
use syntax::source_map::Span;
use rustc_span::source_map::Span;

declare_clippy_lint! {
/// **What it does:** Checks for missing return statements at the end of a block.
@@ -7,8 +7,8 @@ use rustc::ty;
use rustc_data_structures::fx::FxHashSet;
use rustc_errors::Applicability;
use rustc_session::declare_tool_lint;
use rustc_span::source_map::{Span, Spanned};
use syntax::ast::{LitKind, Name};
use syntax::source_map::{Span, Spanned};

declare_clippy_lint! {
/// **What it does:** Checks for getting the length of something via `.len()`
@@ -6,8 +6,8 @@ use rustc::hir::*;
use rustc::lint::{in_external_macro, LateContext, LateLintPass, LintArray, LintContext, LintPass};
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
use rustc_session::declare_tool_lint;
use syntax::source_map::Span;
use syntax::symbol::kw;
use rustc_span::source_map::Span;
use rustc_span::symbol::kw;

use crate::reexport::*;
use crate::utils::{last_path_segment, span_lint, trait_ref_of_method};
@@ -16,12 +16,12 @@ use crate::utils::{is_type_diagnostic_item, qpath_res, same_tys, sext, sugg};
use rustc::ty::{self, Ty};
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
use rustc_errors::Applicability;
use rustc_span::source_map::Span;
use rustc_span::{BytePos, Symbol};
use rustc_typeck::expr_use_visitor::*;
use std::iter::{once, Iterator};
use std::mem;
use syntax::ast;
use syntax::source_map::Span;

use crate::utils::paths;
use crate::utils::{
@@ -2,8 +2,8 @@ use rustc::hir::{Crate, Expr, ExprKind, QPath};
use rustc::impl_lint_pass;
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
use rustc_session::declare_tool_lint;
use rustc_span::symbol::sym;
use syntax::ast::AttrKind;
use syntax::symbol::sym;

use crate::utils::{is_entrypoint_fn, snippet, span_help_and_lint};
use if_chain::if_chain;
@@ -9,8 +9,8 @@ use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
use rustc::ty;
use rustc_errors::Applicability;
use rustc_session::declare_tool_lint;
use rustc_span::source_map::Span;
use syntax::ast::Ident;
use syntax::source_map::Span;

declare_clippy_lint! {
/// **What it does:** Checks for usage of `iterator.map(|x| x.clone())` and suggests
@@ -7,7 +7,7 @@ use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
use rustc::ty::{self, Ty};
use rustc_errors::Applicability;
use rustc_session::declare_tool_lint;
use syntax::source_map::Span;
use rustc_span::source_map::Span;

declare_clippy_lint! {
/// **What it does:** Checks for usage of `option.map(f)` where f is a function
@@ -13,10 +13,10 @@ use rustc::lint::{in_external_macro, LateContext, LateLintPass, LintArray, LintC
use rustc::ty::{self, Ty};
use rustc_errors::Applicability;
use rustc_session::declare_tool_lint;
use rustc_span::source_map::Span;
use std::cmp::Ordering;
use std::collections::Bound;
use syntax::ast::LitKind;
use syntax::source_map::Span;

declare_clippy_lint! {
/// **What it does:** Checks for matches with a single arm where an `if let`
@@ -8,7 +8,7 @@ use rustc::hir::{BorrowKind, Expr, ExprKind, Mutability, QPath};
use rustc::lint::{in_external_macro, LateContext, LateLintPass, LintArray, LintPass};
use rustc_errors::Applicability;
use rustc_session::declare_tool_lint;
use syntax::source_map::Span;
use rustc_span::source_map::Span;

declare_clippy_lint! {
/// **What it does:** Checks for `mem::replace()` on an `Option` with
@@ -16,9 +16,9 @@ use rustc::lint::{in_external_macro, LateContext, LateLintPass, Lint, LintArray,
use rustc::ty::{self, Predicate, Ty};
use rustc_errors::Applicability;
use rustc_session::declare_tool_lint;
use rustc_span::source_map::Span;
use rustc_span::symbol::{sym, Symbol, SymbolStr};
use syntax::ast;
use syntax::source_map::Span;
use syntax::symbol::{sym, Symbol, SymbolStr};

use crate::utils::usage::mutated_variables;
use crate::utils::{
@@ -5,8 +5,8 @@ use rustc::hir::{self, *};
use rustc::lint::LateContext;
use rustc_data_structures::fx::FxHashSet;
use rustc_errors::Applicability;
use rustc_span::source_map::Span;
use rustc_span::symbol::Symbol;
use syntax::source_map::Span;

use super::OPTION_MAP_UNWRAP_OR;

@@ -7,8 +7,8 @@ use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
use rustc::ty;
use rustc_errors::Applicability;
use rustc_session::declare_tool_lint;
use rustc_span::source_map::{ExpnKind, Span};
use syntax::ast::LitKind;
use syntax::source_map::{ExpnKind, Span};

use crate::consts::{constant, Constant};
use crate::utils::sugg::Sugg;
@@ -8,8 +8,8 @@ use rustc::lint::{in_external_macro, EarlyContext, EarlyLintPass, LintArray, Lin
use rustc_data_structures::fx::FxHashMap;
use rustc_errors::Applicability;
use rustc_session::declare_tool_lint;
use rustc_span::source_map::Span;
use syntax::ast::*;
use syntax::source_map::Span;
use syntax::visit::{walk_expr, FnKind, Visitor};

declare_clippy_lint! {
@@ -12,9 +12,9 @@ use rustc::impl_lint_pass;
use rustc::lint::{LateContext, LateLintPass, LintArray, LintContext, LintPass};
use rustc::ty;
use rustc_session::declare_tool_lint;
use rustc_span::source_map::Span;
use syntax::ast::{self, MetaItem, MetaItemKind};
use syntax::attr;
use syntax::source_map::Span;

declare_clippy_lint! {
/// **What it does:** Warns if there is missing doc for any documentable item
@@ -3,8 +3,8 @@ use rustc::declare_lint_pass;
use rustc::hir;
use rustc::lint::{self, LateContext, LateLintPass, LintArray, LintContext, LintPass};
use rustc_session::declare_tool_lint;
use rustc_span::source_map::Span;
use syntax::ast;
use syntax::source_map::Span;

declare_clippy_lint! {
/// **What it does:** it lints if an exported function, method, trait method with default impl,
@@ -4,7 +4,8 @@ use crate::utils::span_lint;
use rustc::declare_lint_pass;
use rustc::lint::{EarlyContext, EarlyLintPass, LintArray, LintPass};
use rustc_session::declare_tool_lint;
use syntax::{ast::*, source_map::DUMMY_SP};
use rustc_span::source_map::DUMMY_SP;
use syntax::ast::*;

use itertools::Itertools;

@@ -4,7 +4,7 @@ use rustc::hir;
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
use rustc::ty::{Adt, Dynamic, Opaque, Param, RawPtr, Ref, Ty, TypeAndMut};
use rustc_session::declare_tool_lint;
use syntax::source_map::Span;
use rustc_span::source_map::Span;

declare_clippy_lint! {
/// **What it does:** Checks for sets/maps with mutable key types.
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.