]> git.proxmox.com Git - rustc.git/blame_incremental - 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
1// compile-flags:-Zverbose
2
3#![allow(warnings)]
4
5trait Foo<'a> {
6}
7
8impl<'a, T> Foo<'a> for T { }
9
10fn foo<'a, T>(x: &T) -> impl Foo<'a> {
11 x
12 //~^ ERROR captures lifetime that does not appear in bounds
13}
14
15fn main() {}