View | Details | Raw Unified | Return to bug 278938 | Differences between
and this patch

Collapse All | Expand All

(-)b/games/veloren-weekly/files/patch-rust-1.78.0 (+20 lines)
Added Link Here
1
invalid_mut was renamed to without_provenance_mut
2
in https://github.com/rust-lang/rust/commit/b58f647d5488dce73bba517907c44af2c2a618c4
3
4
error[E0425]: cannot find function `invalid_mut` in module `core::ptr`
5
   --> /wrkdirs/usr/ports/games/veloren-weekly/work/shred-5d52c6fc390dd04c12158633e77591f6523d1f85/src/meta.rs:402:38
6
    |
7
402 |         let invalid_ptr = core::ptr::invalid_mut::<R>((self as *mut Self).addr());
8
    |                                      ^^^^^^^^^^^ not found in `core::ptr`
9
10
--- ../shred-5d52c6fc390dd04c12158633e77591f6523d1f85/src/meta.rs.orig	2024-05-07 13:31:09.835758000 +0200
11
+++ ../shred-5d52c6fc390dd04c12158633e77591f6523d1f85/src/meta.rs	2024-05-07 13:31:24.927663000 +0200
12
@@ -399,7 +399,7 @@ impl<T: ?Sized> MetaTable<T> {
13
     {
14
         let ty_id = TypeId::of::<R>();
15
         // use self.addr() for unpredictable address to use for checking consistency below
16
-        let invalid_ptr = core::ptr::invalid_mut::<R>((self as *mut Self).addr());
17
+        let invalid_ptr = core::ptr::without_provenance_mut::<R>((self as *mut Self).addr());
18
         let trait_ptr = <T as CastFrom<R>>::cast(invalid_ptr);
19
         // assert that address not changed (to catch some mistakes in CastFrom impl)
20
         assert_eq!(
(-)b/games/veloren-weekly/files/patch-rust-1.78.0-disable-simd (-1 / +16 lines)
Added Link Here
0
- 
1
packed_simd doesn't compile with rust 1.78.0
2
Part of the issue is fixed with https://github.com/yoanlcq/vek/pull/95/files
3
but it's not enough, packed_simd2 is used here:
4
https://gitlab.com/veloren/veloren/-/blob/master/world/src/sim/erosion.rs?ref_type=heads#L16
5
6
--- world/Cargo.toml.orig	2024-05-10 18:54:20.494825000 +0200
7
+++ world/Cargo.toml	2024-05-10 18:54:43.257129000 +0200
8
@@ -11,7 +11,7 @@ cli = ["clap", "signal-hook", "indicatif"]
9
 bin_compression = ["lz-fear", "deflate", "flate2", "image/jpeg", "num-traits", "fallible-iterator", "rstar", "cli"]
10
 cli = ["clap", "signal-hook", "indicatif"]
11
 
12
-default = ["simd"]
13
+#default = ["simd"]
14
 
15
 [dependencies]
16
 common = { package = "veloren-common", path = "../common" }

Return to bug 278938