From 3b23d22e759268766eb803530da9b933879b8029 Mon Sep 17 00:00:00 2001 From: Andreas Jonson Date: Tue, 11 Feb 2020 19:28:38 +0100 Subject: [PATCH] remove some dependencies on itertools --- Cargo.lock | 2 -- src/librustc_macros/Cargo.toml | 1 - src/librustc_macros/src/query.rs | 6 +----- src/librustc_mir_build/Cargo.toml | 1 - 4 files changed, 1 insertion(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bbfda0fa2c846..a2ec5276cd5ec 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3738,7 +3738,6 @@ dependencies = [ name = "rustc_macros" version = "0.1.0" dependencies = [ - "itertools 0.8.0", "proc-macro2 1.0.3", "quote 1.0.2", "syn 1.0.11", @@ -3802,7 +3801,6 @@ name = "rustc_mir_build" version = "0.0.0" dependencies = [ "arena", - "itertools 0.8.0", "log", "rustc", "rustc_apfloat", diff --git a/src/librustc_macros/Cargo.toml b/src/librustc_macros/Cargo.toml index c28fcb1a395ff..73eb0dd56d772 100644 --- a/src/librustc_macros/Cargo.toml +++ b/src/librustc_macros/Cargo.toml @@ -12,4 +12,3 @@ synstructure = "0.12.1" syn = { version = "1", features = ["full"] } proc-macro2 = "1" quote = "1" -itertools = "0.8" diff --git a/src/librustc_macros/src/query.rs b/src/librustc_macros/src/query.rs index 6dc4f7f251595..294cdb7643fc9 100644 --- a/src/librustc_macros/src/query.rs +++ b/src/librustc_macros/src/query.rs @@ -1,4 +1,3 @@ -use itertools::Itertools; use proc_macro::TokenStream; use proc_macro2::{Delimiter, TokenTree}; use quote::quote; @@ -469,10 +468,7 @@ pub fn rustc_queries(input: TokenStream) -> TokenStream { attributes.push(quote! { eval_always }); }; - let mut attribute_stream = quote! {}; - for e in attributes.into_iter().intersperse(quote! {,}) { - attribute_stream.extend(e); - } + let attribute_stream = quote! {#(#attributes),*}; // Add the query to the group group_stream.extend(quote! { diff --git a/src/librustc_mir_build/Cargo.toml b/src/librustc_mir_build/Cargo.toml index 9ff3ed1a93588..c109e9c618e73 100644 --- a/src/librustc_mir_build/Cargo.toml +++ b/src/librustc_mir_build/Cargo.toml @@ -11,7 +11,6 @@ doctest = false [dependencies] arena = { path = "../libarena" } -itertools = "0.8" log = "0.4" rustc = { path = "../librustc" } rustc_apfloat = { path = "../librustc_apfloat" }