rust/tests/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-96258.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
383 B
Rust
Raw Normal View History

2023-06-25 01:49:38 +00:00
#![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
2023-06-25 01:49:38 +00:00
) -> Numberer { //~WARN: changes to closure capture in Rust 2021
Numberer {}
}
}