// We can safely ignore synthetic `SourceFile`s.
let file = match item.span(self.tcx()).filename(self.sess()) {
- FileName::Real(ref path) => path.local_path().to_path_buf(),
+ FileName::Real(ref path) => path.local_path_if_available().to_path_buf(),
_ => return None,
};
let file = &file;
} = options;
let src_root = match krate.src {
- FileName::Real(ref p) => match p.local_path().parent() {
+ FileName::Real(ref p) => match p.local_path_if_available().parent() {
Some(p) => p.to_path_buf(),
None => PathBuf::new(),
},