Move ZST constant to the top of the impl block
This commit is contained in:
parent
cb1cf6ae95
commit
e67c768110
1 changed files with 2 additions and 2 deletions
|
@ -162,6 +162,8 @@ impl Scalar<()> {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'tcx, Tag> Scalar<Tag> {
|
impl<'tcx, Tag> Scalar<Tag> {
|
||||||
|
pub const ZST: Self = Scalar::Int(ScalarInt::ZST);
|
||||||
|
|
||||||
/// Erase the tag from the scalar, if any.
|
/// Erase the tag from the scalar, if any.
|
||||||
///
|
///
|
||||||
/// Used by error reporting code to avoid having the error type depend on `Tag`.
|
/// Used by error reporting code to avoid having the error type depend on `Tag`.
|
||||||
|
@ -178,8 +180,6 @@ impl<'tcx, Tag> Scalar<Tag> {
|
||||||
Scalar::Int(ScalarInt::null(cx.data_layout().pointer_size))
|
Scalar::Int(ScalarInt::null(cx.data_layout().pointer_size))
|
||||||
}
|
}
|
||||||
|
|
||||||
pub const ZST: Self = Scalar::Int(ScalarInt::ZST);
|
|
||||||
|
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
fn ptr_op(
|
fn ptr_op(
|
||||||
self,
|
self,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue