Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc_markdown gives false positive on intra-doc link paths with bracket syntax #7758

Closed
TheIronBorn opened this issue Oct 3, 2021 · 0 comments · Fixed by #7772
Closed

doc_markdown gives false positive on intra-doc link paths with bracket syntax #7758

TheIronBorn opened this issue Oct 3, 2021 · 0 comments · Fixed by #7772
Assignees
Labels
C-bug Category: Clippy is not doing the correct thing I-false-positive Issue: The lint was triggered on code it shouldn't have L-pedantic Lint: Belongs in the pedantic lint group

Comments

@TheIronBorn
Copy link

Lint name: doc_markdown

I tried this code:

/// [plain text][path::to::item]

I expected to see this happen: no warning emitted

Instead, this happened:

warning: you should put `text][path::to::item` between ticks in the documentation
 --> src\lib.rs:1:12
  |
1 | /// [plain text][path::to::item]
  |            ^^^^^^^^^^^^^^^^^^^^
  |
  = note: `-W clippy::doc-markdown` implied by `-W clippy::pedantic`
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#do
c_markdown

This doesn't happen with () syntax:

/// [plain text](path::to::item)

Meta

Rust version (rustc -Vv):

rustc 1.57.0-nightly (c02371c44 2021-10-01)
binary: rustc
commit-hash: c02371c442f811878ab3a0f5a813402b6dfd45d2
commit-date: 2021-10-01
host: x86_64-pc-windows-msvc
release: 1.57.0-nightly
LLVM version: 13.0.0
clippy: 0.1.57 (c02371c4 2021-10-01)
@TheIronBorn TheIronBorn added C-bug Category: Clippy is not doing the correct thing I-false-positive Issue: The lint was triggered on code it shouldn't have labels Oct 3, 2021
@rustbot rustbot added the L-pedantic Lint: Belongs in the pedantic lint group label Oct 3, 2021
Manishearth added a commit to Manishearth/rust-clippy that referenced this issue Oct 6, 2021
@Manishearth Manishearth self-assigned this Oct 6, 2021
Manishearth added a commit to Manishearth/rust-clippy that referenced this issue Oct 6, 2021
@bors bors closed this as completed in 11492c7 Oct 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: Clippy is not doing the correct thing I-false-positive Issue: The lint was triggered on code it shouldn't have L-pedantic Lint: Belongs in the pedantic lint group
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants