Hi,
cargo test --doc throws the following error at line 70, 74 for the comments section below:
---- uart.rs - uart::UartConfigs::rxctrl (line 70) stdout ----
**error****: expected one of `,`, `...`, `..=`, `..`, `]`, or `|`, found `:`**
**-->** uart.rs:74:6
Comments on struct
-
/** => Line 69
-
The RW
rxctrl
register controls the operation of the receive channel. -
```
-
------------------------------------------------------
-
| RESERVED | WATERMARK | RESERVED | ENABLE|
-
------------------------------------------------------
-
| [31:19] | [18:16] | [15:1] | 0 |
-
------------------------------------------------------
-
```
-
The `rxen` bit controls wether Rx channel is active.
-
When cleared, the state of `rxd` pin is ignored and
-
no characters will be enqueued into the Rx FIFO.
-
The watermark field specifies the threshold at which
-
the Rx FIFO watermark interrupt triggers.
-
The `rxctrl` register is reset to 0.
-
Characters are enqueued when a zero (low) start bit
-
is seen.
-
*/ Line 89
Can someone point me whats wrong with this way of commenting & why cargo doc complains? My problem is that I could n't understand what might be a documentation error. Until now to me, documentation is just what ever I write in my format. It seems rust has some set rules, so would be great if you can provide/point me to those set rules.
I just started going through https://doc.rust-lang.org/rustdoc/how-to-write-documentation.html