File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -32,13 +32,26 @@ declare_clippy_lint! {
3232 /// **Known problems:** Lots of bad docs won’t be fixed, what the lint checks
3333 /// for is limited, and there are still false positives.
3434 ///
35+ /// In addition, when writing documentation comments, including `[]` brackets
36+ /// inside a link text would trip the parser. Therfore, documenting link with
37+ /// `[`SmallVec<[T; INLINE_CAPACITY]>`]` and then [`SmallVec<[T; INLINE_CAPACITY]>`]: SmallVec
38+ /// would fail.
39+ ///
3540 /// **Examples:**
3641 /// ```rust
3742 /// /// Do something with the foo_bar parameter. See also
3843 /// /// that::other::module::foo.
3944 /// // ^ `foo_bar` and `that::other::module::foo` should be ticked.
4045 /// fn doit(foo_bar: usize) {}
4146 /// ```
47+ ///
48+ /// ```rust
49+ /// // Link text with `[]` brackets should be written as following:
50+ /// /// Consume the array and return the inner
51+ /// /// [`SmallVec<[T; INLINE_CAPACITY]>`][SmallVec].
52+ /// /// [SmallVec]: SmallVec
53+ /// fn main() {}
54+ /// ```
4255 pub DOC_MARKDOWN ,
4356 pedantic,
4457 "presence of `_`, `::` or camel-case outside backticks in documentation"
You can’t perform that action at this time.
0 commit comments