]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc/traits/auto_trait.rs
Auto merge of #55014 - ljedrz:lazyboye_unwraps, r=matthewjasper
[rust.git] / src / librustc / traits / auto_trait.rs
index 666e06a6464653f6330593bde985facc273c3b78..50ca6ca78ab3aa5b81dd85670bf025e8101673e2 100644 (file)
@@ -131,7 +131,7 @@ pub fn find_auto_trait_generics<A>(
         }
 
         return tcx.infer_ctxt().enter(|mut infcx| {
-            let mut fresh_preds = FxHashSet();
+            let mut fresh_preds = FxHashSet::default();
 
             // Due to the way projections are handled by SelectionContext, we need to run
             // evaluate_predicates twice: once on the original param env, and once on the result of
@@ -311,7 +311,7 @@ pub fn evaluate_predicates<'b, 'gcx, 'c>(
 
         let mut select = SelectionContext::new(&infcx);
 
-        let mut already_visited = FxHashSet();
+        let mut already_visited = FxHashSet::default();
         let mut predicates = VecDeque::new();
         predicates.push_back(ty::Binder::bind(ty::TraitPredicate {
             trait_ref: ty::TraitRef {
@@ -508,8 +508,8 @@ pub fn map_vid_to_region<'cx>(
         &self,
         regions: &RegionConstraintData<'cx>,
     ) -> FxHashMap<ty::RegionVid, ty::Region<'cx>> {
-        let mut vid_map: FxHashMap<RegionTarget<'cx>, RegionDeps<'cx>> = FxHashMap();
-        let mut finished_map = FxHashMap();
+        let mut vid_map: FxHashMap<RegionTarget<'cx>, RegionDeps<'cx>> = FxHashMap::default();
+        let mut finished_map = FxHashMap::default();
 
         for constraint in regions.constraints.keys() {
             match constraint {