mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-03 10:47:16 +00:00

In order to expose edition dependent divergences in some tests in the test suite, add explicit `edition` annotations. Some of these tests might require additional work to *avoid* the divergences, as they might have been unintentional. These are not exhaustive changes, purely opportunistic while looking at something else.
17 lines
370 B
Rust
17 lines
370 B
Rust
//@revisions: edition2015 edition2024
|
|
//@[edition2015] edition:2015
|
|
//@[edition2024] edition:2024
|
|
#![feature(impl_trait_in_fn_trait_return)]
|
|
use std::fmt::Debug;
|
|
|
|
fn a<'a>() -> impl Fn(&'a u8) -> (impl Debug + '_) {
|
|
|x| x
|
|
//~^ ERROR expected generic lifetime parameter, found `'_`
|
|
}
|
|
|
|
fn _b<'a>() -> impl Fn(&'a u8) -> (impl Debug + 'a) {
|
|
a()
|
|
}
|
|
|
|
fn main() {}
|