Skip to content

Commit 900e5dd

Browse files
committed
Rust: Update the extraction toolchains to current stable and nightly
Use Rust 1.100.0 for stable projects and nightly-2026-11-16 as the minimum nightly, keeping setup scripts and date-boundary tests in sync. The newer compiler removed box_patterns. Preserve those cases under the existing invalid fixture directory, leaving compilation checks enabled for valid fixtures, and regenerate type-inference expectations. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7f912f98-5361-47d2-b1f3-46af0843e5e0
1 parent 1c27776 commit 900e5dd

7 files changed

Lines changed: 839 additions & 867 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[toolchain]
2-
channel = "nightly-2026-07-15"
2+
channel = "nightly-2026-11-16"
33
components = [ "rust-src" ]

‎rust/extractor/src/toolchain.rs‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ use tracing::{info, warn};
2424
/// toolchain release that precedes our version of rust-analyzer.
2525
///
2626
/// When rust-analyzer is updated this version should be updated accordingly.
27-
const FIXED_RUST_TOOLCHAIN: &str = "1.99.0";
27+
const FIXED_RUST_TOOLCHAIN: &str = "1.100.0";
2828

2929
/// The date of the oldest nightly toolchain known to work with our version of
3030
/// rust-analyzer.
3131
///
3232
/// When rust-analyzer is updated this version may need to be updated.
33-
const MINIMUM_NIGHTLY_DATE: NaiveDate = NaiveDate::from_ymd_opt(2026, 7, 15).unwrap();
33+
const MINIMUM_NIGHTLY_DATE: NaiveDate = NaiveDate::from_ymd_opt(2026, 11, 16).unwrap();
3434

3535
/// The command output of asking `rustup` which toolchain is used by the Rust
3636
/// project in the current working directory. This main looks at
@@ -129,16 +129,16 @@ mod tests {
129129
#[test]
130130
fn preserves_minimum_dated_nightly_toolchain() {
131131
assert_eq!(
132-
select_toolchain_from_project_toolchain("nightly-2026-07-15-aarch64-apple-darwin"),
133-
"nightly-2026-07-15-aarch64-apple-darwin"
132+
select_toolchain_from_project_toolchain("nightly-2026-11-16-aarch64-apple-darwin"),
133+
"nightly-2026-11-16-aarch64-apple-darwin"
134134
);
135135
}
136136

137137
#[test]
138138
fn preserves_newer_dated_nightly_toolchain() {
139139
assert_eq!(
140-
select_toolchain_from_project_toolchain("nightly-2026-09-01-aarch64-apple-darwin"),
141-
"nightly-2026-09-01-aarch64-apple-darwin"
140+
select_toolchain_from_project_toolchain("nightly-2026-11-17-aarch64-apple-darwin"),
141+
"nightly-2026-11-17-aarch64-apple-darwin"
142142
);
143143
}
144144

‎rust/ql/integration-tests/conftest.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def pytest_configure(config):
1111
# match `FIXED_RUST_TOOLCHAIN`.
1212
if not hasattr(config, "workerinput"):
1313
commands.run(
14-
"rustup toolchain install 1.99.0 --profile minimal --component rust-src"
14+
"rustup toolchain install 1.100.0 --profile minimal --component rust-src"
1515
)
1616

1717

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#![feature(box_patterns)]
2+
3+
// Box patterns were removed in Rust 1.100.
4+
pub mod pattern_matching_experimental {
5+
pub fn box_patterns() {
6+
let boxed_value = Box::new(100i32); // $ target=new
7+
8+
match boxed_value {
9+
box 100 => {
10+
println!("Boxed 100");
11+
}
12+
box x => {
13+
let unboxed = x; // $ MISSING: type=unboxed:i32
14+
println!("Boxed value: {}", unboxed);
15+
}
16+
}
17+
18+
// Nested box pattern
19+
let nested_box = Box::new(Box::new(42i32)); // $ target=new
20+
match nested_box {
21+
box box x => {
22+
let nested_unboxed = x; // $ MISSING: type=nested_unboxed:i32
23+
println!("Nested boxed: {}", nested_unboxed);
24+
}
25+
}
26+
}
27+
}
28+
29+
fn main() {
30+
pattern_matching_experimental::box_patterns(); // $ target=box_patterns
31+
}

‎rust/ql/test/library-tests/type-inference/main.rs‎

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![feature(box_patterns)]
1+
// Tests for removed Rust features are kept in invalid/.
22
mod field_access {
33
#[derive(Debug)]
44
struct S;
@@ -2488,31 +2488,6 @@ mod tuples {
24882488
}
24892489

24902490
pub mod pattern_matching;
2491-
pub mod pattern_matching_experimental {
2492-
pub fn box_patterns() {
2493-
let boxed_value = Box::new(100i32); // $ target=new
2494-
2495-
// BoxPat - Box patterns (requires feature flag)
2496-
match boxed_value {
2497-
box 100 => {
2498-
println!("Boxed 100");
2499-
}
2500-
box x => {
2501-
let unboxed = x; // $ MISSING: type=unboxed:i32
2502-
println!("Boxed value: {}", unboxed);
2503-
}
2504-
}
2505-
2506-
// Nested box pattern
2507-
let nested_box = Box::new(Box::new(42i32)); // $ target=new
2508-
match nested_box {
2509-
box box x => {
2510-
let nested_unboxed = x; // $ MISSING: type=nested_unboxed:i32
2511-
println!("Nested boxed: {}", nested_unboxed);
2512-
}
2513-
}
2514-
}
2515-
}
25162491

25172492
pub mod path_buf {
25182493
// a highly simplified model of `PathBuf::canonicalize`
@@ -2884,7 +2859,6 @@ fn main() {
28842859
associated_types::test(); // $ target=test
28852860
dereference::test(); // $ target=test
28862861
pattern_matching::test_all_patterns(); // $ target=test_all_patterns
2887-
pattern_matching_experimental::box_patterns(); // $ target=box_patterns
28882862
dyn_type::test(); // $ target=test
28892863
if_expr::f(true); // $ target=f
28902864
local_function::f(); // $ target=f

0 commit comments

Comments
 (0)