Skip to content

Commit 04d40b2

Browse files
committed
Rust: Update expected files
1 parent ab84f96 commit 04d40b2

4 files changed

Lines changed: 171 additions & 162 deletions

File tree

rust/extractor/src/main.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ const DEFAULT_RUST_TOOLCHAIN: &str = "1.97.0";
4646
///
4747
/// Examples of what the stdout might look like when the command is successful:
4848
/// - `nightly-aarch64-apple-darwin (overridden by '/path/to/project/rust-toolchain.toml')`
49+
/// - `nightly-2026-09-01-aarch64-apple-darwin (overridden by '/path/to/project/rust-toolchain.toml')`
4950
/// - `stable-aarch64-apple-darwin (default)`
5051
/// - `1.80.1-aarch64-apple-darwin (overridden by '/path/to/project/rust-toolchain.toml')`
5152
fn project_toolchain(dir: impl AsRef<Path>) -> io::Result<process::Output> {
@@ -56,13 +57,13 @@ fn project_toolchain(dir: impl AsRef<Path>) -> io::Result<process::Output> {
5657
}
5758

5859
fn select_toolchain() -> String {
59-
project_toolchain(".")
60+
let nightly = project_toolchain(".")
6061
.ok()
6162
.filter(|output| output.status.success())
6263
.and_then(|output| String::from_utf8(output.stdout).ok())
6364
.and_then(|toolchain| toolchain.split_whitespace().next().map(str::to_owned))
64-
.filter(|toolchain| toolchain.starts_with("nightly"))
65-
.unwrap_or_else(|| DEFAULT_RUST_TOOLCHAIN.to_owned())
65+
.filter(|toolchain| toolchain.starts_with("nightly"));
66+
nightly.unwrap_or_else(|| DEFAULT_RUST_TOOLCHAIN.to_owned())
6667
}
6768

6869
struct Extractor<'a> {

rust/ql/test/extractor-tests/crate_graph/crates.expected

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,12 @@
5757
#-----| core -> Crate(core@0.0.0)
5858
#-----| std -> Crate(std@0.0.0)
5959

60-
#-----| Crate(hashbrown@0.16.1)
60+
#-----| Crate(hashbrown@0.17.1)
6161
#-----| alloc -> Crate(alloc@0.0.0)
6262
#-----| core -> Crate(core@0.0.0)
6363
#-----| foldhash -> Crate(foldhash@0.2.0)
6464

65-
#-----| Crate(libc@0.2.178)
65+
#-----| Crate(libc@0.2.185)
6666
#-----| rustc_std_workspace_core -> Crate(core@0.0.0)
6767

6868
main.rs:
@@ -98,7 +98,7 @@ main.rs:
9898
#-----| Crate(panic_unwind@0.0.0)
9999
#-----| alloc -> Crate(alloc@0.0.0)
100100
#-----| core -> Crate(core@0.0.0)
101-
#-----| libc -> Crate(libc@0.2.178)
101+
#-----| libc -> Crate(libc@0.2.185)
102102
#-----| unwind -> Crate(unwind@0.0.0)
103103

104104
#-----| Crate(proc_macro@0.0.0)
@@ -123,27 +123,27 @@ main.rs:
123123
#-----| Crate(std@0.0.0)
124124
#-----| alloc -> Crate(alloc@0.0.0)
125125
#-----| core -> Crate(core@0.0.0)
126-
#-----| cfg_if -> Crate(cfg_if@1.0.4)
127-
#-----| hashbrown -> Crate(hashbrown@0.16.1)
128-
#-----| libc -> Crate(libc@0.2.178)
129-
#-----| rand -> Crate(rand@0.9.2)
130-
#-----| rand_xorshift -> Crate(rand_xorshift@0.4.0)
131-
#-----| rustc_demangle -> Crate(rustc_demangle@0.1.27)
132126
#-----| panic_abort -> Crate(panic_abort@0.0.0)
127+
#-----| libc -> Crate(libc@0.2.185)
133128
#-----| unwind -> Crate(unwind@0.0.0)
134129
#-----| panic_unwind -> Crate(panic_unwind@0.0.0)
135130
#-----| std_detect -> Crate(std_detect@0.1.5)
131+
#-----| cfg_if -> Crate(cfg_if@1.0.4)
132+
#-----| hashbrown -> Crate(hashbrown@0.17.1)
133+
#-----| rand -> Crate(rand@0.9.2)
134+
#-----| rand_xorshift -> Crate(rand_xorshift@0.4.0)
135+
#-----| rustc_demangle -> Crate(rustc_demangle@0.1.27)
136136

137137
#-----| Crate(std_detect@0.1.5)
138138
#-----| alloc -> Crate(alloc@0.0.0)
139139
#-----| core -> Crate(core@0.0.0)
140-
#-----| libc -> Crate(libc@0.2.178)
140+
#-----| libc -> Crate(libc@0.2.185)
141141

142142
#-----| Crate(test@0.0.0)
143143
#-----| core -> Crate(core@0.0.0)
144144
#-----| std -> Crate(std@0.0.0)
145+
#-----| libc -> Crate(libc@0.2.185)
145146
#-----| getopts -> Crate(getopts@0.2.24)
146-
#-----| libc -> Crate(libc@0.2.178)
147147

148148
lib.rs:
149149
# 0| Crate(test@0.0.1)
@@ -164,7 +164,7 @@ lib.rs:
164164

165165
#-----| Crate(unwind@0.0.0)
166166
#-----| core -> Crate(core@0.0.0)
167-
#-----| libc -> Crate(libc@0.2.178)
167+
#-----| libc -> Crate(libc@0.2.185)
168168

169169
#-----| Crate(version_check@0.9.5)
170170
#-----| proc_macro -> Crate(proc_macro@0.0.0)

0 commit comments

Comments
 (0)