From 77f31a84ebb3cc03b0942626b6eddb38318fc849 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Mon, 26 Jan 2026 08:53:13 -0800 Subject: [PATCH 1/2] Link `const` docs to the standard library --- src/macros.rs | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/macros.rs b/src/macros.rs index 7083d01..07e8187 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -46,7 +46,22 @@ macro_rules! forward_doc { /// Declare a `const` that copies an original value macro_rules! use_consts { + (Self :: { $( $name:ident : $ty:ty ,)+ }) => { + $( + #[doc = concat!( + "See the inherent [`", stringify!($name), "`][", + "Self::", stringify!($name), "] constant." + )] + const $name: $ty = Self:: $name; + )+ + }; ($base:ident :: { $( $name:ident : $ty:ty ,)+ }) => { - $(const $name: $ty = $base :: $name;)+ + $( + #[doc = concat!( + "See the standard library [`", stringify!($name), "`][", + stringify!($base), "::", stringify!($name), "] constant." + )] + const $name: $ty = $base :: $name; + )+ }; } From d3f254fbc61537cecec4ffc2a67b94da17bd1cde Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Mon, 26 Jan 2026 09:13:16 -0800 Subject: [PATCH 2/2] Release 0.3.6 --- Cargo.toml | 2 +- RELEASES.md | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 52d7d61..06e63bf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "num-primitive" -version = "0.3.5" +version = "0.3.6" description = "Traits for primitive numeric types" repository = "https://github.com/rust-num/num-primitive" license = "MIT OR Apache-2.0" diff --git a/RELEASES.md b/RELEASES.md index 380ebcc..3ca1781 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1,3 +1,7 @@ +# Release 0.3.6 (2026-01-26) + +- Link `const` documentation to the standard library. + # Release 0.3.5 (2026-01-22) - Updated to MSRV 1.93.