diff options
| author | kennytm <kennytm@gmail.com> | 2018-11-07 18:02:05 +0800 |
|---|---|---|
| committer | kennytm <kennytm@gmail.com> | 2018-11-07 21:27:00 +0800 |
| commit | 9d9146ad957494821aa3d54aedf4dbcb6c3b7cea (patch) | |
| tree | ca62a9b11c4a34f8ca15040e97fdd144e58d075b /src/librustc/ty | |
| parent | e222d1db3c0fc437a7e44af7a44d3e8628cc875a (diff) | |
| parent | eca11b99a7d25e4e6573472a16537c1aacb5d5e1 (diff) | |
| download | rust-9d9146ad957494821aa3d54aedf4dbcb6c3b7cea.tar.gz rust-9d9146ad957494821aa3d54aedf4dbcb6c3b7cea.zip | |
Rollup merge of #55734 - teresy:shorthand-fields, r=davidtwco
refactor: use shorthand fields refactor: use shorthand for single fields everywhere (excluding tests).
Diffstat (limited to 'src/librustc/ty')
| -rw-r--r-- | src/librustc/ty/_match.rs | 2 | ||||
| -rw-r--r-- | src/librustc/ty/fold.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc/ty/_match.rs b/src/librustc/ty/_match.rs index c9b0e97c9b0..d20b6d36199 100644 --- a/src/librustc/ty/_match.rs +++ b/src/librustc/ty/_match.rs @@ -34,7 +34,7 @@ pub struct Match<'a, 'gcx: 'a+'tcx, 'tcx: 'a> { impl<'a, 'gcx, 'tcx> Match<'a, 'gcx, 'tcx> { pub fn new(tcx: TyCtxt<'a, 'gcx, 'tcx>) -> Match<'a, 'gcx, 'tcx> { - Match { tcx: tcx } + Match { tcx } } } diff --git a/src/librustc/ty/fold.rs b/src/librustc/ty/fold.rs index 8c822adf7b0..ffa4380a5d6 100644 --- a/src/librustc/ty/fold.rs +++ b/src/librustc/ty/fold.rs @@ -82,7 +82,7 @@ pub trait TypeFoldable<'tcx>: fmt::Debug + Clone { } fn has_type_flags(&self, flags: TypeFlags) -> bool { - self.visit_with(&mut HasTypeFlagsVisitor { flags: flags }) + self.visit_with(&mut HasTypeFlagsVisitor { flags }) } fn has_projections(&self) -> bool { self.has_type_flags(TypeFlags::HAS_PROJECTION) |
