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

off-by-one span in doc_markdown warning on single tick #2481

Closed
matthiaskrgr opened this issue Feb 24, 2018 · 3 comments
Closed

off-by-one span in doc_markdown warning on single tick #2481

matthiaskrgr opened this issue Feb 24, 2018 · 3 comments
Labels
C-bug Category: Clippy is not doing the correct thing

Comments

@matthiaskrgr
Copy link
Member

matthiaskrgr commented Feb 24, 2018

clap-rs has code like this:

/// `Arg::required(true)` such as `--config <FILE>` = `Arg::value_name("FILE")` and
/// `Arg::required(true)

and clippy is confused by the missing(?) trailing "`":

warning: you should put `Arg::required(true` between ticks in the documentation
 --> src/main.rs:2:6
  |
2 | /// `Arg::required(true)
  |      ^^^^^^^^^^^^^^^^^^
  |
  = note: #[warn(doc_markdown)] on by default
  = help: for further information visit https://rust-lang-nursery.github.io/rust-clippy/v0.0.186/index.html#doc_markdown

`Arg::required(true` is not what we want I think... :)

source code: https://github.com/kbknapp/clap-rs/blob/03e413d7175d35827cd7d8908d47dbae15a849a3/src/macros.rs#L610

@phansch phansch added the C-bug Category: Clippy is not doing the correct thing label Mar 29, 2018
@mockersf
Copy link
Contributor

related to #2210

@phansch
Copy link
Member

phansch commented Dec 21, 2020

@giraffate
Copy link
Contributor

This was fixed by #7357, so I'm closing this.

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
Projects
None yet
Development

No branches or pull requests

4 participants