rust/tests/ui/impl-trait/in-bindings/escaping-bound-var.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
271 B
Rust
Raw Normal View History

2024-12-11 22:18:39 +00:00
#![feature(impl_trait_in_bindings)]
trait Foo<'a> {
type Out;
}
impl<'a> Foo<'a> for () {
type Out = ();
}
fn main() {
let x: &dyn for<'a> Foo<'a, Out = impl Sized + 'a> = &();
//~^ ERROR cannot capture late-bound lifetime in `impl Trait` in binding
}