mirror of
https://github.com/rust-lang/rust.git
synced 2025-09-28 13:46:03 +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.
12 lines
427 B
Rust
12 lines
427 B
Rust
//@revisions: edition2015 edition2024
|
|
//@[edition2015] edition:2015
|
|
//@[edition2024] edition:2024
|
|
#![feature(impl_trait_in_fn_trait_return)]
|
|
use std::fmt::Debug;
|
|
|
|
fn a() -> impl Fn(&u8) -> impl Debug { //[edition2024]~ ERROR `impl Trait` cannot capture higher-ranked lifetime from outer `impl Trait`
|
|
|x| x //[edition2015]~ ERROR hidden type for `impl Debug` captures lifetime that does not appear in bounds
|
|
}
|
|
|
|
fn main() {}
|