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

Context-less doc error "doc comment contains an invalid Rust code block" in 1.42 #71908

Closed
rbtcollins opened this issue May 4, 2020 · 2 comments
Labels
C-bug Category: This is a bug. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@rbtcollins
Copy link
Contributor

I'm getting this warning:

warning: doc comment contains an invalid Rust code block
    |
    = help: mark blocks that do not contain Rust code as text: ```text

from cargo doc --no-deps - thats the entire thing, no file or line information. I think its related to #56884.
Adding -v doesn't help. Nightly produces better diagnostics, but the origin of the error is outside my crate : so thats still somewhat-odd

$ cargo +nightly doc --no-deps
warning: doc comment contains an invalid Rust code block
   --> /home/robertc/.cargo/registry/src/github.com-1ecc6299db9ec823/async-std-1.5.0/src/utils.rs:243:42
    |
243 |         $($head)* extension_trait!(@ext (#[doc = $d]) $($tail)*);
    |                                          ^^^^^^^^^^^
    |
    = help: mark blocks that do not contain Rust code as text: ```text

warning: 1 warning emitted

Meta

rustc --version --verbose:

rustc --version --verbose
rustc 1.42.0 (b8cedc004 2020-03-09)
binary: rustc
commit-hash: b8cedc00407a4c56a3bda1ed605c6fc166655447
commit-date: 2020-03-09
host: x86_64-unknown-linux-gnu
release: 1.42.0
LLVM version: 9.0
rustc 1.45.0-nightly (fa51f810e 2020-04-29)
binary: rustc
commit-hash: fa51f810e5b9254904b92660e7280b7d6a46f112
commit-date: 2020-04-29
host: x86_64-unknown-linux-gnu
release: 1.45.0-nightly
LLVM version: 9.0

This is much better in nightly, but the confusing thing - and the reason I'm filing this bug still is that the reported code is outside my crate.

I'm not even sure where in my crate the origin of the problem is :/.

@rbtcollins rbtcollins added the C-bug Category: This is a bug. label May 4, 2020
@JohnTitor JohnTitor added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label May 6, 2020
@jyn514 jyn514 added the E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example label Nov 4, 2020
@jyn514
Copy link
Member

jyn514 commented Nov 4, 2020

@rbtcollins what crate was giving you these errors? Can you put together a small-ish example?

@jackh726
Copy link
Member

Without any source code, I don't think this is possible to reproduce. Given its age, I'm closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants