Skip to content

Commit

Permalink
Update toolchain to 1.79 stable (#1309)
Browse files Browse the repository at this point in the history
  • Loading branch information
rinon authored Jul 12, 2024
2 parents 5c1a5c7 + 3d4223a commit 02c90c6
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-benchmark-x86.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: release build main branch
run: |
git fetch --depth 1 origin main && git checkout origin/main
nice cargo build --release --target-dir target.main
nice cargo +stable build --release --target-dir target.main
- name: benchmark on chimera 8-bit test data
run: |
mkdir -p `dirname $LOCAL_FILE`
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-and-test-aarch64-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ jobs:
key: aarch64-android-cargo-and-target-${{ hashFiles('**/Cargo.lock') }}
- name: cargo build for aarch64-linux-android
run: |
rustup target add aarch64-linux-android
cargo build --target aarch64-linux-android --release
rustup target add --toolchain stable aarch64-linux-android
cargo +stable build --target aarch64-linux-android --release
env:
AR: llvm-ar
CC: aarch64-linux-android26-clang
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test-aarch64-darwin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
target/
key: arm-darwin-cargo-and-target-${{ hashFiles('**/Cargo.lock') }}
- name: cargo ${{ matrix.build.name }} build for aarch64-apple-darwin
run: cargo build ${{ matrix.build.cargo_flags }}
run: cargo +stable build ${{ matrix.build.cargo_flags }}
- name: test ${{ matrix.build.name }} build without frame delay
run: |
.github/workflows/test.sh \
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-and-test-x86-extra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ jobs:
argon_coveragetool_av1_base_and_extended_profiles_v2.1.1.zip
- name: cargo build for ${{ matrix.target }} ${{ matrix.build.name }}
run: |
rustup target add ${{ matrix.target }}
cargo build --target ${{ matrix.target }} ${{ matrix.build.flags }}
rustup target add --toolchain stable ${{ matrix.target }}
cargo +stable build --target ${{ matrix.target }} ${{ matrix.build.flags }}
env:
RUSTFLAGS: "-C overflow-checks=on"
- name: download, check, and unpack argon test vectors
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build-and-test-x86.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ jobs:
- name: cargo build for ${{ matrix.target }} ${{ matrix.build.name }}
run: |
cargo clean
rustup target add ${{ matrix.target }}
cargo build --target ${{ matrix.target }} ${{ matrix.build.flags }}
rustup target add --toolchain stable ${{ matrix.target }}
cargo +stable build --target ${{ matrix.target }} ${{ matrix.build.flags }}
- name: meson test for ${{ matrix.target }} ${{ matrix.build.name }}
run: |
.github/workflows/test.sh \
Expand Down Expand Up @@ -110,7 +110,7 @@ jobs:
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: cargo build for x86_64-apple-darwin
run: |
cargo build --release
cargo +stable build --release
- name: meson test for x86_64-apple-darwin
run: |
.github/workflows/test.sh \
Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ authors = ["C2Rust"]
version = "0.2.0"
publish = false
edition = "2021"
rust-version = "1.79"

[lib]
path = "lib.rs"
Expand Down
2 changes: 2 additions & 0 deletions src/in_range.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,13 @@ macro_rules! impl_const_new {
}

impl<const MIN: u128, const MAX: u128> InRange<$T, MIN, MAX> {
#[allow(unused)]
pub const fn const_new(value: $T) -> Self {
assert!(value as u128 >= MIN && value as u128 <= MAX);
Self(value)
}

#[allow(unused)]
pub const fn new_array<const N: usize>(a: [$T; N]) -> [Self; N] {
let mut b = [DefaultValue::DEFAULT; N];
const_for!(i in 0..N => {
Expand Down
1 change: 1 addition & 0 deletions src/internal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -941,6 +941,7 @@ pub const CF_LEN: usize = 32 * 32;
pub struct Cf([i32; CF_LEN]);

impl Cf {
#[allow(unused)]
pub fn select<BD: BitDepth>(&self) -> &[BD::Coef; CF_LEN] {
FromBytes::ref_from_prefix(AsBytes::as_bytes(&self.0)).unwrap()
}
Expand Down
2 changes: 1 addition & 1 deletion src/levels.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ pub enum TxfmSize {

impl TxfmSize {
pub const NUM_SQUARE: usize = Self::S64x64 as usize + 1;
pub const NUM_RECT: usize = Self::COUNT;
pub const _NUM_RECT: usize = Self::COUNT;
}

impl DefaultValue for TxfmSize {
Expand Down

0 comments on commit 02c90c6

Please sign in to comment.