This repository was archived by the owner on May 28, 2025. It is now read-only.
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! {
32
32
/// **Known problems:** Lots of bad docs won’t be fixed, what the lint checks
33
33
/// for is limited, and there are still false positives.
34
34
///
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
+ ///
35
40
/// **Examples:**
36
41
/// ```rust
37
42
/// /// Do something with the foo_bar parameter. See also
38
43
/// /// that::other::module::foo.
39
44
/// // ^ `foo_bar` and `that::other::module::foo` should be ticked.
40
45
/// fn doit(foo_bar: usize) {}
41
46
/// ```
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
+ /// ```
42
55
pub DOC_MARKDOWN ,
43
56
pedantic,
44
57
"presence of `_`, `::` or camel-case outside backticks in documentation"
You can’t perform that action at this time.
0 commit comments