You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Snippet from some internal documentation I'm writing:
//! - References?//! - Unsound. See this example://! ```compile_fail//! # use core::mem::MaybeUninit;//! let mut a = 0;//! let b = maybe_uninit_ext::new::<&mut MaybeUninit<u8>>(&mut a);//! *b = maybe_uninit_ext::uninit();//! assert_eq!(a, 0); // undefined behavior! a is uninitialized.//! ```//! Due to interior mutability, this is an issue for immutable references//! as well.
Actual result
//! - References?//! - Unsound. See this example: ```compile_fail # use core::mem::MaybeUninit;//! let mut a = 0; let b = maybe_uninit_ext::new::<&mut//! MaybeUninit<u8>>(&mut a); *b = maybe_uninit_ext::uninit(); assert_eq!(a,//! 0); // undefined behavior! a is uninitialized. ``` Due to interior//! mutability, this is an issue for immutable references as well.
Expected result
The code block should be preserved.
The text was updated successfully, but these errors were encountered:
This is a limitation of how rustfmt handles markdown. rustfmt has an extremely basic understanding of markdown constructs like headers, lists, blockquotes, and code blocks.
Once rustfmt identifies that it's formatting a bulleted list it considers everything else to be text and is no longer searching for code blocks to format.
With
rustfmt 1.5.2-nightly (88fb1b92 2023-04-10)
:Input code
Snippet from some internal documentation I'm writing:
Actual result
Expected result
The code block should be preserved.
The text was updated successfully, but these errors were encountered: