Skip to content

Commit 69e1d22

Browse files
committed
Auto merge of #83981 - nagisa:nagisa/revert-cfg-wasm, r=Mark-Simulacrum
Remove the insta-stable `cfg(wasm)` The addition of `cfg(wasm)` was an oversight on my end that turns out to have a number of downsides: * It was introduced as an insta-stable addition, forgoing the usual staging mechanism we use for potentially far-reaching changes; * It is a breaking change for people who are using `--cfg wasm` either directly or via cargo for other purposes; * It is not entirely clear if a bare `wasm` cfg is a right option or whether `wasm` family of targets are special enough to warrant special-casing these targets specifically. As for the last point, there appears to be a fair amount of support for reducing the boilerplate in specifying architectures from the same family, while ignoring their pointer width. The suggested way forward would be to propose such a change as a separate RFC as it is potentially a quite contentious addition. cc #83879 `@devsnek`
2 parents 1408715 + 54dc7ce commit 69e1d22

File tree

3 files changed

+0
-5
lines changed

3 files changed

+0
-5
lines changed

compiler/rustc_session/src/config.rs

-3
Original file line numberDiff line numberDiff line change
@@ -822,9 +822,6 @@ pub fn default_configuration(sess: &Session) -> CrateConfig {
822822
}
823823
}
824824
ret.insert((sym::target_arch, Some(Symbol::intern(arch))));
825-
if sess.target.is_like_wasm {
826-
ret.insert((sym::wasm, None));
827-
}
828825
ret.insert((sym::target_endian, Some(Symbol::intern(end.as_str()))));
829826
ret.insert((sym::target_pointer_width, Some(Symbol::intern(&wordsz))));
830827
ret.insert((sym::target_env, Some(Symbol::intern(env))));

compiler/rustc_span/src/symbol.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1295,7 +1295,6 @@ symbols! {
12951295
vreg,
12961296
vreg_low16,
12971297
warn,
1298-
wasm,
12991298
wasm_import_module,
13001299
wasm_target_feature,
13011300
while_let,

src/librustdoc/clean/cfg.rs

-1
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,6 @@ impl<'a> fmt::Display for Display<'a> {
487487
"windows" => "Windows",
488488
_ => "",
489489
},
490-
(sym::wasm, None) => "WebAssembly",
491490
(sym::target_arch, Some(arch)) => match &*arch.as_str() {
492491
"aarch64" => "AArch64",
493492
"arm" => "ARM",

0 commit comments

Comments
 (0)