From dd7686813b1cb66bf3c493258867d39773a4bbbd Mon Sep 17 00:00:00 2001 From: "Chai T. Rex" Date: Wed, 21 Aug 2024 16:39:13 -0400 Subject: [PATCH] Fix docs and tracking issue number for `ub_checks` * Change `ub_checks` unstable feature issue from "none" to "123499". * Change `assert_unsafe_precondition` docs to refer to `check_language_ub`. --- library/core/src/lib.rs | 2 +- library/core/src/ub_checks.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/library/core/src/lib.rs b/library/core/src/lib.rs index e3640627c562a..e1f5e18c890cb 100644 --- a/library/core/src/lib.rs +++ b/library/core/src/lib.rs @@ -360,7 +360,7 @@ pub mod hint; pub mod intrinsics; pub mod mem; pub mod ptr; -#[unstable(feature = "ub_checks", issue = "none")] +#[unstable(feature = "ub_checks", issue = "123499")] pub mod ub_checks; /* Core language traits */ diff --git a/library/core/src/ub_checks.rs b/library/core/src/ub_checks.rs index b65b48c162d9c..3a66fd2b29751 100644 --- a/library/core/src/ub_checks.rs +++ b/library/core/src/ub_checks.rs @@ -10,7 +10,7 @@ use crate::intrinsics::{self, const_eval_select}; /// macro for language UB are always ignored. /// /// This macro should be called as -/// `assert_unsafe_precondition!(check_{library,lang}_ub, "message", (ident: type = expr, ident: type = expr) => check_expr)` +/// `assert_unsafe_precondition!(check_{library,language}_ub, "message", (ident: type = expr, ident: type = expr) => check_expr)` /// where each `expr` will be evaluated and passed in as function argument `ident: type`. Then all /// those arguments are passed to a function with the body `check_expr`. /// Pick `check_language_ub` when this is guarding a violation of language UB, i.e., immediate UB @@ -49,7 +49,7 @@ use crate::intrinsics::{self, const_eval_select}; /// debuginfo to have a measurable compile-time impact on debug builds. #[allow_internal_unstable(const_ub_checks)] // permit this to be called in stably-const fn #[macro_export] -#[unstable(feature = "ub_checks", issue = "none")] +#[unstable(feature = "ub_checks", issue = "123499")] macro_rules! assert_unsafe_precondition { ($kind:ident, $message:expr, ($($name:ident:$ty:ty = $arg:expr),*$(,)?) => $e:expr $(,)?) => { { @@ -79,11 +79,11 @@ macro_rules! assert_unsafe_precondition { } }; } -#[unstable(feature = "ub_checks", issue = "none")] +#[unstable(feature = "ub_checks", issue = "123499")] pub use assert_unsafe_precondition; /// Checking library UB is always enabled when UB-checking is done /// (and we use a reexport so that there is no unnecessary wrapper function). -#[unstable(feature = "ub_checks", issue = "none")] +#[unstable(feature = "ub_checks", issue = "123499")] pub use intrinsics::ub_checks as check_library_ub; /// Determines whether we should check for language UB.