mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-19 19:17:31 +00:00
19 lines
400 B
Rust
19 lines
400 B
Rust
![]() |
//@ check-pass
|
||
|
|
||
|
// Ensure that we skip uncaptured args from RPITITs when collecting the regions
|
||
|
// to enforce member constraints in opaque type inference.
|
||
|
|
||
|
#![feature(precise_capturing_in_traits)]
|
||
|
|
||
|
struct Invariant<T>(*mut T);
|
||
|
|
||
|
trait Foo {
|
||
|
fn hello<'s: 's>(&'s self) -> Invariant<impl Sized + use<Self>>;
|
||
|
}
|
||
|
|
||
|
fn hello<'s, T: Foo>(x: &'s T) -> Invariant<impl Sized> {
|
||
|
x.hello()
|
||
|
}
|
||
|
|
||
|
fn main() {}
|