Uh oh!
There was an error while loading. Please reload this page.
Emit errors/warns on some wrong uses of rustdoc attributes - #80300
Conversation
jyn514
commented
Dec 22, 2020
I think this should probably go through FCP - I'll take a look at the code first so the review isn't intermingled with the policy change. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This comment has been minimized.
This comment has been minimized.
Uh oh!
There was an error while loading. Please reload this page.
b790ab6 to
febf1d5Compare
This comment has been minimized.
This comment has been minimized.
febf1d5 to
9209218CompareUh oh!
There was an error while loading. Please reload this page.
GuillaumeGomez
commented
Dec 22, 2020
Also, it could be interesting to add a macro like https://doc.rust-lang.org/nightly/nightly-rustc/rustc_errors/macro.struct_span_err.html for warnings (but without error code). |
9209218 to
9a06773Comparejyn514
commented
Dec 26, 2020
I think that's https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/context/struct.TyCtxt.html#method.struct_span_lint_hir. |
This comment has been minimized.
This comment has been minimized.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
fd06236 to
86abf85Compare
This comment has been minimized.
This comment has been minimized.
46d72f8 to
fe46d75Compare
This comment has been minimized.
This comment has been minimized.
fe46d75 to
b6f1c7fCompare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
b6f1c7f to
2848ea9CompareUh oh!
There was an error while loading. Please reload this page.
jyn514
commented
May 9, 2021
I don't have time to look at this. r? @Manishearth |
Manishearth
left a comment
There was a problem hiding this comment.
Overall looks great, would love to have more doc comments
Uh oh!
There was an error while loading. Please reload this page.
@Manishearth Added a few doc comments in a separate commit. Let me know if you'd want anything else documented. |
Manishearth
commented
May 10, 2021
@bors r+ thanks! |
bors
commented
May 10, 2021
📌 Commit 6e8d0db has been approved by |
bors
commented
May 10, 2021
⌛ Testing commit 6e8d0db with merge ac17b18a35f83579e5f75a8da8a7756f4abc9b17... |
This comment has been minimized.
This comment has been minimized.
bors
commented
May 10, 2021
💔 Test failed - checks-actions |
This is the only case of invalid |
Manishearth
commented
May 11, 2021
@bors r+ |
bors
commented
May 11, 2021
📌 Commit 804ab9f has been approved by |
bors
commented
May 11, 2021
bors
commented
May 11, 2021
☀️ Test successful - checks-actions |
This PR adds a few diagnostics:
#[doc(inline)]/#[doc(no_inline)]are foundinvalid_doc_attributeslint (warn-by-default) which triggers:crateitem#[doc(inline)]/#[doc(no_inline)]is used on a non-useitemThe code could probably be improved but I wanted to get feedback first. Also, some of those changes could be considered breaking changes, so I don't know what the procedure would be?
And finally, for the warnings, they are currently hard warnings, maybe it would be better to introduce a lint?(EDIT: introduced theinvalid_doc_attributeslint)Closes#80275.
r? @jyn514