From 5fdd1ba3c2702628b838faaec47115a20529ca4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lanteri=20Thauvin?= Date: Tue, 3 Aug 2021 01:42:57 +0200 Subject: [PATCH] Enable `-Zthir-unsafeck` by default --- compiler/rustc_session/src/options.rs | 2 +- library/std/src/alloc.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/rustc_session/src/options.rs b/compiler/rustc_session/src/options.rs index f9ee202466f67..07469dfc529df 100644 --- a/compiler/rustc_session/src/options.rs +++ b/compiler/rustc_session/src/options.rs @@ -1567,7 +1567,7 @@ options! { #[rustc_lint_opt_deny_field_access("use `Session::lto` instead of this field")] thinlto: Option = (None, parse_opt_bool, [TRACKED], "enable ThinLTO when possible"), - thir_unsafeck: bool = (false, parse_bool, [TRACKED], + thir_unsafeck: bool = (true, parse_bool, [TRACKED], "use the THIR unsafety checker (default: no)"), /// We default to 1 here since we want to behave like /// a sequential compiler for now. This'll likely be adjusted diff --git a/library/std/src/alloc.rs b/library/std/src/alloc.rs index 61c1ff578b2ca..f147f82d67390 100644 --- a/library/std/src/alloc.rs +++ b/library/std/src/alloc.rs @@ -53,7 +53,7 @@ //! The `#[global_allocator]` can only be used once in a crate //! or its recursive dependencies. -#![deny(unsafe_op_in_unsafe_fn)] +// #![deny(unsafe_op_in_unsafe_fn)] #![stable(feature = "alloc_module", since = "1.28.0")] use core::intrinsics;