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:
parent
f338900826
commit
3b89679671
7 changed files with 35 additions and 28 deletions
|
@ -13,7 +13,7 @@ declare_lint! {
|
|||
///
|
||||
/// ### Example
|
||||
///
|
||||
/// ```rust
|
||||
/// ```rust,edition2018
|
||||
/// # #![allow(unused)]
|
||||
/// [1, 2, 3].into_iter().for_each(|n| { *n; });
|
||||
/// ```
|
||||
|
|
|
@ -1686,7 +1686,7 @@ declare_lint! {
|
|||
///
|
||||
/// ### Example
|
||||
///
|
||||
/// ```rust
|
||||
/// ```rust,edition2018
|
||||
/// let x = 123;
|
||||
/// match x {
|
||||
/// 0...100 => {}
|
||||
|
|
|
@ -18,7 +18,7 @@ declare_lint! {
|
|||
///
|
||||
/// ### Example
|
||||
///
|
||||
/// ```rust,no_run
|
||||
/// ```rust,no_run,edition2018
|
||||
/// panic!("{}");
|
||||
/// panic!(123);
|
||||
/// ```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue