]> git.proxmox.com Git - rustc.git/blame - src/test/ui/nll/ty-outlives/impl-trait-captures.stderr
New upstream version 1.66.0+dfsg1
[rustc.git] / src / test / ui / nll / ty-outlives / impl-trait-captures.stderr
CommitLineData
2b03887a 1error[E0700]: hidden type for `Opaque(DefId(0:13 ~ impl_trait_captures[1afc]::foo::{opaque#0}), [ReStatic, T, ReEarlyBound(0, 'a)])` captures lifetime that does not appear in bounds
5e7ed085 2 --> $DIR/impl-trait-captures.rs:11:5
ff7c6d11 3 |
532ac7d7 4LL | fn foo<'a, T>(x: &T) -> impl Foo<'a> {
2b03887a 5 | -- hidden type `&ReFree(DefId(0:8 ~ impl_trait_captures[1afc]::foo), BrNamed(DefId(0:12 ~ impl_trait_captures[1afc]::foo::'_), '_)) T` captures the anonymous lifetime defined here
5e7ed085
FG
6LL | x
7 | ^
e74abb32 8 |
2b03887a 9help: to declare that `Opaque(DefId(0:13 ~ impl_trait_captures[1afc]::foo::{opaque#0}), [ReEarlyBound(0, 'a), T, ReEarlyBound(2, 'a)])` captures `ReFree(DefId(0:8 ~ impl_trait_captures[1afc]::foo), BrNamed(DefId(0:12 ~ impl_trait_captures[1afc]::foo::'_), '_))`, you can add an explicit `ReFree(DefId(0:8 ~ impl_trait_captures[1afc]::foo), BrNamed(DefId(0:12 ~ impl_trait_captures[1afc]::foo::'_), '_))` lifetime bound
b7449926 10 |
2b03887a 11LL | fn foo<'a, T>(x: &T) -> impl Foo<'a> + ReFree(DefId(0:8 ~ impl_trait_captures[1afc]::foo), BrNamed(DefId(0:12 ~ impl_trait_captures[1afc]::foo::'_), '_)) {
064997fb 12 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
ff7c6d11
XL
13
14error: aborting due to previous error
15
3c0e092e 16For more information about this error, try `rustc --explain E0700`.