2019-10-29 00:00:00 +00:00
|
|
|
//@ build-pass
|
2016-10-12 19:29:50 +02:00
|
|
|
// Tests for an LLVM abort when storing a lifetime-parametric fn into
|
|
|
|
|
// context that is expecting one that is not lifetime-parametric
|
2018-11-27 02:59:49 +00:00
|
|
|
// (i.e., has no `for <'_>`).
|
2016-10-12 19:29:50 +02:00
|
|
|
|
|
|
|
|
pub struct A<'a>(&'a ());
|
|
|
|
|
pub struct S<T>(T);
|
|
|
|
|
|
|
|
|
|
pub fn bad<'s>(v: &mut S<fn(A<'s>)>, y: S<for<'b> fn(A<'b>)>) {
|
|
|
|
|
*v = y;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {}
|