about summary refs log tree commit diff
path: root/src/test/run-pass/thinlto
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-11-18 19:21:47 -0800
committerGitHub <noreply@github.com>2016-11-18 19:21:47 -0800
commit49d3fd3b38cd838b241858baaaa6162666badba1 (patch)
treea09068946f0e895c38a65086ae7b9241eec30fce /src/test/run-pass/thinlto
parentac635aa95ba851898e125b047ad7b8d6a8fecf8e (diff)
parentc722a1eb9992ac76f5c3dd0aee36b8734d613f11 (diff)
downloadrust-49d3fd3b38cd838b241858baaaa6162666badba1.tar.gz
rust-49d3fd3b38cd838b241858baaaa6162666badba1.zip
Auto merge of #37787 - michaelwoerister:macro-def-ich, r=nikomatsakis
ICH: Handle MacroDef HIR instances.

As of recently, `hir::MacroDef` instances are exported in crate metadata, which means we also store their ICH when doing incremental compilation. Even though exported macro definitions should not (yet) interact with incremental compilation, the ICH is also used for the general purpose crate hash, where macros should be included.

This PR implements ICH computation for `MacroDef`. In theory, the ICH of these MacroDefs is less stable than that of other HIR items, since I opted to just call the compiler-generated `Hash::hash()` for `Token::Interpolated` variants. `Token::Interpolated` contains AST data structures and it would have been a lot of effort to expand ICH computation to the AST too. Since quasi-quoting is rarely used *and* it would only make a difference if incremental compilation was extended to macros, the simpler implementation seemed like a good idea.

This fixes the problem reported in https://github.com/rust-lang/rust/issues/37756. The test still fails because of broken codegen-unit support though.

r? @nikomatsakis
Diffstat (limited to 'src/test/run-pass/thinlto')
0 files changed, 0 insertions, 0 deletions