mirror of
https://github.com/rust-lang/rust-clippy
synced 2025-02-17 06:28:42 +00:00
Rustup to rustc 1.30.0-nightly (23f09bbed 2018-08-14)
This commit is contained in:
parent
84aa49935d
commit
bac76afb5a
2 changed files with 5 additions and 5 deletions
|
@ -4,7 +4,7 @@ use rustc::hir::*;
|
|||
use rustc::hir::intravisit::*;
|
||||
use syntax::ast::{LitKind, NodeId, DUMMY_NODE_ID};
|
||||
use syntax::codemap::{dummy_spanned, Span, DUMMY_SP};
|
||||
use syntax::util::ThinVec;
|
||||
use rustc_data_structures::thin_vec::ThinVec;
|
||||
use crate::utils::{in_macro, paths, match_type, snippet_opt, span_lint_and_then, SpanlessEq, get_trait_def_id, implements_trait};
|
||||
|
||||
/// **What it does:** Checks for boolean expressions that can be written more
|
||||
|
|
|
@ -5,7 +5,7 @@ use rustc::hir::*;
|
|||
use std::collections::HashMap;
|
||||
use std::collections::hash_map::Entry;
|
||||
use syntax::symbol::LocalInternedString;
|
||||
use syntax::util::small_vector::SmallVector;
|
||||
use rustc_data_structures::small_vec::OneVector;
|
||||
use crate::utils::{SpanlessEq, SpanlessHash};
|
||||
use crate::utils::{get_parent_expr, in_macro, snippet, span_lint_and_then, span_note_and_lint};
|
||||
|
||||
|
@ -233,9 +233,9 @@ fn lint_match_arms(cx: &LateContext<'_, '_>, expr: &Expr) {
|
|||
/// sequence of `if/else`.
|
||||
/// Eg. would return `([a, b], [c, d, e])` for the expression
|
||||
/// `if a { c } else if b { d } else { e }`.
|
||||
fn if_sequence(mut expr: &Expr) -> (SmallVector<&Expr>, SmallVector<&Block>) {
|
||||
let mut conds = SmallVector::new();
|
||||
let mut blocks: SmallVector<&Block> = SmallVector::new();
|
||||
fn if_sequence(mut expr: &Expr) -> (OneVector<&Expr>, OneVector<&Block>) {
|
||||
let mut conds = OneVector::new();
|
||||
let mut blocks: OneVector<&Block> = OneVector::new();
|
||||
|
||||
while let ExprKind::If(ref cond, ref then_expr, ref else_expr) = expr.node {
|
||||
conds.push(&**cond);
|
||||
|
|
Loading…
Add table
Reference in a new issue