Skip to content

Commit 2f364d9

Browse files
author
Michael Wright
committed
Merge branch 'master' into unnecessary_filter_map
2 parents f5ffac4 + a72e786 commit 2f364d9

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

clippy_lints/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ unicode-normalization = "0.1"
3333
pulldown-cmark = "0.1"
3434
url = "1.7.0"
3535
if_chain = "0.1.3"
36+
smallvec = { version = "0.6.5", features = ["union"] }
3637

3738
[features]
3839
debugging = []

clippy_lints/src/copies.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use crate::rustc_data_structures::fx::FxHashMap;
66
use std::collections::hash_map::Entry;
77
use std::hash::BuildHasherDefault;
88
use crate::syntax::symbol::LocalInternedString;
9-
use crate::rustc_data_structures::small_vec::OneVector;
9+
use smallvec::SmallVec;
1010
use crate::utils::{SpanlessEq, SpanlessHash};
1111
use crate::utils::{get_parent_expr, in_macro, snippet, span_lint_and_then, span_note_and_lint};
1212

@@ -235,9 +235,9 @@ fn lint_match_arms(cx: &LateContext<'_, '_>, expr: &Expr) {
235235
/// sequence of `if/else`.
236236
/// Eg. would return `([a, b], [c, d, e])` for the expression
237237
/// `if a { c } else if b { d } else { e }`.
238-
fn if_sequence(mut expr: &Expr) -> (OneVector<&Expr>, OneVector<&Block>) {
239-
let mut conds = OneVector::new();
240-
let mut blocks: OneVector<&Block> = OneVector::new();
238+
fn if_sequence(mut expr: &Expr) -> (SmallVec<[&Expr; 1]>, SmallVec<[&Block; 1]>) {
239+
let mut conds = SmallVec::new();
240+
let mut blocks: SmallVec<[&Block; 1]> = SmallVec::new();
241241

242242
while let ExprKind::If(ref cond, ref then_expr, ref else_expr) = expr.node {
243243
conds.push(&**cond);

tests/dogfood.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,16 @@ fn dogfood() {
44
return;
55
}
66
let root_dir = std::env::current_dir().unwrap();
7-
for d in &[".", "clippy_lints"] {
7+
for d in &[".", "clippy_lints", "rustc_tools_util", "clippy_dev"] {
88
std::env::set_current_dir(root_dir.join(d)).unwrap();
99
let output = std::process::Command::new("cargo")
1010
.arg("run")
1111
.arg("--bin")
1212
.arg("cargo-clippy")
13+
.arg("--all-features")
1314
.arg("--manifest-path")
1415
.arg(root_dir.join("Cargo.toml"))
16+
.args(&["--", "-W clippy::internal"])
1517
.env("CLIPPY_DOGFOOD", "true")
1618
.output()
1719
.unwrap();

0 commit comments

Comments
 (0)