turn errors with external docs into actual errors

This commit is contained in:
QuietMisdreavus 2017-12-19 15:04:03 -06:00
parent 5a0dc2d06d
commit 06fbd599cf

View file

@ -1111,7 +1111,7 @@ impl<'a, 'b> Folder for InvocationCollector<'a, 'b> {
match File::open(&filename).and_then(|mut f| f.read_to_end(&mut buf)) {
Ok(..) => {}
Err(e) => {
self.cx.span_warn(at.span,
self.cx.span_err(at.span,
&format!("couldn't read {}: {}",
filename.display(),
e));
@ -1133,7 +1133,7 @@ impl<'a, 'b> Folder for InvocationCollector<'a, 'b> {
attr::mk_list_item("include".into(), include_info))));
}
Err(_) => {
self.cx.span_warn(at.span,
self.cx.span_err(at.span,
&format!("{} wasn't a utf-8 file",
filename.display()));
}