Skip to content

Commit 5e2537c

Browse files
committed
Use patched Cargo
1 parent 31644e3 commit 5e2537c

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,24 @@ jobs:
116116
- name: Preinstall toolchains
117117
run: cargo run -p dylint_internal --bin preinstall-toolchains
118118

119+
- name: Use Cargo with rust-lang/cargo#15698
120+
run: |
121+
ls /home/runner/.rustup/toolchains/nightly-2025-05-14-x86_64-unknown-linux-gnu/bin || true
122+
CARGO_OLD="$(rustup +nightly-2025-05-14 which cargo)"
123+
BIN=cargo
124+
if [[ '${{ runner.os }}' = 'Windows' ]]; then
125+
BIN="$BIN".exe
126+
fi
127+
cd ..
128+
git clone https://github.com/rust-lang/cargo
129+
cd cargo
130+
git checkout 409fed7dc1553d49cb9a8c0637d12d65571346ce
131+
cargo build --release
132+
CARGO_NEW="$PWD"/target/release/"$BIN"
133+
cd "$(dirname "$CARGO_OLD")"
134+
rm -f "$BIN"
135+
ln -s "$CARGO_NEW" "$BIN"
136+
119137
- name: Test
120138
run: |
121139
if [[ '${{ matrix.package }}' =~ ^cargo-dylint ]]; then

0 commit comments

Comments
 (0)