mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
Move ZST constant to the top of the impl block
This commit is contained in:
@@ -162,6 +162,8 @@ pub fn with_tag<Tag>(self, new_tag: Tag) -> Scalar<Tag> {
|
||||
}
|
||||
|
||||
impl<'tcx, Tag> Scalar<Tag> {
|
||||
pub const ZST: Self = Scalar::Int(ScalarInt::ZST);
|
||||
|
||||
/// Erase the tag from the scalar, if any.
|
||||
///
|
||||
/// Used by error reporting code to avoid having the error type depend on `Tag`.
|
||||
@@ -178,8 +180,6 @@ pub fn null_ptr(cx: &impl HasDataLayout) -> Self {
|
||||
Scalar::Int(ScalarInt::null(cx.data_layout().pointer_size))
|
||||
}
|
||||
|
||||
pub const ZST: Self = Scalar::Int(ScalarInt::ZST);
|
||||
|
||||
#[inline(always)]
|
||||
fn ptr_op(
|
||||
self,
|
||||
|
||||
Reference in New Issue
Block a user