From 218caa410aa38c29984be31a5229b9fa717560ee Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:13 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- .../coerce-unsafe-closure-to-unsafe-fn-ptr.thir.stderr | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 tests/ui/closures/coerce-unsafe-closure-to-unsafe-fn-ptr.thir.stderr (limited to 'tests/ui/closures/coerce-unsafe-closure-to-unsafe-fn-ptr.thir.stderr') diff --git a/tests/ui/closures/coerce-unsafe-closure-to-unsafe-fn-ptr.thir.stderr b/tests/ui/closures/coerce-unsafe-closure-to-unsafe-fn-ptr.thir.stderr new file mode 100644 index 000000000..8c516e890 --- /dev/null +++ b/tests/ui/closures/coerce-unsafe-closure-to-unsafe-fn-ptr.thir.stderr @@ -0,0 +1,11 @@ +error[E0133]: call to unsafe function `Pin::

::new_unchecked` is unsafe and requires unsafe function or block + --> $DIR/coerce-unsafe-closure-to-unsafe-fn-ptr.rs:5:31 + | +LL | let _: unsafe fn() = || { ::std::pin::Pin::new_unchecked(&0_u8); }; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function + | + = note: consult the function's documentation for information on how to avoid undefined behavior + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0133`. -- cgit v1.2.3