about summary refs log tree commit diff
path: root/tests/ui/impl-trait/implicit-capture-late.rs
blob: 57a00357c711d0a517489e5ac59899603f277169 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//@ edition: 2024

#![feature(rustc_attrs)]
#![allow(internal_features)]
#![rustc_variance_of_opaques]

use std::ops::Deref;

fn foo(x: Vec<i32>) -> Box<dyn for<'a> Deref<Target = impl ?Sized>> { //~ ERROR ['a: o]
    //~^ ERROR cannot capture higher-ranked lifetime
    Box::new(x)
}

fn main() {}