about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-03-16 13:56:13 +0000
committerbors <bors@rust-lang.org>2021-03-16 13:56:13 +0000
commit5b3e61d62fef8a486bf42bf80b450c116189f3ef (patch)
treefe35ace251cf5d5cae9bd114ea261bdfcd01d366
parent1a206fc4abae0b57a3f393481367cf3efca23586 (diff)
parentbdf2dceec12bddf0def1b6f8b462f7257d8ff046 (diff)
downloadrust-5b3e61d62fef8a486bf42bf80b450c116189f3ef.tar.gz
rust-5b3e61d62fef8a486bf42bf80b450c116189f3ef.zip
Auto merge of #6912 - flip1995:dep-cleanup, r=Manishearth
Get rid of some unused dependecies

changelog: none
-rw-r--r--Cargo.toml2
-rw-r--r--clippy_lints/Cargo.toml3
-rw-r--r--clippy_utils/Cargo.toml2
-rw-r--r--clippy_utils/src/lib.rs9
4 files changed, 5 insertions, 11 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 2b9488de289..dcc3294f8a7 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -37,6 +37,8 @@ clippy-mini-macro-test = { version = "0.2", path = "mini-macro" }
 serde = { version = "1.0", features = ["derive"] }
 derive-new = "0.5"
 regex = "1.4"
+quote = "1"
+syn = { version = "1", features = ["full"] }
 
 # A noop dependency that changes in the Rust repository, it's a bit of a hack.
 # See the `src/tools/rustc-workspace-hack/README.md` file in `rust-lang/rust`
diff --git a/clippy_lints/Cargo.toml b/clippy_lints/Cargo.toml
index 6bd6c079276..e67d03d3338 100644
--- a/clippy_lints/Cargo.toml
+++ b/clippy_lints/Cargo.toml
@@ -20,7 +20,6 @@ pulldown-cmark = { version = "0.8", default-features = false }
 quine-mc_cluskey = "0.2.2"
 regex-syntax = "0.6"
 serde = { version = "1.0", features = ["derive"] }
-smallvec = { version = "1", features = ["union"] }
 toml = "0.5.3"
 unicode-normalization = "0.1"
 semver = "0.11"
@@ -28,8 +27,6 @@ rustc-semver = "1.1.0"
 # NOTE: cargo requires serde feat in its url dep
 # see <https://github.com/rust-lang/rust/pull/63587#issuecomment-522343864>
 url = { version = "2.1.0", features = ["serde"] }
-quote = "1"
-syn = { version = "1", features = ["full"] }
 
 [features]
 deny-warnings = []
diff --git a/clippy_utils/Cargo.toml b/clippy_utils/Cargo.toml
index 9e07f140cf1..bd592dc03da 100644
--- a/clippy_utils/Cargo.toml
+++ b/clippy_utils/Cargo.toml
@@ -10,8 +10,6 @@ if_chain = "1.0.0"
 itertools = "0.9"
 regex-syntax = "0.6"
 serde = { version = "1.0", features = ["derive"] }
-smallvec = { version = "1", features = ["union"] }
-toml = "0.5.3"
 unicode-normalization = "0.1"
 rustc-semver="1.1.0"
 
diff --git a/clippy_utils/src/lib.rs b/clippy_utils/src/lib.rs
index d3cf2a34709..3efa84f6b86 100644
--- a/clippy_utils/src/lib.rs
+++ b/clippy_utils/src/lib.rs
@@ -79,7 +79,6 @@ use rustc_span::sym;
 use rustc_span::symbol::{kw, Ident, Symbol};
 use rustc_span::{Span, DUMMY_SP};
 use rustc_target::abi::Integer;
-use smallvec::SmallVec;
 
 use crate::consts::{constant, Constant};
 use crate::ty::is_recursively_primitive_type;
@@ -1152,11 +1151,9 @@ pub fn match_panic_def_id(cx: &LateContext<'_>, did: DefId) -> bool {
 /// sequence of `if/else`.
 /// E.g., this returns `([a, b], [c, d, e])` for the expression
 /// `if a { c } else if b { d } else { e }`.
-pub fn if_sequence<'tcx>(
-    mut expr: &'tcx Expr<'tcx>,
-) -> (SmallVec<[&'tcx Expr<'tcx>; 1]>, SmallVec<[&'tcx Block<'tcx>; 1]>) {
-    let mut conds = SmallVec::new();
-    let mut blocks: SmallVec<[&Block<'_>; 1]> = SmallVec::new();
+pub fn if_sequence<'tcx>(mut expr: &'tcx Expr<'tcx>) -> (Vec<&'tcx Expr<'tcx>>, Vec<&'tcx Block<'tcx>>) {
+    let mut conds = Vec::new();
+    let mut blocks: Vec<&Block<'_>> = Vec::new();
 
     while let ExprKind::If(ref cond, ref then_expr, ref else_expr) = expr.kind {
         conds.push(&**cond);