Skip to content

Commit eb68d01

Browse files
Fix tests for rust 1.79 (#621)
- Fix the accuracy test for `collapse_debuginfo` - Fix a couple of `unexpected_cfgs` warnings about Cargo features - Silence the rest, ain't nobody got time for all that shit - Use `rustup update --no-self-update` consistently to avoid spurious CI errors
2 parents 4c7c1de + 74d8f94 commit eb68d01

File tree

4 files changed

+20
-4
lines changed

4 files changed

+20
-4
lines changed

.github/workflows/main.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@ jobs:
5555
shell: bash
5656
if: contains(matrix.rust, 'i686')
5757

58+
- name: Enable collapse_debuginfo based on version
59+
run: echo RUSTFLAGS="--cfg dbginfo=\"collapsible\" $RUSTFLAGS" >> $GITHUB_ENV
60+
shell: bash
61+
if: contains(matrix.rust, 'nightly') || contains(matrix.rust, 'beta')
62+
5863
- run: cargo build
5964
- run: cargo test
6065
- run: cargo test --features "serialize-serde"
@@ -194,7 +199,7 @@ jobs:
194199
with:
195200
submodules: true
196201
- name: Install Rust
197-
run: rustup update stable && rustup default stable
202+
run: rustup update stable --no-self-update && rustup default stable
198203
- run: rustup target add ${{ matrix.target }}
199204
- run: cargo generate-lockfile
200205
- run: echo RUSTFLAGS=-Dwarnings >> $GITHUB_ENV
@@ -209,7 +214,7 @@ jobs:
209214
with:
210215
submodules: true
211216
- name: Install Rust
212-
run: rustup update stable && rustup default stable && rustup component add rustfmt
217+
run: rustup update stable --no-self-update && rustup default stable && rustup component add rustfmt
213218
- run: cargo fmt --all -- --check
214219

215220
build:
@@ -228,7 +233,7 @@ jobs:
228233
with:
229234
submodules: true
230235
- name: Install Rust
231-
run: rustup update nightly && rustup default nightly
236+
run: rustup update nightly --no-self-update && rustup default nightly
232237
- run: rustup target add ${{ matrix.target }}
233238
- run: echo RUSTFLAGS=-Dwarnings >> $GITHUB_ENV
234239
shell: bash
@@ -249,7 +254,7 @@ jobs:
249254
with:
250255
submodules: true
251256
- name: Install Rust
252-
run: rustup update 1.65.0 && rustup default 1.65.0
257+
run: rustup update 1.65.0 --no-self-update && rustup default 1.65.0
253258
- run: cargo build
254259

255260
miri:

Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ serialize-serde = ["serde"]
7777
# purposes. New code should use none of these features.
7878
coresymbolication = []
7979
dbghelp = []
80+
dl_iterate_phdr = []
8081
dladdr = []
8182
gimli-symbolize = []
8283
kernel32 = []
@@ -131,3 +132,7 @@ harness = false
131132
name = "current-exe-mismatch"
132133
required-features = ["std"]
133134
harness = false
135+
136+
[lints.rust]
137+
# This crate uses them pervasively
138+
unexpected_cfgs = "allow"

crates/as-if-std/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,7 @@ cc = "1.0.90"
3333
[features]
3434
default = ['backtrace']
3535
backtrace = ['addr2line', 'miniz_oxide', 'object']
36+
std = []
37+
38+
[lints.rust]
39+
unexpected_cfgs = "allow"

tests/accuracy/main.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![cfg(dbginfo = "collapsible")]
12
mod auxiliary;
23

34
macro_rules! pos {
@@ -6,6 +7,7 @@ macro_rules! pos {
67
};
78
}
89

10+
#[collapse_debuginfo(yes)]
911
macro_rules! check {
1012
($($pos:expr),*) => ({
1113
verify(&[$($pos,)* pos!()]);

0 commit comments

Comments
 (0)