提交 010c3e25 编写于 作者: B bors

Auto merge of #39340 - GuillaumeGomez:empty_comment, r=frewsxcv

Don't generate doc if doc comments only filled with 'white' characters

Fixes #39339.

r? @steveklabnik

cc @rust-lang/docs
......@@ -237,8 +237,9 @@ pub fn render(w: &mut fmt::Formatter,
let my_opaque: &MyOpaque = &*((*opaque).opaque as *const MyOpaque);
let text = (*orig_text).as_bytes();
let origtext = str::from_utf8(text).unwrap();
let origtext = origtext.trim_left();
debug!("docblock: ==============\n{:?}\n=======", text);
let rendered = if lang.is_null() {
let rendered = if lang.is_null() || origtext.is_empty() {
false
} else {
let rlang = (*lang).as_bytes();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册