safe transmute: forbid reference lifetime extension
Modifies `BikeshedIntrinsicFrom` to forbid lifetime extensions on references. This static check can be opted out of with the `Assume::lifetimes` flag. Fixes #129097
This commit is contained in:
@@ -9,7 +9,7 @@ pub(crate) use rustc_data_structures::fx::{FxIndexMap as Map, FxIndexSet as Set}
|
||||
pub mod layout;
|
||||
mod maybe_transmutable;
|
||||
|
||||
#[derive(Default)]
|
||||
#[derive(Copy, Clone, Debug, Default)]
|
||||
pub struct Assume {
|
||||
pub alignment: bool,
|
||||
pub lifetimes: bool,
|
||||
|
||||
Reference in New Issue
Block a user