diff options
author | Alan Wu <[email protected]> | 2024-05-29 14:13:15 -0400 |
---|---|---|
committer | Alan Wu <[email protected]> | 2024-05-29 15:58:35 -0400 |
commit | 4a9ef9e23cbb73ac7f0d4410f0198bbd583701f5 (patch) | |
tree | be7a7df22b8f079d81f5b0115c4e232a5979d0c5 /yjit/src | |
parent | a760e21bc122c67478b318b3f032d70fac1a6077 (diff) |
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 `<Box<[T]> 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()
| ++++++++++++++++++++++++ ~
```
Diffstat (limited to 'yjit/src')
-rw-r--r-- | yjit/src/core.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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() } } |