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).
This commit is contained in:
Yuki Okushi 2021-01-11 13:20:18 +09:00
parent dcf622eb70
commit 8797986391
1 changed files with 12 additions and 0 deletions

View File

@ -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 ());
}