1
Fork 0

Auto merge of #54517 - mcr431:53956-panic-on-include_bytes-of-own-file, r=michaelwoerister

53956 panic on include bytes of own file

fix #53956

When using `include_bytes!` on a source file in the project, compiler would panic on subsequent compilations because `expand_include_bytes` would overwrite files in the source_map with no source. This PR changes `expand_include_bytes` to check source_map and use the already existing src, if any.
This commit is contained in:
bors 2018-12-06 01:36:51 +00:00
commit 1839c144bc
21 changed files with 180 additions and 119 deletions

View file

@ -3008,7 +3008,7 @@ pub struct Span {
impl Span {
pub fn empty() -> Span {
Span {
filename: FileName::Anon,
filename: FileName::Anon(0),
loline: 0, locol: 0,
hiline: 0, hicol: 0,
}