Skip to content

Commit 46f48e9

Browse files
authored
rust-toolchain.toml: Upgrade to nightly-2024-04-01 (#943)
`rust-analyzer` has been showing me a ton of warnings lately, things like `non_camel_case_types`, which we allow for `rustc`, and which I realized is due to the `rust-analyzer` version being new, and our `rustc` toolchain being old. Upgrading it to the latest nightly fixes this. These warnings are especially annoying as they slow down my edit and compile cycle, and we are due for an upgrade anyways, though hopefully we can go to `stable` next (once #620 is merged, though it hasn't been enough of a priority). We can also replace the `target_arch = "arm"`-dependent `#![feature(stdsimd)]` with the much more specific and more likely to stabilize soon `#![feature(stdarch_arm_feature_detection)]`. * Fixes #623.
2 parents de991f5 + fa6df4f commit 46f48e9

File tree

4 files changed

+7
-9
lines changed

4 files changed

+7
-9
lines changed

include/common/bitdepth.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ pub trait BitDepth: Clone + Copy {
239239
Self::Pixel::mut_slice_from(bytes).unwrap()
240240
}
241241

242-
fn cast_coef_slice(bytes: &[u8]) -> &[Self::Coef] {
242+
fn _cast_coef_slice(bytes: &[u8]) -> &[Self::Coef] {
243243
Self::Coef::slice_from(bytes).unwrap()
244244
}
245245

@@ -261,7 +261,7 @@ pub trait BitDepth: Clone + Copy {
261261
T::T<BitDepth8>: Copy,
262262
T::T<BitDepth16>: Copy;
263263

264-
unsafe fn select_into<T>(bd: BitDepthUnion<T>) -> T::T<Self>
264+
unsafe fn _select_into<T>(bd: BitDepthUnion<T>) -> T::T<Self>
265265
where
266266
T: BitDepthDependentType,
267267
T::T<BitDepth8>: Copy,
@@ -337,7 +337,7 @@ impl BitDepth for BitDepth8 {
337337
&mut bd.bpc8
338338
}
339339

340-
unsafe fn select_into<T>(bd: BitDepthUnion<T>) -> T::T<Self>
340+
unsafe fn _select_into<T>(bd: BitDepthUnion<T>) -> T::T<Self>
341341
where
342342
T: BitDepthDependentType,
343343
T::T<BitDepth8>: Copy,
@@ -418,7 +418,7 @@ impl BitDepth for BitDepth16 {
418418
&mut bd.bpc16
419419
}
420420

421-
unsafe fn select_into<T>(bd: BitDepthUnion<T>) -> T::T<Self>
421+
unsafe fn _select_into<T>(bd: BitDepthUnion<T>) -> T::T<Self>
422422
where
423423
T: BitDepthDependentType,
424424
T::T<BitDepth8>: Copy,

lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#![allow(non_snake_case)]
33
#![allow(non_upper_case_globals)]
44
#![feature(c_variadic)]
5-
#![cfg_attr(target_arch = "arm", feature(stdsimd))]
5+
#![cfg_attr(target_arch = "arm", feature(stdarch_arm_feature_detection))]
66
#![allow(clippy::all)]
77

88
#[cfg(not(any(feature = "bitdepth_8", feature = "bitdepth_16")))]

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[toolchain]
2-
channel = "nightly-2023-11-16"
2+
channel = "nightly-2024-04-01"
33
targets = [
44
"x86_64-unknown-linux-gnu",
55
"i686-unknown-linux-gnu",

src/log.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
use std::ffi::c_char;
22
use std::ffi::c_uint;
33
use std::ffi::c_void;
4-
use std::ffi::CStr;
54
use std::fmt;
65
use std::fmt::Write as _;
76
use std::io::stderr;
@@ -47,8 +46,7 @@ impl fmt::Write for Dav1dLogger {
4746
// so it's easiest just to print one byte at a time.
4847
// This may be slow, but logging can be disabled if it's slow,
4948
// or the Rust API can be used instead.
50-
// TODO(kkysen) Replace with `c"%c"` once its stabilization reaches stable.
51-
let fmt = CStr::from_bytes_with_nul(b"%c\0").unwrap();
49+
let fmt = c"%c";
5250
for &byte in s.as_bytes() {
5351
// # Safety
5452
//

0 commit comments

Comments
 (0)