about summary refs log tree commit diff
path: root/src/librustdoc/clean/auto_trait.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/librustdoc/clean/auto_trait.rs')
-rw-r--r--src/librustdoc/clean/auto_trait.rs20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/librustdoc/clean/auto_trait.rs b/src/librustdoc/clean/auto_trait.rs
index de5a680ccf9..fde8648c0c4 100644
--- a/src/librustdoc/clean/auto_trait.rs
+++ b/src/librustdoc/clean/auto_trait.rs
@@ -84,7 +84,7 @@ impl<'a, 'tcx, 'rcx, 'cstore> AutoTraitFinder<'a, 'tcx, 'rcx, 'cstore> {
             .into_iter()
             .chain(self.get_auto_trait_impl_for(
                 def_id,
-                name.clone(),
+                name,
                 generics.clone(),
                 def_ctor,
                 tcx.require_lang_item(lang_items::SyncTraitLangItem),
@@ -178,7 +178,7 @@ impl<'a, 'tcx, 'rcx, 'cstore> AutoTraitFinder<'a, 'tcx, 'rcx, 'cstore> {
                 inner: ImplItem(Impl {
                     unsafety: hir::Unsafety::Normal,
                     generics: new_generics,
-                    provided_trait_methods: FxHashSet(),
+                    provided_trait_methods: Default::default(),
                     trait_: Some(trait_.clean(self.cx)),
                     for_: ty.clean(self.cx),
                     items: Vec::new(),
@@ -267,9 +267,9 @@ impl<'a, 'tcx, 'rcx, 'cstore> AutoTraitFinder<'a, 'tcx, 'rcx, 'cstore> {
         // all intermediate RegionVids. At the end, all constraints should
         // be between Regions (aka region variables). This gives us the information
         // we need to create the Generics.
-        let mut finished: FxHashMap<_, Vec<_>> = FxHashMap();
+        let mut finished: FxHashMap<_, Vec<_>> = Default::default();
 
-        let mut vid_map: FxHashMap<RegionTarget, RegionDeps> = FxHashMap();
+        let mut vid_map: FxHashMap<RegionTarget, RegionDeps> = Default::default();
 
         // Flattening is done in two parts. First, we insert all of the constraints
         // into a map. Each RegionTarget (either a RegionVid or a Region) maps
@@ -407,7 +407,7 @@ impl<'a, 'tcx, 'rcx, 'cstore> AutoTraitFinder<'a, 'tcx, 'rcx, 'cstore> {
     ) -> FxHashSet<GenericParamDef> {
         pred.walk_tys()
             .flat_map(|t| {
-                let mut regions = FxHashSet();
+                let mut regions = FxHashSet::default();
                 tcx.collect_regions(&t, &mut regions);
 
                 regions.into_iter().flat_map(|r| {
@@ -576,12 +576,12 @@ impl<'a, 'tcx, 'rcx, 'cstore> AutoTraitFinder<'a, 'tcx, 'rcx, 'cstore> {
             ..
         } = full_generics.clean(self.cx);
 
-        let mut has_sized = FxHashSet();
-        let mut ty_to_bounds: FxHashMap<_, FxHashSet<_>> = FxHashMap();
-        let mut lifetime_to_bounds: FxHashMap<_, FxHashSet<_>> = FxHashMap();
-        let mut ty_to_traits: FxHashMap<Type, FxHashSet<Type>> = FxHashMap();
+        let mut has_sized = FxHashSet::default();
+        let mut ty_to_bounds: FxHashMap<_, FxHashSet<_>> = Default::default();
+        let mut lifetime_to_bounds: FxHashMap<_, FxHashSet<_>> = Default::default();
+        let mut ty_to_traits: FxHashMap<Type, FxHashSet<Type>> = Default::default();
 
-        let mut ty_to_fn: FxHashMap<Type, (Option<PolyTrait>, Option<Type>)> = FxHashMap();
+        let mut ty_to_fn: FxHashMap<Type, (Option<PolyTrait>, Option<Type>)> = Default::default();
 
         for (orig_p, p) in clean_where_predicates {
             match p {