File tree Expand file tree Collapse file tree 2 files changed +13
-13
lines changed
Expand file tree Collapse file tree 2 files changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,18 @@ Implemented as `macro_rules!`.
1515
1616[ Documentation] [ docs-link ]
1717
18+ ## Example
19+
20+ Below is a basic example of how you can use the ` cpubits! ` macro:
21+
22+ ``` rust
23+ cpubits :: cpubits! {
24+ 16 => { pub type Word = u16 ; }
25+ 32 => { pub type Word = u32 ; }
26+ 64 => { pub type Word = u64 ; }
27+ }
28+ ```
29+
1830## License
1931
2032Licensed under either of:
Original file line number Diff line number Diff line change 1414//! - `64`
1515//!
1616//! This matches the available options for `target_pointer_width` in `rustc`:
17+ //!
1718//! ```text
1819//! expected values for `target_pointer_width` are: `16`, `32`, and `64`
1920//! ```
20- //!
21- //! # Example
22- //!
23- //! See the [`cpubits`] macro itself for more detailed usage examples including other syntax
24- //! variations.
25- //!
26- //! ```
27- //! cpubits::cpubits! {
28- //! 16 => { pub type Word = u16; }
29- //! 32 => { pub type Word = u32; }
30- //! 64 => { pub type Word = u64; }
31- //! }
32- //! ```
3321
3422// End of toplevel rustdoc, beginning of macro documentation. We put the detailed docs on the macro
3523// itself so we can re-export it, and people can easily get to these docs from the re-exported
You can’t perform that action at this time.
0 commit comments