Skip to content

Commit 90ed9c2

Browse files
committed
feat: Update to rustc nightly-2026-07-14
1 parent 8882959 commit 90ed9c2

52 files changed

Lines changed: 857 additions & 759 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Cargo.lock

Lines changed: 249 additions & 324 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cargo-mutest/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ color-print = "0.3"
2222

2323
[build-dependencies]
2424
serde = { version = "1.0", features = ["derive"] }
25-
toml = "0.9"
25+
toml = "1"

cargo-mutest/src/main.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#![feature(if_let_guard)]
21
#![feature(trim_prefix_suffix)]
32

43
use std::collections::HashSet;

mutest-driver-cli/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#![feature(decl_macro)]
2-
#![feature(if_let_guard)]
32

43
use std::path::PathBuf;
54
use std::process;

mutest-driver/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ serde_json = "1.0"
3131
serde_path_to_error = "0.1"
3232
serde-untagged = "0.1"
3333

34-
rand = "0.9"
35-
rand_seeder = "0.4"
34+
rand = "0.10"
35+
rand_seeder = "0.5"
3636

3737
[build-dependencies]
3838
cargo_metadata = "0.23"

mutest-driver/build.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ fn fetch_rlib_deps(crate_name: &str, rlib_path: &Path, deps_dir_path: &Path) ->
1515
use std::collections::{BTreeMap, BTreeSet};
1616
use std::sync::atomic::AtomicBool;
1717

18-
use rustc_errors::registry::Registry;
1918
use rustc_interface::{Config as CompilerConfig, create_and_enter_global_ctxt, passes, run_compiler};
2019
use rustc_session::config::{ExternEntry, ExternLocation, Externs, Input, Options};
2120
use rustc_session::cstore::CrateSource;
@@ -53,15 +52,13 @@ fn fetch_rlib_deps(crate_name: &str, rlib_path: &Path, deps_dir_path: &Path) ->
5352
output_file: None,
5453
ice_file: None,
5554
file_loader: None,
56-
locale_resources: Default::default(),
5755
lint_caps: Default::default(),
5856
psess_created: None,
59-
hash_untracked_state: None,
57+
track_state: None,
6058
register_lints: None,
6159
override_queries: None,
6260
extra_symbols: Default::default(),
6361
make_codegen_backend: None,
64-
registry: Registry::new(&[]),
6562
using_internal_features: {
6663
static USING_INTERNAL_FEATURES: AtomicBool = AtomicBool::new(false);
6764
&USING_INTERNAL_FEATURES
@@ -89,9 +86,9 @@ fn fetch_rlib_deps(crate_name: &str, rlib_path: &Path, deps_dir_path: &Path) ->
8986

9087
let crate_source = tcx.used_crate_source(cnum);
9188
let dep_path = match &**crate_source {
92-
CrateSource { rmeta: Some((rmeta_path, _)), .. } => rmeta_path.with_extension("rlib"),
93-
CrateSource { rlib: Some((rlib_path, _)), .. } => rlib_path.clone(),
94-
CrateSource { dylib: Some((dylib_path, _)), .. } => dylib_path.clone(),
89+
CrateSource { rmeta: Some(rmeta_path), .. } => rmeta_path.with_extension("rlib"),
90+
CrateSource { rlib: Some(rlib_path), .. } => rlib_path.clone(),
91+
CrateSource { dylib: Some(dylib_path), .. } => dylib_path.clone(),
9592
_ => { continue; }
9693
};
9794
if !dep_path.starts_with(deps_dir_path) { continue; }

mutest-driver/src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ impl MutationBatchingRandomness {
137137

138138
match self.seed {
139139
Some(seed) => StdRng::from_seed(seed),
140-
None => StdRng::from_os_rng(),
140+
None => rand::make_rng(),
141141
}
142142
}
143143
}

mutest-driver/src/inject.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ pub fn inject_runtime_crate_and_deps(config: &Config, compiler_config: &mut Comp
213213
pub fn inject_test_crate_shim_if_no_target_std(config: &Config, compiler_config: &mut CompilerConfig) {
214214
let early_dcx = EarlyDiagCtxt::new(compiler_config.opts.error_format);
215215

216-
let target = build_target_config(&early_dcx, &compiler_config.opts.target_triple, compiler_config.opts.sysroot.path());
216+
let target = build_target_config(&early_dcx, &compiler_config.opts.target_triple, compiler_config.opts.sysroot.path(), compiler_config.opts.unstable_opts.unstable_options);
217217
if target.metadata.std == Some(true) { return; }
218218

219219
let target_triple = compiler_config.opts.target_triple.tuple();

mutest-driver/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#![feature(decl_macro)]
2-
#![feature(if_let_guard)]
32
#![feature(iter_array_chunks)]
43
#![feature(iter_collect_into)]
54
#![feature(iter_intersperse)]
@@ -14,7 +13,6 @@ extern crate rustc_driver;
1413
extern crate rustc_errors;
1514
extern crate rustc_feature;
1615
extern crate rustc_graphviz;
17-
extern crate rustc_hash;
1816
extern crate rustc_interface;
1917
extern crate rustc_lint_defs;
2018
extern crate rustc_middle;

mutest-driver/src/main.rs

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
#![feature(array_windows)]
21
#![feature(decl_macro)]
3-
#![feature(if_let_guard)]
42

53
#![feature(rustc_private)]
4+
extern crate rustc_data_structures;
65
extern crate rustc_driver;
7-
extern crate rustc_hash;
86
extern crate rustc_interface;
97
extern crate rustc_session;
108
extern crate rustc_span;
@@ -21,7 +19,7 @@ use mutest_driver::passes::external_mutant::RustcInvocation;
2119
use mutest_driver_cli::{UnstableFlag, UnstableOption};
2220
use mutest_emit::analysis::hir::Safety;
2321
use mutest_emit::codegen::mutation::{OperatorRef, UnsafeTargeting};
24-
use rustc_hash::FxHashSet;
22+
use rustc_data_structures::fx::FxHashSet;
2523
use rustc_interface::Config as CompilerConfig;
2624
use rustc_session::EarlyDiagCtxt;
2725
use rustc_session::config::{CrateType, ErrorOutputType, Input};
@@ -38,8 +36,8 @@ struct RustcCallbacks {
3836
impl rustc_driver::Callbacks for RustcCallbacks {
3937
fn config(&mut self, config: &mut CompilerConfig) {
4038
let args = self.mutest_args.take();
41-
config.psess_created = Some(Box::new(move |parse_sess| {
42-
mutest_driver::passes::track_invocation_fingerprint(parse_sess, args.as_deref());
39+
config.track_state = Some(Box::new(move |sess| {
40+
mutest_driver::passes::track_invocation_fingerprint(sess, args.as_deref());
4341
}));
4442
}
4543
}
@@ -146,7 +144,7 @@ const UNSTABLE_OPTIONS: &[UnstableOption] = mutest_driver_cli::extend_const_slic
146144

147145
const BUG_REPORT_URL: &str = "https://github.com/zalanlevai/mutest-rs/issues/new";
148146

149-
pub fn main() {
147+
pub fn main() -> process::ExitCode {
150148
let early_dcx = EarlyDiagCtxt::new(ErrorOutputType::default());
151149
let mut args = rustc_driver::args::raw_args(&early_dcx);
152150

@@ -168,9 +166,9 @@ pub fn main() {
168166
args.remove(marker_arg_position);
169167
args[0] = "rustc".to_owned();
170168

171-
process::exit(rustc_driver::catch_with_exit_code(|| {
169+
return rustc_driver::catch_with_exit_code(|| {
172170
rustc_driver::run_compiler(&args, &mut DefaultCallbacks)
173-
}));
171+
});
174172
}
175173

176174
// Parser for non-rustc, mutest-specific arguments provided through MUTEST_ARGS / MUTEST_ENCODED_ARGS.
@@ -191,15 +189,15 @@ pub fn main() {
191189
// NOTE: The exit calls are actually unreachable, but it is good to have them just in case.
192190
if args.iter().any(|arg| arg == "-V" || arg == "--version") {
193191
let _ = mutest_command.get_matches_from(["--version"]);
194-
process::exit(0);
192+
return process::ExitCode::SUCCESS;
195193
}
196194
if args.iter().any(|arg| arg == "-h") {
197195
let _ = mutest_command.get_matches_from(["-h"]);
198-
process::exit(0);
196+
return process::ExitCode::SUCCESS;
199197
}
200198
if args.iter().any(|arg| arg == "--help") {
201199
let _ = mutest_command.get_matches_from(["--help"]);
202-
process::exit(0);
200+
return process::ExitCode::SUCCESS;
203201
}
204202
}
205203

@@ -229,24 +227,24 @@ pub fn main() {
229227

230228
// Fall back to a rustc invocation if mutest is not "enabled" for the given crate based on invocation.
231229
if info_query || (cargo_invocation && !primary_package) || proc_macro_target || (bin_target && !test_target) {
232-
process::exit(rustc_driver::catch_with_exit_code(|| {
230+
return rustc_driver::catch_with_exit_code(|| {
233231
rustc_driver::run_compiler(&args, &mut RustcCallbacks { mutest_args: mutest_args_str })
234-
}));
232+
});
235233
}
236234

237235
let mutest_arg_matches = mutest_command.get_matches_from(mutest_args.unwrap_or_default());
238236

239237
let unstable_flags = mutest_arg_matches.get_many::<String>("Z").into_iter().flatten().map(String::as_str).collect::<Vec<_>>();
240238
if unstable_flags.contains(&"help") {
241239
mutest_driver_cli::print_unstable_flags_help(UNSTABLE_FLAGS);
242-
process::exit(0);
240+
return process::ExitCode::SUCCESS;
243241
}
244242
mutest_driver_cli::check_unstable_flags(&unstable_flags, UNSTABLE_FLAGS);
245243
if !unstable_flags.contains(&"unstable-options") {
246244
mutest_driver_cli::check_unstable_options(&mutest_arg_matches, UNSTABLE_OPTIONS);
247245
}
248246

249-
process::exit(rustc_driver::catch_with_exit_code(|| {
247+
rustc_driver::catch_with_exit_code(|| {
250248
let (Some(compiler_config), crate_types) = mutest_driver::passes::parse_compiler_args(&args) else {
251249
early_dcx.early_fatal("no compiler configuration was generated");
252250
};
@@ -684,5 +682,5 @@ pub fn main() {
684682
};
685683

686684
mutest_driver::run(config).unwrap();
687-
}));
685+
})
688686
}

0 commit comments

Comments
 (0)