Skip to content

Commit a8c2c7b

Browse files
committed
Auto merge of #7604 - flip1995:rustup, r=Manishearth
Rustup I'll write some TODOs later. This time I'll need a review for this Rustup r? `@ghost` (for now) changelog: none
2 parents 849f0a1 + 01b17af commit a8c2c7b

File tree

120 files changed

+1520
-2556
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+1520
-2556
lines changed

CHANGELOG.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -964,7 +964,7 @@ Released 2020-11-19
964964
[#5907](https://github.com/rust-lang/rust-clippy/pull/5907)
965965
* [`suspicious_arithmetic_impl`]: extend to implementations of `BitAnd`, `BitOr`, `BitXor`, `Rem`, `Shl`, and `Shr`
966966
[#5884](https://github.com/rust-lang/rust-clippy/pull/5884)
967-
* [`invalid_atomic_ordering`]: detect misuse of `compare_exchange`, `compare_exchange_weak`, and `fetch_update`
967+
* `invalid_atomic_ordering`: detect misuse of `compare_exchange`, `compare_exchange_weak`, and `fetch_update`
968968
[#6025](https://github.com/rust-lang/rust-clippy/pull/6025)
969969
* Avoid [`redundant_pattern_matching`] triggering in macros
970970
[#6069](https://github.com/rust-lang/rust-clippy/pull/6069)
@@ -1451,7 +1451,7 @@ Released 2020-03-12
14511451
* [`option_as_ref_deref`] [#4945](https://github.com/rust-lang/rust-clippy/pull/4945)
14521452
* [`wildcard_in_or_patterns`] [#4960](https://github.com/rust-lang/rust-clippy/pull/4960)
14531453
* [`iter_nth_zero`] [#4966](https://github.com/rust-lang/rust-clippy/pull/4966)
1454-
* [`invalid_atomic_ordering`] [#4999](https://github.com/rust-lang/rust-clippy/pull/4999)
1454+
* `invalid_atomic_ordering` [#4999](https://github.com/rust-lang/rust-clippy/pull/4999)
14551455
* [`skip_while_next`] [#5067](https://github.com/rust-lang/rust-clippy/pull/5067)
14561456

14571457
### Moves and Deprecations
@@ -2712,7 +2712,6 @@ Released 2018-09-13
27122712
[`integer_arithmetic`]: https://rust-lang.github.io/rust-clippy/master/index.html#integer_arithmetic
27132713
[`integer_division`]: https://rust-lang.github.io/rust-clippy/master/index.html#integer_division
27142714
[`into_iter_on_ref`]: https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref
2715-
[`invalid_atomic_ordering`]: https://rust-lang.github.io/rust-clippy/master/index.html#invalid_atomic_ordering
27162715
[`invalid_null_ptr_usage`]: https://rust-lang.github.io/rust-clippy/master/index.html#invalid_null_ptr_usage
27172716
[`invalid_regex`]: https://rust-lang.github.io/rust-clippy/master/index.html#invalid_regex
27182717
[`invalid_upcast_comparisons`]: https://rust-lang.github.io/rust-clippy/master/index.html#invalid_upcast_comparisons

clippy_lints/src/assertions_on_constants.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use clippy_utils::consts::{constant, Constant};
22
use clippy_utils::diagnostics::span_lint_and_help;
3+
use clippy_utils::higher;
34
use clippy_utils::source::snippet_opt;
45
use clippy_utils::{is_direct_expn_of, is_expn_of, match_panic_call};
56
use if_chain::if_chain;
@@ -116,7 +117,7 @@ enum AssertKind {
116117
/// where `message` is any expression and `c` is a constant bool.
117118
fn match_assert_with_message<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) -> Option<AssertKind> {
118119
if_chain! {
119-
if let ExprKind::If(cond, then, _) = expr.kind;
120+
if let Some(higher::If { cond, then, .. }) = higher::If::hir(expr);
120121
if let ExprKind::Unary(UnOp::Not, expr) = cond.kind;
121122
// bind the first argument of the `assert!` macro
122123
if let Some((Constant::Bool(is_true), _)) = constant(cx, cx.typeck_results(), expr);

clippy_lints/src/atomic_ordering.rs

-230
This file was deleted.

clippy_lints/src/blocks_in_if_conditions.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
use clippy_utils::diagnostics::{span_lint, span_lint_and_sugg};
2+
use clippy_utils::higher;
23
use clippy_utils::source::snippet_block_with_applicability;
34
use clippy_utils::ty::implements_trait;
45
use clippy_utils::{differing_macro_contexts, get_parent_expr};
@@ -92,7 +93,7 @@ impl<'tcx> LateLintPass<'tcx> for BlocksInIfConditions {
9293
if in_external_macro(cx.sess(), expr.span) {
9394
return;
9495
}
95-
if let ExprKind::If(cond, _, _) = &expr.kind {
96+
if let Some(higher::If { cond, .. }) = higher::If::hir(expr) {
9697
if let ExprKind::Block(block, _) = &cond.kind {
9798
if block.rules == BlockCheckMode::DefaultBlock {
9899
if block.stmts.is_empty() {

clippy_lints/src/booleans.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ impl<'a, 'tcx, 'v> Hir2Qmm<'a, 'tcx, 'v> {
116116
// prevent folding of `cfg!` macros and the like
117117
if !e.span.from_expansion() {
118118
match &e.kind {
119-
ExprKind::Unary(UnOp::Not, inner) => return Ok(Bool::Not(box self.run(inner)?)),
119+
ExprKind::Unary(UnOp::Not, inner) => return Ok(Bool::Not(Box::new(self.run(inner)?))),
120120
ExprKind::Binary(binop, lhs, rhs) => match &binop.node {
121121
BinOpKind::Or => {
122122
return Ok(Bool::Or(self.extract(BinOpKind::Or, &[lhs, rhs], Vec::new())?));

0 commit comments

Comments
 (0)