Sign in
rust
/
rust
/
a5a286df89146c64afebc6dcbbd3f61ba67ae53b
/
.
/
tests
/
ui
/
transmute
/
transmute-same-associated-type.rs
blob: 8bc452c6df4f634bd71caf59d75c3c13a895038e [
file
]
//! Verify transmuting is allowed when `Src` and `Dst` are the same associated type.
//@ check-pass
trait
Foo
{
type
Bar
;
}
unsafe
fn
noop
<
F
:
Foo
>(
foo
:
F
::
Bar
)
->
F
::
Bar
{
::
std
::
mem
::
transmute
(
foo
)
}
fn
main
()
{}