mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 15:01:51 +00:00
19 lines
342 B
Rust
19 lines
342 B
Rust
// Test that we consider `for<'a> &'a T: 'a` to be sufficient to prove
|
|
// that `for<'a> &'a T: 'a`.
|
|
//
|
|
// FIXME. Except we don't!
|
|
|
|
#![allow(warnings)]
|
|
|
|
fn self_wf2<T>()
|
|
where
|
|
for<'a> &'a T: 'a,
|
|
{
|
|
self_wf2::<T>();
|
|
//~^ ERROR `T` does not live long enough
|
|
//
|
|
// FIXME. This ought to be accepted, presumably.
|
|
}
|
|
|
|
fn main() {}
|