2025-02-09 19:09:43 +00:00
|
|
|
//@ edition: 2024
|
2023-10-19 19:01:59 +00:00
|
|
|
|
|
|
|
|
#![feature(rustc_attrs)]
|
|
|
|
|
#![allow(internal_features)]
|
|
|
|
|
#![rustc_variance_of_opaques]
|
|
|
|
|
|
|
|
|
|
use std::ops::Deref;
|
|
|
|
|
|
2025-04-05 19:19:56 +03:00
|
|
|
fn foo(x: Vec<i32>) -> Box<dyn for<'a> Deref<Target = impl ?Sized>> { //~ ERROR ['a: o]
|
2025-02-09 19:09:43 +00:00
|
|
|
//~^ ERROR cannot capture higher-ranked lifetime
|
2023-10-19 19:01:59 +00:00
|
|
|
Box::new(x)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {}
|