rust/library/std
bors fe62c6e295 Auto merge of #80300 - LeSeulArtichaut:80275-doc-inline, r=Manishearth
Emit errors/warns on some wrong uses of rustdoc attributes

This PR adds a few diagnostics:
- error if conflicting `#[doc(inline)]`/`#[doc(no_inline)]` are found
- introduce the `invalid_doc_attributes` lint (warn-by-default) which triggers:
  - if a crate-level attribute is used on a non-`crate` item
  - if `#[doc(inline)]`/`#[doc(no_inline)]` is used on a non-`use` item

The 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 the `invalid_doc_attributes` lint)

Closes #80275.
r? `@jyn514`
2021-05-11 05:03:18 +00:00
..
benches
src Auto merge of #80300 - LeSeulArtichaut:80275-doc-inline, r=Manishearth 2021-05-11 05:03:18 +00:00
tests
build.rs
Cargo.toml Auto merge of #83776 - jyn514:update-stdarch-docs, r=Amanieu 2021-04-12 18:29:25 +00:00