mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-19 09:33:36 +00:00
4f5a019d6e
Co-authored-by: Fridtjof Stoldt <xFrednet@gmail.com>
27 lines
386 B
Rust
27 lines
386 B
Rust
#![warn(clippy::large_futures)]
|
|
|
|
fn main() {}
|
|
|
|
pub async fn should_warn() {
|
|
let x = [0u8; 1024];
|
|
async {}.await;
|
|
dbg!(x);
|
|
}
|
|
|
|
pub async fn should_not_warn() {
|
|
let x = [0u8; 1020];
|
|
async {}.await;
|
|
dbg!(x);
|
|
}
|
|
|
|
pub async fn bar() {
|
|
should_warn().await;
|
|
|
|
async {
|
|
let x = [0u8; 1024];
|
|
dbg!(x);
|
|
}
|
|
.await;
|
|
|
|
should_not_warn().await;
|
|
}
|