]> git.proxmox.com Git - rustc.git/blame - src/test/ui/issues/issue-14285.rs
New upstream version 1.60.0+dfsg1
[rustc.git] / src / test / ui / issues / issue-14285.rs
CommitLineData
85aaf69f
SL
1trait Foo {
2 fn dummy(&self) { }
3}
223e47cc 4
1a4d82fc 5struct A;
223e47cc 6
1a4d82fc
JJ
7impl Foo for A {}
8
dc9dc135 9struct B<'a>(&'a (dyn Foo + 'a));
223e47cc 10
dc9dc135 11fn foo<'a>(a: &dyn Foo) -> B<'a> {
0731742a 12 B(a) //~ ERROR explicit lifetime required in the type of `a` [E0621]
223e47cc
LB
13}
14
15fn main() {
1a4d82fc 16 let _test = foo(&A);
223e47cc 17}