Refactor tcx mk_const parameters.
This commit is contained in:
@@ -805,7 +805,7 @@ impl<'tcx> TypeSuperFoldable<'tcx> for ty::Const<'tcx> {
|
||||
let ty = self.ty().try_fold_with(folder)?;
|
||||
let kind = self.kind().try_fold_with(folder)?;
|
||||
if ty != self.ty() || kind != self.kind() {
|
||||
Ok(folder.tcx().mk_const(ty::ConstS { ty, kind }))
|
||||
Ok(folder.tcx().mk_const(kind, ty))
|
||||
} else {
|
||||
Ok(self)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user