From 8797986391022adf98bde252002dcfc9eaaef975 Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Mon, 11 Jan 2021 13:20:18 +0900 Subject: [PATCH] Add a regression test for #76281 This has been fixed between 1.47.0-nightly (663d2f5cd 2020-08-22) and 1.47.0-nightly (5180f3da5 2020-08-23). --- src/test/ui/wasm/wasm-hang-issue-76281.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/test/ui/wasm/wasm-hang-issue-76281.rs diff --git a/src/test/ui/wasm/wasm-hang-issue-76281.rs b/src/test/ui/wasm/wasm-hang-issue-76281.rs new file mode 100644 index 0000000000000..a4adfa6d04461 --- /dev/null +++ b/src/test/ui/wasm/wasm-hang-issue-76281.rs @@ -0,0 +1,12 @@ +// only-wasm32 +// compile-flags: -C opt-level=2 +// build-pass + +// Regression test for #76281. +// This seems like an issue related to LLVM rather than +// libs-impl so place here. + +fn main() { + let mut v: Vec<&()> = Vec::new(); + v.sort_by_key(|&r| r as *const ()); +}