Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit db63c8b

Browse files
borsKobzol
authored andcommittedApr 4, 2024
Auto merge of #123322 - matthewjasper:remove-mir-unsafeck, r=lcnr,compiler-errors
Remove MIR unsafe check Now that THIR unsafeck is enabled by default in stable I think we can remove MIR unsafeck entirely. This PR also removes safety information from MIR.
2 parents c7491b9 + a277c90 commit db63c8b

File tree

196 files changed

+695
-2244
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

196 files changed

+695
-2244
lines changed
 

‎compiler/rustc_interface/src/passes.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -748,9 +748,6 @@ fn analysis(tcx: TyCtxt<'_>, (): ()) -> Result<()> {
748748

749749
sess.time("MIR_effect_checking", || {
750750
for def_id in tcx.hir().body_owners() {
751-
if !tcx.sess.opts.unstable_opts.thir_unsafeck {
752-
rustc_mir_transform::check_unsafety::check_unsafety(tcx, def_id);
753-
}
754751
tcx.ensure().has_ffi_unwind_calls(def_id);
755752

756753
// If we need to codegen, ensure that we emit all errors from

‎compiler/rustc_interface/src/tests.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -840,7 +840,6 @@ fn test_unstable_options_tracking_hash() {
840840
tracked!(stack_protector, StackProtector::All);
841841
tracked!(teach, true);
842842
tracked!(thinlto, Some(true));
843-
tracked!(thir_unsafeck, false);
844843
tracked!(tiny_const_eval_limit, true);
845844
tracked!(tls_model, Some(TlsModel::GeneralDynamic));
846845
tracked!(translate_remapped_path_to_local_path, false);

0 commit comments

Comments
 (0)
Please sign in to comment.