diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-36744-without-calls.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-36744-without-calls.rs b/src/test/ui/issues/issue-36744-without-calls.rs new file mode 100644 index 000000000..dc5dc4f13 --- /dev/null +++ b/src/test/ui/issues/issue-36744-without-calls.rs @@ -0,0 +1,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() {} |