summaryrefslogtreecommitdiffstats
path: root/library/proc_macro/src
diff options
context:
space:
mode:
Diffstat (limited to 'library/proc_macro/src')
-rw-r--r--library/proc_macro/src/bridge/fxhash.rs2
-rw-r--r--library/proc_macro/src/lib.rs6
2 files changed, 3 insertions, 5 deletions
diff --git a/library/proc_macro/src/bridge/fxhash.rs b/library/proc_macro/src/bridge/fxhash.rs
index 17bd0a1b3..f4e905441 100644
--- a/library/proc_macro/src/bridge/fxhash.rs
+++ b/library/proc_macro/src/bridge/fxhash.rs
@@ -5,8 +5,6 @@
//! on the `rustc_hash` crate.
use std::collections::HashMap;
-use std::convert::TryInto;
-use std::default::Default;
use std::hash::BuildHasherDefault;
use std::hash::Hasher;
use std::mem::size_of;
diff --git a/library/proc_macro/src/lib.rs b/library/proc_macro/src/lib.rs
index 938935771..9d081c8b8 100644
--- a/library/proc_macro/src/lib.rs
+++ b/library/proc_macro/src/lib.rs
@@ -47,7 +47,7 @@ use std::cmp::Ordering;
use std::ops::RangeBounds;
use std::path::PathBuf;
use std::str::FromStr;
-use std::{error, fmt, iter};
+use std::{error, fmt};
/// Determines whether proc_macro has been made accessible to the currently
/// running program.
@@ -310,7 +310,7 @@ impl ConcatStreamsHelper {
/// Collects a number of token trees into a single stream.
#[stable(feature = "proc_macro_lib2", since = "1.29.0")]
-impl iter::FromIterator<TokenTree> for TokenStream {
+impl FromIterator<TokenTree> for TokenStream {
fn from_iter<I: IntoIterator<Item = TokenTree>>(trees: I) -> Self {
let iter = trees.into_iter();
let mut builder = ConcatTreesHelper::new(iter.size_hint().0);
@@ -322,7 +322,7 @@ impl iter::FromIterator<TokenTree> for TokenStream {
/// A "flattening" operation on token streams, collects token trees
/// from multiple token streams into a single stream.
#[stable(feature = "proc_macro_lib", since = "1.15.0")]
-impl iter::FromIterator<TokenStream> for TokenStream {
+impl FromIterator<TokenStream> for TokenStream {
fn from_iter<I: IntoIterator<Item = TokenStream>>(streams: I) -> Self {
let iter = streams.into_iter();
let mut builder = ConcatStreamsHelper::new(iter.size_hint().0);