Remove MIR unsafe check
This also remove safety information from MIR.
This commit is contained in:
parent
76cf07d5df
commit
a277c901d9
194 changed files with 667 additions and 2238 deletions
|
@ -845,17 +845,6 @@ impl<'tcx> Body<'tcx> {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, PartialEq, Eq, Debug, TyEncodable, TyDecodable, HashStable)]
|
||||
pub enum Safety {
|
||||
Safe,
|
||||
/// Unsafe because of compiler-generated unsafe code, like `await` desugaring
|
||||
BuiltinUnsafe,
|
||||
/// Unsafe because of an unsafe fn
|
||||
FnUnsafe,
|
||||
/// Unsafe because of an `unsafe` block
|
||||
ExplicitUnsafe(hir::HirId),
|
||||
}
|
||||
|
||||
impl<'tcx> Index<BasicBlock> for Body<'tcx> {
|
||||
type Output = BasicBlockData<'tcx>;
|
||||
|
||||
|
@ -1611,8 +1600,6 @@ pub struct SourceScopeData<'tcx> {
|
|||
pub struct SourceScopeLocalData {
|
||||
/// An `HirId` with lint levels equivalent to this scope's lint levels.
|
||||
pub lint_root: hir::HirId,
|
||||
/// The unsafe block that contains this node.
|
||||
pub safety: Safety,
|
||||
}
|
||||
|
||||
/// A collection of projections into user types.
|
||||
|
@ -1888,7 +1875,7 @@ mod size_asserts {
|
|||
// tidy-alphabetical-start
|
||||
static_assert_size!(BasicBlockData<'_>, 144);
|
||||
static_assert_size!(LocalDecl<'_>, 40);
|
||||
static_assert_size!(SourceScopeData<'_>, 72);
|
||||
static_assert_size!(SourceScopeData<'_>, 64);
|
||||
static_assert_size!(Statement<'_>, 32);
|
||||
static_assert_size!(StatementKind<'_>, 16);
|
||||
static_assert_size!(Terminator<'_>, 112);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue