It's just missing a comma after Self::Word but this ends up consuming all memory on my machine (and on the rust playground). It's worth noting that reducing the level of indentation also seems to sidestep this issue.
pub trait UNWArch {
fn method(
addr: Self::Word
data: *mut c_void
);
}
rustc --version --verbose:
$ rustc --version --verbose
rustc 1.46.0 (04488afe3 2020-08-24)
binary: rustc
commit-hash: 04488afe34512aa4c33566eb16d8c912a3ae04f9
commit-date: 2020-08-24
host: x86_64-unknown-linux-gnu
release: 1.46.0
LLVM version: 10.0
cargo build
Compiling fail v0.1.0 (/home/crzysdrs/fail)
error: could not compile `fail`.
Caused by:
process didn't exit successfully: `rustc --crate-name fail --edition=2018 src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -Cembed-bitcode=no -C debuginfo=2 -C metadata=c63edfe5a60da69f -C extra-filename=-c63edfe5a60da69f --out-dir /home/crzysdrs/fail/target/debug/deps -C incremental=/home/crzysdrs/fail/target/debug/incremental -L dependency=/home/crzysdrs/fail/target/debug/deps` (signal: 9, SIGKILL: kill)
Backtrace
No backtrace, process terminated.
This seems to have been fixed in nightly. It seems like it was introduced in 1.46 and will be present in 1.47, unless we indentify and a backport the fix present in nightly.
Nominated the PR for beta backport so this issue does not appear in 1.47.
Closing as this issue is fixed on nightly and the fix is now beta-accepted.