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
Return a String from collapsed_doc_value, not an Option
This has almost no effect in practice, since most places were using `unwrap_or_default`,
and the rest were doing checks that *should* have been checking for an empty string.
The only change in behavior is that the JSON backend no longer distinguishes
"undocumented" and "documented with the empty string". This doesn't seem like a particularly useful distinction,
but I can add it back for that code only if you think it's important.
Copy file name to clipboardExpand all lines: src/rustdoc-json-types/lib.rs
+3-4Lines changed: 3 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -68,9 +68,8 @@ pub struct Item {
68
68
/// By default all documented items are public, but you can tell rustdoc to output private items
69
69
/// so this field is needed to differentiate.
70
70
pubvisibility:Visibility,
71
-
/// The full markdown docstring of this item. Absent if there is no documentation at all,
72
-
/// Some("") if there is some documentation but it is empty (EG `#[doc = ""]`).
73
-
pubdocs:Option<String>,
71
+
/// The full markdown docstring of this item.
72
+
pubdocs:String,
74
73
/// This mapping resolves [intra-doc links](https://github.com/rust-lang/rfcs/blob/master/text/1946-intra-rustdoc-links.md) from the docstring to their IDs
75
74
publinks:HashMap<String,Id>,
76
75
/// Stringified versions of the attributes on this item (e.g. `"#[inline]"`)
0 commit comments