Avoid some unnecessary return
s.
This commit is contained in:
parent
23880a058b
commit
7480b501b4
1 changed files with 3 additions and 10 deletions
|
@ -228,12 +228,7 @@ impl<'a, 'tcx> TypeFolder<'tcx> for TypeFreshener<'a, 'tcx> {
|
||||||
.probe_value(v)
|
.probe_value(v)
|
||||||
.val
|
.val
|
||||||
.known();
|
.known();
|
||||||
return self.freshen_const(
|
self.freshen_const(opt_ct, ty::InferConst::Var(v), ty::InferConst::Fresh, ct.ty())
|
||||||
opt_ct,
|
|
||||||
ty::InferConst::Var(v),
|
|
||||||
ty::InferConst::Fresh,
|
|
||||||
ct.ty(),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
ty::ConstKind::Infer(ty::InferConst::Fresh(i)) => {
|
ty::ConstKind::Infer(ty::InferConst::Fresh(i)) => {
|
||||||
if i >= self.const_freshen_count {
|
if i >= self.const_freshen_count {
|
||||||
|
@ -244,7 +239,7 @@ impl<'a, 'tcx> TypeFolder<'tcx> for TypeFreshener<'a, 'tcx> {
|
||||||
self.const_freshen_count,
|
self.const_freshen_count,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return ct;
|
ct
|
||||||
}
|
}
|
||||||
|
|
||||||
ty::ConstKind::Bound(..) | ty::ConstKind::Placeholder(_) => {
|
ty::ConstKind::Bound(..) | ty::ConstKind::Placeholder(_) => {
|
||||||
|
@ -254,9 +249,7 @@ impl<'a, 'tcx> TypeFolder<'tcx> for TypeFreshener<'a, 'tcx> {
|
||||||
ty::ConstKind::Param(_)
|
ty::ConstKind::Param(_)
|
||||||
| ty::ConstKind::Value(_)
|
| ty::ConstKind::Value(_)
|
||||||
| ty::ConstKind::Unevaluated(..)
|
| ty::ConstKind::Unevaluated(..)
|
||||||
| ty::ConstKind::Error(_) => {}
|
| ty::ConstKind::Error(_) => ct.super_fold_with(self),
|
||||||
}
|
}
|
||||||
|
|
||||||
ct.super_fold_with(self)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue