Skip to content

Commit dd76868

Browse files
committed
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`.
1 parent 982c6f8 commit dd76868

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

library/core/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ pub mod hint;
360360
pub mod intrinsics;
361361
pub mod mem;
362362
pub mod ptr;
363-
#[unstable(feature = "ub_checks", issue = "none")]
363+
#[unstable(feature = "ub_checks", issue = "123499")]
364364
pub mod ub_checks;
365365

366366
/* Core language traits */

library/core/src/ub_checks.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use crate::intrinsics::{self, const_eval_select};
1010
/// macro for language UB are always ignored.
1111
///
1212
/// This macro should be called as
13-
/// `assert_unsafe_precondition!(check_{library,lang}_ub, "message", (ident: type = expr, ident: type = expr) => check_expr)`
13+
/// `assert_unsafe_precondition!(check_{library,language}_ub, "message", (ident: type = expr, ident: type = expr) => check_expr)`
1414
/// where each `expr` will be evaluated and passed in as function argument `ident: type`. Then all
1515
/// those arguments are passed to a function with the body `check_expr`.
1616
/// 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};
4949
/// debuginfo to have a measurable compile-time impact on debug builds.
5050
#[allow_internal_unstable(const_ub_checks)] // permit this to be called in stably-const fn
5151
#[macro_export]
52-
#[unstable(feature = "ub_checks", issue = "none")]
52+
#[unstable(feature = "ub_checks", issue = "123499")]
5353
macro_rules! assert_unsafe_precondition {
5454
($kind:ident, $message:expr, ($($name:ident:$ty:ty = $arg:expr),*$(,)?) => $e:expr $(,)?) => {
5555
{
@@ -79,11 +79,11 @@ macro_rules! assert_unsafe_precondition {
7979
}
8080
};
8181
}
82-
#[unstable(feature = "ub_checks", issue = "none")]
82+
#[unstable(feature = "ub_checks", issue = "123499")]
8383
pub use assert_unsafe_precondition;
8484
/// Checking library UB is always enabled when UB-checking is done
8585
/// (and we use a reexport so that there is no unnecessary wrapper function).
86-
#[unstable(feature = "ub_checks", issue = "none")]
86+
#[unstable(feature = "ub_checks", issue = "123499")]
8787
pub use intrinsics::ub_checks as check_library_ub;
8888

8989
/// Determines whether we should check for language UB.

0 commit comments

Comments
 (0)