]> git.lizzy.rs Git - rust.git/commitdiff
don't redundantly repeat field names (clippy::redundant_field_names)
authorMatthias Krüger <matthias.krueger@famsik.de>
Sat, 21 Mar 2020 12:53:34 +0000 (13:53 +0100)
committerMatthias Krüger <matthias.krueger@famsik.de>
Sat, 21 Mar 2020 14:56:13 +0000 (15:56 +0100)
src/librustc_infer/traits/project.rs
src/librustc_infer/traits/util.rs
src/librustc_trait_selection/traits/select.rs

index 183e4be189022df4e6a6b7ab89b869e30bd50ca6..06870ccc7dd5eca4503951203b34859f20d9756d 100644 (file)
@@ -23,7 +23,7 @@ pub struct Normalized<'tcx, T> {
 
 impl<'tcx, T> Normalized<'tcx, T> {
     pub fn with<U>(self, value: U) -> Normalized<'tcx, U> {
-        Normalized { value: value, obligations: self.obligations }
+        Normalized { value, obligations: self.obligations }
     }
 }
 
index a7c0267111522eee1f7cee40e439c24cce5833c4..90f3cb1d24cccd68cb6d871493d035093bad20a7 100644 (file)
@@ -47,7 +47,7 @@ struct PredicateSet<'tcx> {
 
 impl PredicateSet<'tcx> {
     fn new(tcx: TyCtxt<'tcx>) -> Self {
-        Self { tcx: tcx, set: Default::default() }
+        Self { tcx, set: Default::default() }
     }
 
     fn insert(&mut self, pred: &ty::Predicate<'tcx>) -> bool {
index 660d4d14bc7286549477d228d34ba3c8807ec539..ca169d550e782031ba24a1179db596f8243b54ce 100644 (file)
@@ -2792,7 +2792,7 @@ fn confirm_trait_alias_candidate(
                 trait_def_id, trait_obligations
             );
 
-            VtableTraitAliasData { alias_def_id, substs: substs, nested: trait_obligations }
+            VtableTraitAliasData { alias_def_id, substs, nested: trait_obligations }
         })
     }