-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
rustdoc: rustdoc -W help
prints error unless a file argument is given
#88756
Labels
C-bug
Category: This is a bug.
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
E-mentor
Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
Comments
camelid
added
the
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
label
Sep 8, 2021
jyn514
added
the
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
label
Sep 9, 2021
jyn514
added
the
E-mentor
Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
label
Sep 9, 2021
Hi @jyn514 ! |
@inashivb go for it :) |
@rustbot claim |
Dylan-DPC
added a commit
to Dylan-DPC/rust
that referenced
this issue
Mar 24, 2022
…mez,notriddle Fix `rustdoc` argument error This is the fix is corresponding to rust-lang#88756 mentored by ``@jyn514``
Dylan-DPC
added a commit
to Dylan-DPC/rust
that referenced
this issue
Mar 24, 2022
…mez,notriddle Fix `rustdoc` argument error This is the fix is corresponding to rust-lang#88756 mentored by ```@jyn514```
Dylan-DPC
added a commit
to Dylan-DPC/rust
that referenced
this issue
Mar 24, 2022
…mez,notriddle Fix `rustdoc` argument error This is the fix is corresponding to rust-lang#88756 mentored by ````@jyn514````
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-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
E-mentor
Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
Compiler lints can be printed with
rustc -W help
, with no filename arguments given. Unfortunately this doesn't work the same way forrustdoc
:If I pass it an arbitrary file, it will print any errors produced by parsing the file as rust. This includes errors from using
async
without passing--edition 2018
. This part is actually the same asrustc -W help
, in that passing arbitrary files to that produces the same behavior.If I pass it a file that parses cleanly (either 2015 rust, or 2018 rust with
--edition 2018
specified) then and only then willrustdoc -W help
actually print the lint groups. In this way it behaves similarly torustc -W help $filename
in thatrustc
will also print the lint groups when passed a filename that parses cleanly. The difference is thatrustc -W help
doesn't require a filename at all.The simplest workaround here is to type
rustdoc -W help /dev/null
as the empty/dev/null
file does not trigger any parse errors.Potential root cause
It's possible that the root cause here is that calling
rustdoc
with no args produces the same error:Compare this with
rustc
, which prints the help:This suggests that
rustdoc
is checking for filename arguments and erroring out early on, whereasrustc
skips that check and then later interprets "no filename args" as "fallback to help".Meta
The text was updated successfully, but these errors were encountered: