diff options
| author | LeSeulArtichaut <leseulartichaut@gmail.com> | 2021-05-24 15:09:33 +0200 |
|---|---|---|
| committer | LeSeulArtichaut <leseulartichaut@gmail.com> | 2021-05-24 15:09:33 +0200 |
| commit | af3d9a3aa307a1a1d2badb2be580a624a18b2858 (patch) | |
| tree | 31c83a6179a7ff775147d6588d2b48cc26a67ac7 /compiler/rustc_interface | |
| parent | 13e7b237fdc774c4df131f55233f0f5af737a333 (diff) | |
| download | rust-af3d9a3aa307a1a1d2badb2be580a624a18b2858.tar.gz rust-af3d9a3aa307a1a1d2badb2be580a624a18b2858.zip | |
Make `thir_check_unsafety` itself responsible for checking gate
Diffstat (limited to 'compiler/rustc_interface')
| -rw-r--r-- | compiler/rustc_interface/src/passes.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/rustc_interface/src/passes.rs b/compiler/rustc_interface/src/passes.rs index e2220e3b60d..70ffff1ab99 100644 --- a/compiler/rustc_interface/src/passes.rs +++ b/compiler/rustc_interface/src/passes.rs @@ -873,9 +873,8 @@ fn analysis(tcx: TyCtxt<'_>, (): ()) -> Result<()> { sess.time("MIR_effect_checking", || { for def_id in tcx.body_owners() { - if tcx.sess.opts.debugging_opts.thir_unsafeck { - tcx.ensure().thir_check_unsafety(def_id); - } else { + tcx.ensure().thir_check_unsafety(def_id); + if !tcx.sess.opts.debugging_opts.thir_unsafeck { mir::transform::check_unsafety::check_unsafety(tcx, def_id); } |
