Auto merge of #100726 - jswrenn:transmute, r=oli-obk
safe transmute: use `Assume` struct to provide analysis options This task was left as a TODO in #92268; resolving it brings [`BikeshedIntrinsicFrom`](https://doc.rust-lang.org/nightly/core/mem/trait.BikeshedIntrinsicFrom.html) more in line with the API defined in [MCP411](https://github.com/rust-lang/compiler-team/issues/411). **Before:** ```rust pub unsafe trait BikeshedIntrinsicFrom< Src, Context, const ASSUME_ALIGNMENT: bool, const ASSUME_LIFETIMES: bool, const ASSUME_VALIDITY: bool, const ASSUME_VISIBILITY: bool, > where Src: ?Sized, {} ``` **After:** ```rust pub unsafe trait BikeshedIntrinsicFrom<Src, Context, const ASSUME: Assume = { Assume::NOTHING }> where Src: ?Sized, {} ``` `Assume::visibility` has also been renamed to `Assume::safety`, as library safety invariants are what's actually being assumed; visibility is just the mechanism by which it is currently checked (and that may change). r? `@oli-obk` --- Related: - https://github.com/rust-lang/compiler-team/issues/411 - https://github.com/rust-lang/rust/issues/99571
This commit is contained in:
commit
8521a8c92d
79 changed files with 1320 additions and 735 deletions
|
@ -339,6 +339,7 @@ symbols! {
|
|||
alias,
|
||||
align,
|
||||
align_offset,
|
||||
alignment,
|
||||
alignstack,
|
||||
all,
|
||||
alloc,
|
||||
|
@ -866,6 +867,7 @@ symbols! {
|
|||
lib,
|
||||
libc,
|
||||
lifetime,
|
||||
lifetimes,
|
||||
likely,
|
||||
line,
|
||||
line_macro,
|
||||
|
@ -1294,6 +1296,7 @@ symbols! {
|
|||
rustfmt,
|
||||
rvalue_static_promotion,
|
||||
s,
|
||||
safety,
|
||||
sanitize,
|
||||
sanitizer_runtime,
|
||||
saturating_add,
|
||||
|
@ -1478,6 +1481,7 @@ symbols! {
|
|||
trait_alias,
|
||||
trait_upcasting,
|
||||
transmute,
|
||||
transmute_opts,
|
||||
transmute_trait,
|
||||
transparent,
|
||||
transparent_enums,
|
||||
|
@ -1573,6 +1577,7 @@ symbols! {
|
|||
va_list,
|
||||
va_start,
|
||||
val,
|
||||
validity,
|
||||
values,
|
||||
var,
|
||||
variant_count,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue