Avoid some unnecessary return
s.
This commit is contained in:
parent
23880a058b
commit
7480b501b4
@ -228,12 +228,7 @@ fn fold_const(&mut self, ct: ty::Const<'tcx>) -> ty::Const<'tcx> {
|
||||
.probe_value(v)
|
||||
.val
|
||||
.known();
|
||||
return self.freshen_const(
|
||||
opt_ct,
|
||||
ty::InferConst::Var(v),
|
||||
ty::InferConst::Fresh,
|
||||
ct.ty(),
|
||||
);
|
||||
self.freshen_const(opt_ct, ty::InferConst::Var(v), ty::InferConst::Fresh, ct.ty())
|
||||
}
|
||||
ty::ConstKind::Infer(ty::InferConst::Fresh(i)) => {
|
||||
if i >= self.const_freshen_count {
|
||||
@ -244,7 +239,7 @@ fn fold_const(&mut self, ct: ty::Const<'tcx>) -> ty::Const<'tcx> {
|
||||
self.const_freshen_count,
|
||||
);
|
||||
}
|
||||
return ct;
|
||||
ct
|
||||
}
|
||||
|
||||
ty::ConstKind::Bound(..) | ty::ConstKind::Placeholder(_) => {
|
||||
@ -254,9 +249,7 @@ fn fold_const(&mut self, ct: ty::Const<'tcx>) -> ty::Const<'tcx> {
|
||||
ty::ConstKind::Param(_)
|
||||
| ty::ConstKind::Value(_)
|
||||
| ty::ConstKind::Unevaluated(..)
|
||||
| ty::ConstKind::Error(_) => {}
|
||||
| ty::ConstKind::Error(_) => ct.super_fold_with(self),
|
||||
}
|
||||
|
||||
ct.super_fold_with(self)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user