rust/tests/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-96258.rs
2025-06-05 09:20:19 +02:00

18 lines
353 B
Rust

//@ edition: 2015
#![warn(rust_2021_incompatible_closure_captures)]
fn main() {}
pub(crate) struct Numberer {}
impl Numberer {
pub(crate) async fn new(
//~^ ERROR `async fn` is not permitted in Rust 2015
interval: Duration,
//~^ ERROR cannot find type `Duration` in this scope
) -> Numberer {
Numberer {}
}
}