mirror of
https://git.proxmox.com/git/rustc
synced 2026-03-28 07:39:16 +00:00
15 lines
335 B
Rust
15 lines
335 B
Rust
#![feature(precise_capturing_in_traits)]
|
|
|
|
struct Invariant<'a>(&'a mut &'a mut ());
|
|
|
|
trait Trait {
|
|
fn hello(self_: Invariant<'_>) -> impl Sized + use<Self>;
|
|
}
|
|
|
|
impl Trait for () {
|
|
fn hello(self_: Invariant<'_>) -> impl Sized + use<'_> {}
|
|
//~^ ERROR return type captures more lifetimes than trait definition
|
|
}
|
|
|
|
fn main() {}
|