mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-02 04:57:35 +00:00
15 lines
271 B
Rust
15 lines
271 B
Rust
![]() |
#![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
|
||
|
}
|