File tree Expand file tree Collapse file tree 5 files changed +7
-7
lines changed Expand file tree Collapse file tree 5 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 1
1
edition = " 2018"
2
+ format_code_in_doc_comments = true
Original file line number Diff line number Diff line change @@ -154,7 +154,7 @@ fn panic(_info: &PanicInfo) -> ! {
154
154
/// // This prints `8`.
155
155
/// println!("{}", offset_of!(Test, b));
156
156
/// }
157
- ///```
157
+ /// ```
158
158
#[ macro_export]
159
159
macro_rules! offset_of {
160
160
( $type: ty, $( $f: tt) * ) => { {
@@ -189,14 +189,13 @@ macro_rules! offset_of {
189
189
/// }
190
190
///
191
191
/// fn test() {
192
- /// let test = Test{ a: 10, b: 20};
192
+ /// let test = Test { a: 10, b: 20 };
193
193
/// let b_ptr = &test.b;
194
194
/// let test_alias = unsafe { container_of!(b_ptr, Test, b) };
195
195
/// // This prints `true`.
196
196
/// println!("{}", core::ptr::eq(&test, test_alias));
197
197
/// }
198
- ///```
199
- ///
198
+ /// ```
200
199
#[ macro_export]
201
200
macro_rules! container_of {
202
201
( $ptr: expr, $type: ty, $( $f: tt) * ) => { {
Original file line number Diff line number Diff line change @@ -211,7 +211,7 @@ macro_rules! impl_module_param {
211
211
/// make_param_ops!(
212
212
/// /// Documentation for new param ops.
213
213
/// PARAM_OPS_MYTYPE, // Name for the static.
214
- /// MyType // A type which implements [`ModuleParam`].
214
+ /// MyType // A type which implements [`ModuleParam`].
215
215
/// );
216
216
/// ```
217
217
macro_rules! make_param_ops {
Original file line number Diff line number Diff line change 22
22
/// static_assert!(X[1] == 'a' as u8);
23
23
///
24
24
/// const fn f(x: i32) -> i32 {
25
- /// x + 2
25
+ /// x + 2
26
26
/// }
27
27
/// static_assert!(f(40) == 42);
28
28
/// ```
Original file line number Diff line number Diff line change 10
10
//!```
11
11
//! fn test() {
12
12
//! // SAFETY: `init` is called below.
13
- //! let data = alloc::sync::Arc::pin(unsafe{ Mutex::new(0) });
13
+ //! let data = alloc::sync::Arc::pin(unsafe { Mutex::new(0) });
14
14
//! mutex_init!(data.as_ref(), "test::data");
15
15
//! *data.lock() = 10;
16
16
//! kernel::println!("{}", *data.lock());
You can’t perform that action at this time.
0 commit comments