Skip to content

Commit

Permalink
Merge pull request #354 from DaniPopes/fix-uint-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
prestwich authored Feb 27, 2024
2 parents d8185a2 + 3d286e9 commit f7f043d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description = "Unsigned integer type with const-generic bit length"
version = "1.12.0"
keywords = ["uint"]
categories = ["mathematics"]
include = ["src/**/*.rs", "README.md", "ruint-macro/README.md"]
include = ["src/**/*.rs", "README.md"]
readme = "README.md"

edition.workspace = true
Expand Down
6 changes: 6 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ pub use self::{
string::ParseError,
};

// For documentation purposes we expose the macro directly, otherwise it is
// wrapped in ./macros.rs.
#[cfg(doc)]
#[doc(inline)]
pub use ruint_macro::uint;

#[cfg(feature = "generic_const_exprs")]
pub mod nightly {
//! Extra features that are nightly only.
Expand Down
5 changes: 3 additions & 2 deletions src/macros.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#[allow(rustdoc::broken_intra_doc_links)]
#[doc = include_str!("../ruint-macro/README.md")]
/// Wrapper for [`ruint_macro::uint!`]. See its documentation for details.
#[macro_export]
#[cfg(not(doc))] // Show the actual macro in docs.
#[doc(hidden)]
macro_rules! uint {
($($t:tt)*) => {
$crate::__private::ruint_macro::uint_with_path!([$crate] $($t)*)
Expand Down

0 comments on commit f7f043d

Please sign in to comment.