rust/tests/ui/impl-trait/transmute/outside-of-defining-scope.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
206 B
Rust
Raw Normal View History

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