Remove dependency on error handling from find_testable_code
This commit is contained in:
parent
de5cebdba5
commit
03e34f8f81
3 changed files with 24 additions and 13 deletions
|
@ -687,10 +687,12 @@ impl<'a, 'hir> HirCollector<'a, 'hir> {
|
|||
// the collapse-docs pass won't combine sugared/raw doc attributes, or included files with
|
||||
// anything else, this will combine them for us
|
||||
if let Some(doc) = attrs.collapsed_doc_value() {
|
||||
markdown::find_testable_code(&doc,
|
||||
self.collector,
|
||||
attrs.span.unwrap_or(DUMMY_SP),
|
||||
self.sess.diagnostic());
|
||||
self.collector.set_position(attrs.span.unwrap_or(DUMMY_SP));
|
||||
let res = markdown::find_testable_code(&doc, self.collector);
|
||||
if let Err(err) = res {
|
||||
self.sess.diagnostic().span_warn(attrs.span.unwrap_or(DUMMY_SP),
|
||||
&err.to_string());
|
||||
}
|
||||
}
|
||||
|
||||
nested(self);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue