about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2018-06-09 16:53:36 -0700
committerEsteban Küber <esteban@kuber.com.ar>2018-06-19 15:19:13 -0700
commit776544f011a6a5beccb7923a261b0dcecdd2396a (patch)
tree1324f0d410e2ec3bd75ea5378a79fbc5a39c8a3e /src/libstd
parentb3a1d56ebe34276916f34ffb0fed34d406f73c55 (diff)
downloadrust-776544f011a6a5beccb7923a261b0dcecdd2396a.tar.gz
rust-776544f011a6a5beccb7923a261b0dcecdd2396a.zip
Add message to `rustc_on_unimplemented` attributes in core
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/panic.rs15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/libstd/panic.rs b/src/libstd/panic.rs
index 4b5a063ea73..2c11c262488 100644
--- a/src/libstd/panic.rs
+++ b/src/libstd/panic.rs
@@ -110,8 +110,10 @@ pub use core::panic::{PanicInfo, Location};
 ///
 /// [`AssertUnwindSafe`]: ./struct.AssertUnwindSafe.html
 #[stable(feature = "catch_unwind", since = "1.9.0")]
-#[rustc_on_unimplemented = "the type {Self} may not be safely transferred \
-                            across an unwind boundary"]
+#[rustc_on_unimplemented(
+    message="the type `{Self}` may not be safely transferred across an unwind boundary",
+    label="`{Self}` may not be safely transferred across an unwind boundary",
+)]
 pub auto trait UnwindSafe {}
 
 /// A marker trait representing types where a shared reference is considered
@@ -126,9 +128,12 @@ pub auto trait UnwindSafe {}
 /// [`UnsafeCell`]: ../cell/struct.UnsafeCell.html
 /// [`UnwindSafe`]: ./trait.UnwindSafe.html
 #[stable(feature = "catch_unwind", since = "1.9.0")]
-#[rustc_on_unimplemented = "the type {Self} may contain interior mutability \
-                            and a reference may not be safely transferrable \
-                            across a catch_unwind boundary"]
+#[rustc_on_unimplemented(
+    message="the type `{Self}` may contain interior mutability and a reference may not be safely \
+             transferrable across a catch_unwind boundary",
+    label="`{Self}` may contain interior mutability and a reference may not be safely \
+           transferrable across a catch_unwind boundary",
+)]
 pub auto trait RefUnwindSafe {}
 
 /// A simple wrapper around a type to assert that it is unwind safe.