]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_passes/stability.rs
Rollup merge of #68911 - jonas-schievink:inherent-overlap, r=petrochenkov
[rust.git] / src / librustc_passes / stability.rs
index 320b433190e5e89761211554f5bc44e1fb118a4c..12debfb66a431ec32b228fe5ffa72355b5e7e57e 100644 (file)
@@ -10,6 +10,7 @@
 use rustc::traits::misc::can_type_implement_copy;
 use rustc::ty::query::Providers;
 use rustc::ty::TyCtxt;
+use rustc_attr::{self as attr, Stability};
 use rustc_data_structures::fx::{FxHashMap, FxHashSet};
 use rustc_errors::struct_span_err;
 use rustc_hir as hir;
@@ -20,7 +21,6 @@
 use rustc_span::symbol::{sym, Symbol};
 use rustc_span::Span;
 use syntax::ast::Attribute;
-use syntax::attr::{self, Stability};
 
 use std::cmp::Ordering;
 use std::mem::replace;
@@ -366,8 +366,8 @@ fn new_index(tcx: TyCtxt<'tcx>) -> Index<'tcx> {
     // Put the active features into a map for quick lookup.
     index.active_features = active_lib_features
         .iter()
-        .map(|&(ref s, ..)| s.clone())
-        .chain(active_lang_features.iter().map(|&(ref s, ..)| s.clone()))
+        .map(|&(s, ..)| s)
+        .chain(active_lang_features.iter().map(|&(s, ..)| s))
         .collect();
 
     {
@@ -468,6 +468,7 @@ fn visit_item(&mut self, item: &'tcx hir::Item<'tcx>) {
                         let trait_item_def_id = self
                             .tcx
                             .associated_items(trait_did)
+                            .iter()
                             .find(|item| item.ident.name == impl_item.ident.name)
                             .map(|item| item.def_id);
                         if let Some(def_id) = trait_item_def_id {