Skip to content
This repository was archived by the owner on May 23, 2024. It is now read-only.

Commit 766410b

Browse files
committed
Use minimized repro for 53092
Closes #744
1 parent 63b18c0 commit 766410b

File tree

1 file changed

+3
-20
lines changed

1 file changed

+3
-20
lines changed

ices/53092.rs

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,16 @@
1-
#![feature(const_fn)]
2-
#![feature(const_fn_union)]
31
#![feature(impl_trait_in_bindings)]
42
#![feature(min_type_alias_impl_trait)]
53
#![feature(type_alias_impl_trait)]
6-
#![feature(untagged_unions)]
7-
8-
const fn transmute<T, U>(from: T) -> U {
9-
use std::mem::ManuallyDrop;
10-
11-
union Transform<FROM, INTO> {
12-
from: ManuallyDrop<FROM>,
13-
into: ManuallyDrop<INTO>,
14-
}
15-
16-
let transformer = Transform {
17-
from: ManuallyDrop::new(from),
18-
};
19-
20-
unsafe { ManuallyDrop::into_inner(transformer.into) }
21-
}
4+
#![allow(dead_code)]
225

236
type Bug<T, U> = impl Fn(T) -> U + Copy;
247

25-
const CONST_BUG: Bug<u8, ()> = transmute(|_: u8| ());
8+
const CONST_BUG: Bug<u8, ()> = unsafe { std::mem::transmute(|_: u8| ()) };
269

2710
fn make_bug<T, U: From<T>>() -> Bug<T, U> {
2811
|x| x.into()
2912
}
3013

3114
fn main() {
32-
let x = CONST_BUG(0);
15+
CONST_BUG(0);
3316
}

0 commit comments

Comments
 (0)