Skip to content

Commit 827ec49

Browse files
authored
Rollup merge of #72017 - ctaggart:wasm2, r=ecstatic-morse
Work around ICEs during cross-compilation for target, ast, & attr This applies the fix for #72003 to work around #56935 to three more libraries. With these additional fixes, I'm able to use rustfmt_lib from wasm (rust-lang/rustfmt#4132 (comment)), which was my goal. To get it working locally and to test, I copied the `.cargo/registry/src` and applied the fix and replaced the reference in my project: ``` toml [replace] "rustc-ap-rustc_span:656.0.0" = { path = "../rustc-ap-rustc_span" } "rustc-ap-rustc_target:656.0.0" = { path = "../rustc-ap-rustc_target" } "rustc-ap-rustc_ast:656.0.0" = { path = "../rustc-ap-rustc_ast" } "rustc-ap-rustc_attr:656.0.0" = { path = "../rustc-ap-rustc_attr" } ```
2 parents b750ee4 + 0d60c46 commit 827ec49

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

src/librustc_ast/lib.rs

+4
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919
#![feature(unicode_internals)]
2020
#![recursion_limit = "256"]
2121

22+
// FIXME(#56935): Work around ICEs during cross-compilation.
23+
#[allow(unused)]
24+
extern crate rustc_macros;
25+
2226
#[macro_export]
2327
macro_rules! unwrap_or {
2428
($opt:expr, $default:expr) => {

src/librustc_attr/lib.rs

+4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
77
#![feature(or_patterns)]
88

9+
// FIXME(#56935): Work around ICEs during cross-compilation.
10+
#[allow(unused)]
11+
extern crate rustc_macros;
12+
913
mod builtin;
1014

1115
pub use builtin::*;

src/librustc_target/lib.rs

+4
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
#![feature(associated_type_bounds)]
1818
#![feature(exhaustive_patterns)]
1919

20+
// FIXME(#56935): Work around ICEs during cross-compilation.
21+
#[allow(unused)]
22+
extern crate rustc_macros;
23+
2024
#[macro_use]
2125
extern crate log;
2226

0 commit comments

Comments
 (0)