22 lines
748 B
Rust
22 lines
748 B
Rust
|
|
//@ check-pass
|
||
|
|
// FIXME(-Znext-solver): enable this test
|
||
|
|
|
||
|
|
// These functions currently does not normalize the opaque type but will do
|
||
|
|
// so in the future. At this point we've got a new use of the opaque will fully
|
||
|
|
// universal arguments but for which lifetimes in the hidden type are unconstrained.
|
||
|
|
//
|
||
|
|
// Applying the member constraints would then incompletely infer `'unconstrained` to `'static`.
|
||
|
|
fn new_defining_use<F: FnOnce(T) -> R, T, R>(_: F) {}
|
||
|
|
|
||
|
|
fn rpit1<'a, 'b: 'b>(x: &'b ()) -> impl Sized + use<'a, 'b> {
|
||
|
|
new_defining_use(rpit1::<'a, 'b>);
|
||
|
|
x
|
||
|
|
}
|
||
|
|
|
||
|
|
struct Inv<'a, 'b>(*mut (&'a (), &'b ()));
|
||
|
|
fn rpit2<'a>(_: ()) -> impl Sized + use<'a> {
|
||
|
|
new_defining_use(rpit2::<'a>);
|
||
|
|
Inv::<'a, 'static>(std::ptr::null_mut())
|
||
|
|
}
|
||
|
|
fn main() {}
|