]> git.lizzy.rs Git - rust.git/commit
Rollup merge of #63559 - eddyb:v0-mangling-off-by-1, r=estebank
authorMazdak Farrokhzad <twingoow@gmail.com>
Sat, 17 Aug 2019 09:13:45 +0000 (11:13 +0200)
committerGitHub <noreply@github.com>
Sat, 17 Aug 2019 09:13:45 +0000 (11:13 +0200)
commita053baefebb56b59bd6c40a3ca0726efc18f4209
tree9e2ce2113c54731fea9051ebedf67d7647bba973
parent5e597875b73e651c5dea200754489f426bc39596
parentc1758d5918b8c5e99b34c83e83266dc5f79b0da7
Rollup merge of #63559 - eddyb:v0-mangling-off-by-1, r=estebank

rustc_codegen_utils: account for 1-indexed anonymous lifetimes in v0 mangling.

I don't really understand why `anonymize_late_bound_regions` starts with `BrAnon(1)` instead of `BrAnon(0)`, but it does (maybe @nikomatsakis knows?): https://github.com/rust-lang/rust/blob/c43d03a19f326f4a323569328cc501e86eb6d22e/src/librustc/ty/fold.rs#L696-L712

Thankfully, the mangling format and demangler implementations are fine, and I just needed to offset the anonymized lifetime indices by `1` to get the correct mangling.

cc @alexcrichton @michaelwoerister