Adjust documentation for compatibility with 2021

This also adjusts the lint docs generation to accept (and ignore) an allow
attribute, rather than expecting the documentation to be immediately followed by
the lint name.
This commit is contained in:
Mark Rousskov 2021-09-20 08:46:26 -04:00
parent f338900826
commit 3b89679671
7 changed files with 35 additions and 28 deletions

View file

@ -13,7 +13,7 @@ declare_lint! {
///
/// ### Example
///
/// ```rust
/// ```rust,edition2018
/// # #![allow(unused)]
/// [1, 2, 3].into_iter().for_each(|n| { *n; });
/// ```

View file

@ -1686,7 +1686,7 @@ declare_lint! {
///
/// ### Example
///
/// ```rust
/// ```rust,edition2018
/// let x = 123;
/// match x {
/// 0...100 => {}

View file

@ -18,7 +18,7 @@ declare_lint! {
///
/// ### Example
///
/// ```rust,no_run
/// ```rust,no_run,edition2018
/// panic!("{}");
/// panic!(123);
/// ```