mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
15 lines
334 B
Rust
15 lines
334 B
Rust
#![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 {}
|
|
}
|
|
}
|