]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #54517 - mcr431:53956-panic-on-include_bytes-of-own-file, r=michaelwoer...
authorbors <bors@rust-lang.org>
Thu, 6 Dec 2018 01:36:51 +0000 (01:36 +0000)
committerbors <bors@rust-lang.org>
Thu, 6 Dec 2018 01:36:51 +0000 (01:36 +0000)
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.

1  2 
src/librustdoc/clean/mod.rs
src/libsyntax/parse/lexer/mod.rs
src/libsyntax/parse/mod.rs
src/test/run-pass-fulldeps/ast_stmt_expr_attr.rs

Simple merge
Simple merge
Simple merge