We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b63c4ab commit 9fe3a19Copy full SHA for 9fe3a19
core/src/cell.rs
@@ -1893,7 +1893,8 @@ impl<T: ?Sized + fmt::Display> fmt::Display for RefMut<'_, T> {
1893
/// on an _exclusive_ `UnsafeCell<T>`. Even though `T` and `UnsafeCell<T>` have the
1894
/// same memory layout, the following is not allowed and undefined behavior:
1895
///
1896
-/// ```rust,no_run
+#[cfg_attr(bootstrap, doc = "```rust,no_run")]
1897
+#[cfg_attr(not(bootstrap), doc = "```rust,compile_fail")]
1898
/// # use std::cell::UnsafeCell;
1899
/// unsafe fn not_allowed<T>(ptr: &UnsafeCell<T>) -> &mut T {
1900
/// let t = ptr as *const UnsafeCell<T> as *mut T;
0 commit comments