We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
#[doc = ""]
1 parent 2445f0e commit bdb7223Copy full SHA for bdb7223
src/attr/doc_comment.rs
@@ -12,6 +12,12 @@ impl Display for DocCommentFormatter<'_> {
12
fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
13
let opener = self.style.opener().trim_end();
14
let mut lines = self.literal.lines().peekable();
15
+
16
+ // Handle `#[doc = ""]`.
17
+ if lines.peek().is_none() {
18
+ return write!(formatter, "{}", opener);
19
+ }
20
21
while let Some(line) = lines.next() {
22
let is_last_line = lines.peek().is_none();
23
if is_last_line {
0 commit comments