diff options
| author | Ralf Jung <post@ralfj.de> | 2017-07-12 13:19:58 -0700 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2017-07-12 13:19:58 -0700 |
| commit | 0bbc3158300452dbb45931ab8d6740faa840d486 (patch) | |
| tree | 8d64bdd06cab1a11a327d13c0b6fc566120b9fc5 /src | |
| parent | e1ad1909db65562c6289bf692722d4b31b555125 (diff) | |
please tidy by shortening lines
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc/mir/tcx.rs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/librustc/mir/tcx.rs b/src/librustc/mir/tcx.rs index d3b87c1201d..1af80771fb9 100644 --- a/src/librustc/mir/tcx.rs +++ b/src/librustc/mir/tcx.rs @@ -121,7 +121,9 @@ impl<'tcx> TypeFoldable<'tcx> for LvalueTy<'tcx> { } impl<'tcx> Lvalue<'tcx> { - pub fn ty<'a, 'gcx, D: HasLocalDecls<'tcx>>(&self, local_decls: &D, tcx: TyCtxt<'a, 'gcx, 'tcx>) -> LvalueTy<'tcx> { + pub fn ty<'a, 'gcx, D>(&self, local_decls: &D, tcx: TyCtxt<'a, 'gcx, 'tcx>) -> LvalueTy<'tcx> + where D: HasLocalDecls<'tcx> + { match *self { Lvalue::Local(index) => LvalueTy::Ty { ty: local_decls.local_decls()[index].ty }, @@ -134,7 +136,8 @@ impl<'tcx> Lvalue<'tcx> { } impl<'tcx> Rvalue<'tcx> { - pub fn ty<'a, 'gcx, D: HasLocalDecls<'tcx>>(&self, local_decls: &D, tcx: TyCtxt<'a, 'gcx, 'tcx>) -> Ty<'tcx> + pub fn ty<'a, 'gcx, D>(&self, local_decls: &D, tcx: TyCtxt<'a, 'gcx, 'tcx>) -> Ty<'tcx> + where D: HasLocalDecls<'tcx> { match *self { Rvalue::Use(ref operand) => operand.ty(local_decls, tcx), @@ -206,7 +209,9 @@ impl<'tcx> Rvalue<'tcx> { } impl<'tcx> Operand<'tcx> { - pub fn ty<'a, 'gcx, D: HasLocalDecls<'tcx>>(&self, local_decls: &D, tcx: TyCtxt<'a, 'gcx, 'tcx>) -> Ty<'tcx> { + pub fn ty<'a, 'gcx, D>(&self, local_decls: &D, tcx: TyCtxt<'a, 'gcx, 'tcx>) -> Ty<'tcx> + where D: HasLocalDecls<'tcx> + { match self { &Operand::Consume(ref l) => l.ty(local_decls, tcx).to_ty(tcx), &Operand::Constant(ref c) => c.ty, |
