From 9e0e4c31aa88e5d510fdd0742808ec95329470e4 Mon Sep 17 00:00:00 2001 From: Andrew Xie Date: Wed, 12 Apr 2023 18:03:11 -0400 Subject: Added diagnostic for pin! macro in addition to Box::pin if Unpin isn't implemented --- library/core/src/marker.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'library/core/src') diff --git a/library/core/src/marker.rs b/library/core/src/marker.rs index 62064f1aa6c..3cd4f5104ce 100644 --- a/library/core/src/marker.rs +++ b/library/core/src/marker.rs @@ -823,7 +823,7 @@ unsafe impl Freeze for &mut T {} /// [`pin` module]: crate::pin #[stable(feature = "pin", since = "1.33.0")] #[rustc_on_unimplemented( - note = "consider using `Box::pin`", + note = "consider using the `pin!` macro\nconsider using `Box::pin` if you need to access the pinned value outside of the current scope", message = "`{Self}` cannot be unpinned" )] #[lang = "unpin"] -- cgit 1.4.1-3-g733a5