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
..
2021-04-30 07:28:40 -07:00
2021-05-09 16:07:00 +02:00
2021-05-02 17:46:00 -06:00
2021-05-08 10:58:08 +02:00
2021-04-28 20:51:32 -05:00
2021-05-06 02:49:34 +00:00
2021-05-06 02:49:34 +00:00
2021-05-02 04:01:45 -04:00
2021-05-04 08:41:40 -07:00
2021-05-02 17:46:00 -06:00
2021-05-06 02:49:34 +00:00