mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 23:12:02 +00:00
238756e45d
Don't skip transmutability check just because there may be generics in the ParamEnv. Fixes #110467
18 lines
391 B
Rust
18 lines
391 B
Rust
// check-pass
|
|
#![crate_type = "lib"]
|
|
#![feature(transmutability)]
|
|
use std::mem::BikeshedIntrinsicFrom;
|
|
pub struct Context;
|
|
|
|
pub fn is_maybe_transmutable<Src, Dst>()
|
|
where
|
|
Dst: BikeshedIntrinsicFrom<Src, Context>,
|
|
{
|
|
}
|
|
|
|
// The `T` here should not have any effect on checking
|
|
// if transmutability is allowed or not.
|
|
fn function_with_generic<T>() {
|
|
is_maybe_transmutable::<(), ()>();
|
|
}
|