From 4a9ef9e23cbb73ac7f0d4410f0198bbd583701f5 Mon Sep 17 00:00:00 2001 From: Alan Wu Date: Wed, 29 May 2024 14:13:15 -0400 Subject: [PATCH] YJIT: Fix a warning from nightly rust No plan about migrating to the 2024 edition yet (it's not even available yet), but this is a simple enough suggestion so we can just take it. ``` warning: this method call resolves to `<&Box<[T]> as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to ` as IntoIterator>::into_iter` in Rust 2024 --> ../yjit/src/core.rs:1003:49 | 1003 | formatter.debug_list().entries(branches.into_iter()).finish() | ^^^^^^^^^ | = warning: this changes meaning in Rust 2024 = note: `#[warn(boxed_slice_into_iter)]` on by default help: use `.iter()` instead of `.into_iter()` to avoid ambiguity | 1003 | formatter.debug_list().entries(branches.iter()).finish() | ~~~~ help: or use `IntoIterator::into_iter(..)` instead of `.into_iter()` to explicitly iterate by value | 1003 | formatter.debug_list().entries(IntoIterator::into_iter(branches)).finish() | ++++++++++++++++++++++++ ~ ``` --- yjit/src/core.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yjit/src/core.rs b/yjit/src/core.rs index cd6e649aa0..7c8532a0c3 100644 --- a/yjit/src/core.rs +++ b/yjit/src/core.rs @@ -1000,7 +1000,7 @@ impl fmt::Debug for MutableBranchList { // SAFETY: the derived Clone for boxed slices does not mutate this Cell let branches = unsafe { self.0.ref_unchecked().clone() }; - formatter.debug_list().entries(branches.into_iter()).finish() + formatter.debug_list().entries(branches.iter()).finish() } }