FreeBSD Bugzilla – Attachment 244658 Details for
Bug 273579
games/veloren-weekly: fails to build with rust 1.72
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
v0
veloren.patch (text/plain), 5.53 KB, created by
Mikael Urankar
on 2023-09-05 11:39:41 UTC
(
hide
)
Description:
v0
Filename:
MIME Type:
Creator:
Mikael Urankar
Created:
2023-09-05 11:39:41 UTC
Size:
5.53 KB
patch
obsolete
>diff --git a/games/veloren-weekly/files/patch-rust-1.72.0 b/games/veloren-weekly/files/patch-rust-1.72.0 >new file mode 100644 >index 000000000000..70bf89310c1a >--- /dev/null >+++ b/games/veloren-weekly/files/patch-rust-1.72.0 >@@ -0,0 +1,123 @@ >+Comply with rust-lang/rfcs#2140 >+https://github.com/rust-lang/rfcs/issues/2140 >+ >+--- common/systems/src/mount.rs.orig 2023-09-05 08:33:57.917799000 +0200 >++++ common/systems/src/mount.rs 2023-09-05 08:36:25.244098000 +0200 >+@@ -61,7 +61,7 @@ impl<'a> System<'a> for Sys { >+ .map(|c| ( >+ // Only take inputs and actions from the rider if the mount is not intelligent (TODO: expand the definition of 'intelligent'). >+ if !matches!(body, Some(Body::Humanoid(_))) { >+- let actions = c.actions.drain_filter(|action| match action { >++ let actions = c.actions.extract_if(|action| match action { >+ ControlAction::StartInput { input: i, .. } >+ | ControlAction::CancelInput(i) => matches!(i, InputKind::Jump | InputKind::Fly | InputKind::Roll), >+ _ => false >+@@ -151,7 +151,7 @@ impl<'a> System<'a> for Sys { >+ let inputs = controllers.get_mut(entity).map(|c| { >+ let actions: Vec<_> = c >+ .actions >+- .drain_filter(|action| match action { >++ .extract_if(|action| match action { >+ ControlAction::StartInput { input: i, .. } >+ | ControlAction::CancelInput(i) => { >+ matches!(i, InputKind::Jump | InputKind::Fly | InputKind::Roll) >+--- common/systems/src/lib.rs.orig 2023-09-05 08:33:14.168102000 +0200 >++++ common/systems/src/lib.rs 2023-09-05 08:33:25.834926000 +0200 >+@@ -1,4 +1,4 @@ >+-#![feature(drain_filter, let_chains)] >++#![feature(extract_if, let_chains)] >+ #![allow(clippy::option_map_unit_fn)] >+ >+ mod aura; >+--- common/src/lib.rs.orig 2023-09-05 08:27:02.430168000 +0200 >++++ common/src/lib.rs 2023-09-05 08:27:12.840524000 +0200 >+@@ -14,7 +14,7 @@ >+ arbitrary_self_types, >+ int_roundings >+ )] >+-#![feature(hash_drain_filter)] >++#![feature(hash_extract_if)] >+ >+ pub use common_assets as assets; >+ pub use uuid; >+--- network/protocol/src/quic.rs.orig 2023-09-05 08:30:57.788439000 +0200 >++++ network/protocol/src/quic.rs 2023-09-05 08:39:54.845952000 +0200 >+@@ -388,7 +388,7 @@ where >+ // try to order pending >+ let mut pending_violated = false; >+ let mut reliable = vec![]; >+- self.pending_reliable_buffers.drain_filter(|(_, buffer)| { >++ self.pending_reliable_buffers.extract_if(|(_, buffer)| { >+ // try to get Sid without touching buffer >+ let mut testbuffer = buffer.clone(); >+ match ITFrame::read_frame(&mut testbuffer) { >+--- network/protocol/src/lib.rs.orig 2023-09-05 08:30:10.685261000 +0200 >++++ network/protocol/src/lib.rs 2023-09-05 08:30:46.426039000 +0200 >+@@ -1,4 +1,4 @@ >+-#![feature(drain_filter)] >++#![feature(extract_if)] >+ //! Network Protocol >+ //! >+ //! a I/O-Free protocol for the veloren network crate. >+--- server/src/persistence/character_updater.rs.orig 2023-09-05 08:37:55.535451000 +0200 >++++ server/src/persistence/character_updater.rs 2023-09-05 08:38:15.126505000 +0200 >+@@ -267,7 +267,7 @@ impl CharacterUpdater { >+ } >+ >+ pub fn process_batch_completion(&mut self, completed_batch_id: u64) { >+- self.pending_database_actions.drain_filter(|_, event| { >++ self.pending_database_actions.extract_if(|_, event| { >+ matches!(event, DatabaseAction::Submitted { >+ batch_id, >+ } if completed_batch_id == *batch_id) >+--- server/src/lib.rs.orig 2023-09-05 08:37:33.129297000 +0200 >++++ server/src/lib.rs 2023-09-05 08:40:23.982003000 +0200 >+@@ -3,13 +3,13 @@ >+ #![deny(clippy::clone_on_ref_ptr)] >+ #![feature( >+ box_patterns, >+- drain_filter, >++ extract_if, >+ let_chains, >+ never_type, >+ option_zip, >+ unwrap_infallible >+ )] >+-#![feature(hash_drain_filter)] >++#![feature(hash_extract_if)] >+ >+ pub mod automod; >+ mod character_creator; >+--- voxygen/src/lib.rs.orig 2023-09-05 08:41:11.688447000 +0200 >++++ voxygen/src/lib.rs 2023-09-05 08:41:21.838058000 +0200 >+@@ -5,7 +5,7 @@ >+ #![feature( >+ array_methods, >+ array_zip, >+- drain_filter, >++ extract_if, >+ trait_alias, >+ option_get_or_insert_default, >+ map_try_insert, >+--- voxygen/src/scene/mod.rs.orig 2023-09-05 08:47:16.999196000 +0200 >++++ voxygen/src/scene/mod.rs 2023-09-05 08:47:23.905291000 +0200 >+@@ -763,7 +763,7 @@ impl Scene { >+ renderer.update_consts(&mut self.data.lights, lights); >+ >+ // Update event lights >+- self.event_lights.drain_filter(|el| { >++ self.event_lights.extract_if(|el| { >+ el.timeout -= dt; >+ el.timeout <= 0.0 >+ }); >+--- voxygen/src/scene/math.rs.orig 2023-09-05 08:46:56.195615000 +0200 >++++ voxygen/src/scene/math.rs 2023-09-05 08:47:06.240539000 +0200 >+@@ -250,7 +250,7 @@ pub fn clip_object_by_plane<T: Float + MulAdd<T, T, Ou >+ tolerance: T, >+ ) { >+ let mut intersection_points = Vec::new(); >+- polys.drain_filter(|points| { >++ polys.extract_if(|points| { >+ let len = intersection_points.len(); >+ let outside_first = clip_points_by_plane(points, plane, &mut intersection_points); >+ // Only remember intersections that are not coplanar with this side; i.e. those
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 273579
: 244658