mirror of
https://github.com/rust-lang/rust-clippy
synced 2025-02-26 04:17:21 +00:00
Fix examples
This commit is contained in:
parent
139f2a3cda
commit
b7d9af278c
1 changed files with 8 additions and 1 deletions
|
@ -69,13 +69,20 @@ declare_clippy_lint! {
|
||||||
///
|
///
|
||||||
/// ### Example
|
/// ### Example
|
||||||
/// ```rust
|
/// ```rust
|
||||||
/// async fn foo() -> Result<(), ()> { }
|
/// async fn foo() -> Result<(), ()> {
|
||||||
|
/// Ok(())
|
||||||
|
/// }
|
||||||
/// let _ = foo();
|
/// let _ = foo();
|
||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
/// Use instead:
|
/// Use instead:
|
||||||
/// ```rust
|
/// ```rust
|
||||||
|
/// # async fn context() {
|
||||||
|
/// async fn foo() -> Result<(), ()> {
|
||||||
|
/// Ok(())
|
||||||
|
/// }
|
||||||
/// let _ = foo().await;
|
/// let _ = foo().await;
|
||||||
|
/// # }
|
||||||
/// ```
|
/// ```
|
||||||
#[clippy::version = "1.66"]
|
#[clippy::version = "1.66"]
|
||||||
pub LET_UNDERSCORE_FUTURE,
|
pub LET_UNDERSCORE_FUTURE,
|
||||||
|
|
Loading…
Add table
Reference in a new issue