File tree Expand file tree Collapse file tree 4 files changed +13
-11
lines changed Expand file tree Collapse file tree 4 files changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,10 @@ codeql_rust_binary(
7
7
name = "extractor" ,
8
8
srcs = glob (["src/**/*.rs" ]),
9
9
aliases = aliases (),
10
- compile_data = ["src/qltest_cargo.mustache" ],
10
+ compile_data = [
11
+ "src/qltest_cargo.mustache" ,
12
+ "src/nightly-toolchain/rust-toolchain.toml" ,
13
+ ],
11
14
proc_macro_deps = all_crate_deps (
12
15
proc_macro = True ,
13
16
) + [
Original file line number Diff line number Diff line change
1
+ [toolchain ]
2
+ channel = " nightly-2025-06-01"
3
+ components = [ " rust-src" ]
Original file line number Diff line number Diff line change @@ -9,7 +9,6 @@ use std::process::Command;
9
9
use tracing:: info;
10
10
11
11
const EDITION : & str = "2021" ;
12
- const NIGHTLY : & str = "nightly-2025-06-01" ;
13
12
14
13
fn dump_lib ( ) -> anyhow:: Result < ( ) > {
15
14
let path_iterator = glob ( "*.rs" ) . context ( "globbing test sources" ) ?;
@@ -76,7 +75,7 @@ fn dump_cargo_manifest(dependencies: &[String]) -> anyhow::Result<()> {
76
75
fn dump_nightly_toolchain ( ) -> anyhow:: Result < ( ) > {
77
76
fs:: write (
78
77
"rust-toolchain.toml" ,
79
- format ! ( "[ toolchain] \n channel = \" {NIGHTLY} \" \n " ) ,
78
+ include_str ! ( "nightly- toolchain/rust-toolchain.toml " ) ,
80
79
)
81
80
. context ( "writing rust-toolchain.toml" ) ?;
82
81
Ok ( ( ) )
Original file line number Diff line number Diff line change @@ -5,14 +5,11 @@ set -euo pipefail
5
5
# This script is run by the CI to set up the test environment for the Rust QL tests
6
6
# We run this as rustup is not meant to be run in parallel, and will this setup will be run by rust-analyzer in the
7
7
# parallel QL tests unless we do the setup prior to launching the tests.
8
- # We do this for each `rust-toolchain.toml` we use in the tests (and the root one in `rust` last, so it becomes the
9
- # default).
10
8
9
+ # no need to install rust-src explicitly, it's listed in both toolchains
11
10
cd " $( dirname " $0 " ) "
12
-
13
- find . -name rust-toolchain.toml \
14
- -execdir rustup install \; \
15
- -execdir rustup component add rust-src \;
16
-
17
- # no to install rust-src explicitly, it's listed in ql/rust/rust-toolchain.toml
11
+ pushd ../../extractor/src/nightly-toolchain
12
+ rustup install
13
+ popd
14
+ # this needs to be last to set the default toolchain
18
15
rustup install
You can’t perform that action at this time.
0 commit comments