mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 10:45:18 +00:00
14 lines
320 B
Rust
14 lines
320 B
Rust
//@ build-pass
|
|
// Tests for an LLVM abort when storing a lifetime-parametric fn into
|
|
// context that is expecting one that is not lifetime-parametric
|
|
// (i.e., has no `for <'_>`).
|
|
|
|
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() {}
|