We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
compile_fail
io::Error: !UnwindSafe
1 parent c763f06 commit 72bc4aeCopy full SHA for 72bc4ae
library/std/src/io/error/repr_bitpacked.rs
@@ -115,6 +115,15 @@ const TAG_CUSTOM: usize = 0b01;
115
const TAG_OS: usize = 0b10;
116
const TAG_SIMPLE: usize = 0b11;
117
118
+/// The internal representation.
119
+///
120
+/// See the module docs for more, this is just a way to hack in a check that we
121
+/// indeed are not unwind-safe.
122
123
+/// ```compile_fail
124
+/// fn is_unwind_safe<T: core::panic::UnwindSafe>() {}
125
+/// is_unwind_safe::<std::io::Error>();
126
+/// ```
127
#[repr(transparent)]
128
pub(super) struct Repr(NonNull<()>, PhantomData<ErrorData<Box<Custom>>>);
129
0 commit comments