mirror of
https://git.proxmox.com/git/rustc
synced 2025-08-15 01:10:36 +00:00
13 lines
206 B
Rust
13 lines
206 B
Rust
//! Check that typeck can observe the size of an opaque type.
|
|
//@ check-pass
|
|
use std::mem::transmute;
|
|
fn foo() -> impl Sized {
|
|
0u8
|
|
}
|
|
|
|
fn main() {
|
|
unsafe {
|
|
transmute::<_, u8>(foo());
|
|
}
|
|
}
|