See https://github.com/thepowersgang/mrustc/archive/v0.8.0.tar.gz --- rustc-1.19.0-src-orig/src/libcore/intrinsics.rs +++ rustc-1.19.0-src/src/libcore/intrinsics.rs @@ -678,5 +678,9 @@ pub fn min_align_of_val(_: &T) -> usize; + /// Obtain the length of a slice pointer + #[cfg(rust_compiler="mrustc")] + pub fn mrustc_slice_len(pointer: *const [T]) -> usize; + /// Gets a static string slice containing the name of a type. pub fn type_name() -> &'static str; --- rustc-1.19.0-src-orig/src/libcore/slice/mod.rs +++ rustc-1.19.0-src/src/libcore/slice/mod.rs @@ -413,6 +413,8 @@ #[inline] fn len(&self) -> usize { - unsafe { - mem::transmute::<&[T], Repr>(self).len - } + #[cfg(not(rust_compiler="mrustc"))] + let rv = unsafe { mem::transmute::<&[T], Repr>(self).len }; + #[cfg(rust_compiler="mrustc")] + let rv = unsafe { ::intrinsics::mrustc_slice_len(self) }; + rv } table>
aboutsummaryrefslogtreecommitdiff
AgeCommit message (Expand)Author
2024-04-19maint: Support `make doc-pot-update' from a tarball....* build-aux/xgettext.scm: Move setting of environment variables to shell header. (main): Use SOURCE_DATE_EPOCH as fallback for timestamp. This fixes running from a tarball. * Makefile.am (EXTRA_DIST): Add it. Change-Id: Ic487587b22495868fd2a21545a13dc9e3458299c Janneke Nieuwenhuizen
2024-04-14maint: Fix header....* build-aux/xgettext.scm: Add `Guix' parts to header. Change-Id: I4fb03b8b0588f0482bcb1a095518b6751d111031 Janneke Nieuwenhuizen
2024-04-14maint: Use xgettext.scm wrapper to create .PO files reproducibly....* build-aux/xgettext.scm: New script. * po/guix/Makevars (XGETTEXT): Set it. (XGETTEXT_OPTIONS): Add --xgettext option to `real' xgettext. * po/packages/Makevars (XGETTEXT): Set it. (XGETTEXT_OPTIONS): Add --xgettext option to `real' xgettext. Change-Id: I71b6b843970090f765f46ac346b92a346560e3f0 Janneke Nieuwenhuizen