Skip to content

Commit

Permalink
safe transmute: add rustc_on_unimplemented to BikeshedIntrinsicFrom
Browse files Browse the repository at this point in the history
  • Loading branch information
jswrenn committed Jul 27, 2022
1 parent 8251b9b commit cf4bdd0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/src/mem/transmutability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
/// notwithstanding whatever safety checks you have asked the compiler to [`Assume`] are satisfied.
#[unstable(feature = "transmutability", issue = "none")]
#[cfg_attr(not(bootstrap), lang = "transmute_trait")]
#[rustc_on_unimplemented(
message = "`{Src}` cannot be safely transmuted into `{Self}` in the defining scope of `{Context}`.",
label = "`{Src}` cannot be safely transmuted into `{Self}` in the defining scope of `{Context}`."
)]
pub unsafe trait BikeshedIntrinsicFrom<
Src,
Context,
Expand Down

0 comments on commit cf4bdd0

Please sign in to comment.