Skip to content

Commit 0bbc315

Browse files
committed
please tidy by shortening lines
1 parent e1ad190 commit 0bbc315

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/librustc/mir/tcx.rs

+8-3
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,9 @@ impl<'tcx> TypeFoldable<'tcx> for LvalueTy<'tcx> {
121121
}
122122

123123
impl<'tcx> Lvalue<'tcx> {
124-
pub fn ty<'a, 'gcx, D: HasLocalDecls<'tcx>>(&self, local_decls: &D, tcx: TyCtxt<'a, 'gcx, 'tcx>) -> LvalueTy<'tcx> {
124+
pub fn ty<'a, 'gcx, D>(&self, local_decls: &D, tcx: TyCtxt<'a, 'gcx, 'tcx>) -> LvalueTy<'tcx>
125+
where D: HasLocalDecls<'tcx>
126+
{
125127
match *self {
126128
Lvalue::Local(index) =>
127129
LvalueTy::Ty { ty: local_decls.local_decls()[index].ty },
@@ -134,7 +136,8 @@ impl<'tcx> Lvalue<'tcx> {
134136
}
135137

136138
impl<'tcx> Rvalue<'tcx> {
137-
pub fn ty<'a, 'gcx, D: HasLocalDecls<'tcx>>(&self, local_decls: &D, tcx: TyCtxt<'a, 'gcx, 'tcx>) -> Ty<'tcx>
139+
pub fn ty<'a, 'gcx, D>(&self, local_decls: &D, tcx: TyCtxt<'a, 'gcx, 'tcx>) -> Ty<'tcx>
140+
where D: HasLocalDecls<'tcx>
138141
{
139142
match *self {
140143
Rvalue::Use(ref operand) => operand.ty(local_decls, tcx),
@@ -206,7 +209,9 @@ impl<'tcx> Rvalue<'tcx> {
206209
}
207210

208211
impl<'tcx> Operand<'tcx> {
209-
pub fn ty<'a, 'gcx, D: HasLocalDecls<'tcx>>(&self, local_decls: &D, tcx: TyCtxt<'a, 'gcx, 'tcx>) -> Ty<'tcx> {
212+
pub fn ty<'a, 'gcx, D>(&self, local_decls: &D, tcx: TyCtxt<'a, 'gcx, 'tcx>) -> Ty<'tcx>
213+
where D: HasLocalDecls<'tcx>
214+
{
210215
match self {
211216
&Operand::Consume(ref l) => l.ty(local_decls, tcx).to_ty(tcx),
212217
&Operand::Constant(ref c) => c.ty,

0 commit comments

Comments
 (0)