From 9ca9f5dacc6d8afe964cc2417992769b7aa0ba24 Mon Sep 17 00:00:00 2001 From: Jubilee Young Date: Mon, 6 May 2024 12:12:27 -0700 Subject: [PATCH 1/5] Fix accuracy tests for rust 1.79 --- .github/workflows/main.yml | 5 +++++ tests/accuracy/main.rs | 2 ++ 2 files changed, 7 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b1dc816b..0a00ab57 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -55,6 +55,11 @@ jobs: shell: bash if: contains(matrix.rust, 'i686') + - name: Enable collapse_debuginfo based on version + run: echo RUSTFLAGS="--cfg dbginfo=\"collapsible\" $RUSTFLAGS" >> $GITHUB_ENV + shell: bash + if: contains(matrix.rust, 'nightly') || contains(matrix.rust, 'beta') + - run: cargo build - run: cargo test - run: cargo test --features "serialize-serde" diff --git a/tests/accuracy/main.rs b/tests/accuracy/main.rs index 568acab8..ada842d2 100644 --- a/tests/accuracy/main.rs +++ b/tests/accuracy/main.rs @@ -1,3 +1,4 @@ +#![cfg(dbginfo = "collapsible")] mod auxiliary; macro_rules! pos { @@ -6,6 +7,7 @@ macro_rules! pos { }; } +#[collapse_debuginfo(yes)] macro_rules! check { ($($pos:expr),*) => ({ verify(&[$($pos,)* pos!()]); From 3a8d3a651ad08e3ccd5742dcfcd5f5ca216d9edd Mon Sep 17 00:00:00 2001 From: Jubilee Young Date: Mon, 6 May 2024 12:31:01 -0700 Subject: [PATCH 2/5] Add dl_iterate_phdr to deprecated features It may not be actually deprecated yet but it soon will be --- Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Cargo.toml b/Cargo.toml index c8203b17..2455af7e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -77,6 +77,7 @@ serialize-serde = ["serde"] # purposes. New code should use none of these features. coresymbolication = [] dbghelp = [] +dl_iterate_phdr = [] dladdr = [] gimli-symbolize = [] kernel32 = [] From a042ce7306ebe3ad85912679e03d143a6a85cb44 Mon Sep 17 00:00:00 2001 From: Jubilee Young Date: Mon, 6 May 2024 12:34:31 -0700 Subject: [PATCH 3/5] Allow all other unexpected cfgs --- Cargo.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 2455af7e..5c34bdef 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -132,3 +132,7 @@ harness = false name = "current-exe-mismatch" required-features = ["std"] harness = false + +[lints.rust] +# This crate uses them pervasively +unexpected_cfgs = "allow" From fc5a3a60ab06a5c156337472975471bece2aff7e Mon Sep 17 00:00:00 2001 From: Jubilee Young Date: Mon, 6 May 2024 12:38:47 -0700 Subject: [PATCH 4/5] Be quiet! --- crates/as-if-std/Cargo.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/as-if-std/Cargo.toml b/crates/as-if-std/Cargo.toml index 031b6656..b451c024 100644 --- a/crates/as-if-std/Cargo.toml +++ b/crates/as-if-std/Cargo.toml @@ -33,3 +33,7 @@ cc = "1.0.90" [features] default = ['backtrace'] backtrace = ['addr2line', 'miniz_oxide', 'object'] +std = [] + +[lints.rust] +unexpected_cfgs = "allow" From 74d8f947ce0d165a9ca700e1e7e970df00db35ee Mon Sep 17 00:00:00 2001 From: Jubilee Young Date: Mon, 6 May 2024 12:55:53 -0700 Subject: [PATCH 5/5] Consistently rustup update --no-self-update --- .github/workflows/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0a00ab57..30253a74 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -199,7 +199,7 @@ jobs: with: submodules: true - name: Install Rust - run: rustup update stable && rustup default stable + run: rustup update stable --no-self-update && rustup default stable - run: rustup target add ${{ matrix.target }} - run: cargo generate-lockfile - run: echo RUSTFLAGS=-Dwarnings >> $GITHUB_ENV @@ -214,7 +214,7 @@ jobs: with: submodules: true - name: Install Rust - run: rustup update stable && rustup default stable && rustup component add rustfmt + run: rustup update stable --no-self-update && rustup default stable && rustup component add rustfmt - run: cargo fmt --all -- --check build: @@ -233,7 +233,7 @@ jobs: with: submodules: true - name: Install Rust - run: rustup update nightly && rustup default nightly + run: rustup update nightly --no-self-update && rustup default nightly - run: rustup target add ${{ matrix.target }} - run: echo RUSTFLAGS=-Dwarnings >> $GITHUB_ENV shell: bash @@ -254,7 +254,7 @@ jobs: with: submodules: true - name: Install Rust - run: rustup update 1.65.0 && rustup default 1.65.0 + run: rustup update 1.65.0 --no-self-update && rustup default 1.65.0 - run: cargo build miri: