mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
17 lines
337 B
Rust
17 lines
337 B
Rust
// Regression test from https://github.com/rust-lang/rust/pull/98109
|
|
|
|
pub fn negotiate<S>(link: S)
|
|
where
|
|
for<'a> &'a S: 'a,
|
|
{
|
|
|| {
|
|
//~^ ERROR `S` does not live long enough
|
|
//
|
|
// FIXME(#98437). This regressed at some point and
|
|
// probably should work.
|
|
let _x = link;
|
|
};
|
|
}
|
|
|
|
fn main() {}
|