From 8ba24aedd971b8b76aa559e266fb6d0d9a3a686f Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Thu, 15 Dec 2022 15:04:23 +0900 Subject: [PATCH] Add regression test for #55976 Signed-off-by: Yuki Okushi --- src/test/ui/codegen/issue-55976.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/test/ui/codegen/issue-55976.rs diff --git a/src/test/ui/codegen/issue-55976.rs b/src/test/ui/codegen/issue-55976.rs new file mode 100644 index 0000000000000..3142704b78cf6 --- /dev/null +++ b/src/test/ui/codegen/issue-55976.rs @@ -0,0 +1,13 @@ +// run-pass +// ^-- The above is needed as this issue is related to LLVM/codegen. +// min-llvm-version:15.0.0 +// ^-- The above is needed as this issue is fixed by the opaque pointers. + +fn main() { + type_error(|x| &x); +} + +fn type_error( + _selector: for<'a> fn(&'a Vec Fn(&'b u8)>>) -> &'a Vec>, +) { +}