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.
26 lines
583 B
Rust
26 lines
583 B
Rust
//@revisions: edition2015 edition2024
|
|
//@[edition2015] edition:2015
|
|
//@[edition2024] edition:2024
|
|
trait Trait<'a> {
|
|
type Out;
|
|
fn call(&'a self) -> Self::Out;
|
|
}
|
|
|
|
struct X(());
|
|
|
|
impl<'a> Trait<'a> for X {
|
|
type Out = ();
|
|
fn call(&'a self) -> Self::Out {
|
|
()
|
|
}
|
|
}
|
|
|
|
fn f() -> impl for<'a> Trait<'a, Out = impl Sized + 'a> {
|
|
//~^ ERROR `impl Trait` cannot capture higher-ranked lifetime from outer `impl Trait`
|
|
//[edition2024]~^^ ERROR `impl Trait` cannot capture higher-ranked lifetime from outer `impl Trait`
|
|
X(())
|
|
}
|
|
|
|
fn main() {
|
|
let _ = f();
|
|
}
|