]> git.proxmox.com Git - rustc.git/blame - src/test/ui/nll/ty-outlives/impl-trait-captures.rs
New upstream version 1.63.0+dfsg1
[rustc.git] / src / test / ui / nll / ty-outlives / impl-trait-captures.rs
CommitLineData
923072b8 1// compile-flags:-Zverbose
ff7c6d11 2
9e0c209e 3#![allow(warnings)]
ff7c6d11
XL
4
5trait Foo<'a> {
6}
3157f602 7
ff7c6d11 8impl<'a, T> Foo<'a> for T { }
a7813a04 9
ff7c6d11
XL
10fn foo<'a, T>(x: &T) -> impl Foo<'a> {
11 x
5e7ed085 12 //~^ ERROR captures lifetime that does not appear in bounds
223e47cc 13}
ff7c6d11
XL
14
15fn main() {}