about summary refs log tree commit diff
path: root/src/test/incremental/thinlto
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2018-03-13 00:54:33 +0800
committerGitHub <noreply@github.com>2018-03-13 00:54:33 +0800
commit34d9ffec17b820a5ec7d609e1022f72314f9c3b8 (patch)
tree35251914cef13e04fcd342d1c2725bb08367ca17 /src/test/incremental/thinlto
parent14574db7931285af2d3316dff8e726ca8eccf862 (diff)
parentc033c6e47c1a84e2902c75a1b5ec161362f34f18 (diff)
downloadrust-34d9ffec17b820a5ec7d609e1022f72314f9c3b8.tar.gz
rust-34d9ffec17b820a5ec7d609e1022f72314f9c3b8.zip
Rollup merge of #48934 - Phlosioneer:42453-debug-hygene, r=petrochenkov
Fix hygene issue when deriving Debug

The code for several of the core traits doesn't use hygenic macros.
This isn't a problem, except for the Debug trait, which is the only
one that uses a variable, named "builder".

Variables can't share names with unit structs, so attempting to
[derive(Debug)] on any type while a unit struct with the name
"builder" was in scope would result in an error.

This commit just changes the name of the variable to
"__debug_trait_builder", because I couldn't figure out how to get a
list of all unit structs in-scope from within the derive expansion
function. If someone wants to have a unit struct with
the exact name "__debug_trait_builder", they'll just have to do it
without a [derive(Debug)].

I also checked the implementations of the other built-in derives to
ensure they didn't declare any variables.
Diffstat (limited to 'src/test/incremental/thinlto')
0 files changed, 0 insertions, 0 deletions