File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change 73
73
/// Naive factorial implementation:
74
74
///
75
75
/// ```rust
76
- /// # #[expect(clippy::disallowed_macros)]
77
- /// # {
76
+ /// # #![expect(clippy::disallowed_macros)]
78
77
/// fn factorial(n: u32) -> u32 {
79
78
/// if dbg!(n <= 1) {
80
79
/// dbg!(1)
84
83
/// }
85
84
///
86
85
/// dbg!(factorial(4));
87
- /// # }
88
86
/// ```
89
87
///
90
88
/// This prints to the kernel log:
129
127
/// invocations. You can use a 1-tuple directly if you need one:
130
128
///
131
129
/// ```
132
- /// # #[expect(clippy::disallowed_macros)]
133
- /// # {
130
+ /// # #![expect(clippy::disallowed_macros)]
134
131
/// assert_eq!(1, dbg!(1u32,)); // trailing comma ignored
135
132
/// assert_eq!((1,), dbg!((1u32,))); // 1-tuple
136
- /// # }
137
133
/// ```
138
134
///
139
135
/// [`std::dbg`]: https://doc.rust-lang.org/std/macro.dbg.html
You can’t perform that action at this time.
0 commit comments