forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#110510 - bryangarza:issue-110467-safe-trans…
…mute, r=compiler-errors Fix ICE for transmutability in candidate assembly Don't skip transmutability check just because there may be generics in the ParamEnv. Fixes rust-lang#110467
- Loading branch information
Showing
2 changed files
with
18 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// 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::<(), ()>(); | ||
} |