Skip to content

Commit 31f8336

Browse files
committed
wip 2026-01-19T20:24:52+01:00
1 parent 9b193a2 commit 31f8336

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

src/tools/compiletest/src/directives/auxiliary.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@ use crate::directives::DirectiveLine;
1010
/// The value of an `aux-crate` directive.
1111
#[derive(Clone, Debug, Default)]
1212
pub struct AuxCrate {
13+
/// Contains `--extern` modifiers, if any. See the tracking issue for more
14+
/// info: https://github.com/rust-lang/rust/issues/98405
1315
/// With `aux-crate: noprelude:foo=bar.rs` this will be `noprelude`.
14-
pub extern_opts: Option<String>,
16+
pub extern_modifiers: Option<String>,
1517
/// With `aux-crate: foo=bar.rs` this will be `foo`.
1618
/// With `aux-crate: noprelude:foo=bar.rs` this will be `foo`.
1719
pub name: String,
@@ -79,9 +81,9 @@ fn parse_aux_crate(r: String) -> AuxCrate {
7981
let mut parts = r.trim().splitn(2, '=');
8082
let opts_and_name = parts.next().expect("missing aux-crate name (e.g. log=log.rs)").to_string();
8183
let path = parts.next().expect("missing aux-crate value (e.g. log=log.rs)").to_string();
82-
let (opts, name) = match opts_and_name.split_once(':') {
84+
let (modifiers, name) = match opts_and_name.split_once(':') {
8385
None => (None, opts_and_name),
8486
Some((opts, name)) => (Some(opts.to_string()), name.to_string()),
8587
};
86-
AuxCrate { extern_opts: opts, name, path }
88+
AuxCrate { extern_modifiers: modifiers, name, path }
8789
}

src/tools/compiletest/src/runtest.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1292,17 +1292,17 @@ impl<'test> TestCx<'test> {
12921292
}
12931293
};
12941294

1295-
for AuxCrate { extern_opts, name, path } in &self.props.aux.crates {
1295+
for AuxCrate { extern_modifiers, name, path } in &self.props.aux.crates {
12961296
let aux_type = self.build_auxiliary(&path, &aux_dir, None);
1297-
add_extern(rustc, extern_opts.as_deref(), name, path, aux_type);
1297+
add_extern(rustc, extern_modifiers.as_deref(), name, path, aux_type);
12981298
}
12991299

13001300
for proc_macro in &self.props.aux.proc_macros {
13011301
self.build_auxiliary(proc_macro, &aux_dir, Some(AuxType::ProcMacro));
13021302
let crate_name = path_to_crate_name(proc_macro);
13031303
add_extern(
13041304
rustc,
1305-
None, // `extern_opts`
1305+
None, // `extern_modifiers`
13061306
&crate_name,
13071307
proc_macro,
13081308
AuxType::ProcMacro,

0 commit comments

Comments
 (0)