Rollup merge of #21336 - rylev:better-nofile-error, r=brson
Contribution from @look! Addresses https://github.com/rust-lang/rust/issues/21329
This commit is contained in:
commit
fa0c2c5e46
@ -253,9 +253,10 @@ pub fn file_to_filemap(sess: &ParseSess, path: &Path, spanopt: Option<Span>)
|
||||
let bytes = match File::open(path).read_to_end() {
|
||||
Ok(bytes) => bytes,
|
||||
Err(e) => {
|
||||
err(&format!("couldn't read {:?}: {:?}",
|
||||
let error_msg = e.desc;
|
||||
err(&format!("couldn't read {:?}: {}",
|
||||
path.display(),
|
||||
e)[]);
|
||||
error_msg)[]);
|
||||
unreachable!()
|
||||
}
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user