about summary refs log tree commit diff
path: root/tests/ui/lifetimes/issue-36744-without-calls.rs
blob: def88453b6c2ddb129fb666de219e6aa6d5c3ac5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
//@ 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() {}