diff options
author | Emilio Cobos Álvarez <emilio@crisal.io> | 2017-05-20 01:10:13 +0200 |
---|---|---|
committer | Emilio Cobos Álvarez <emilio@crisal.io> | 2017-05-20 03:32:38 +0200 |
commit | 44f68587e4635df5661e64f03dd2dd4d9a3ebd30 (patch) | |
tree | 63e3fa2d52fedcdeb7bc4c99859af2b9866c52fa /src/codegen/mod.rs | |
parent | 25150ca64f8009ac53829a2daa031c8723684523 (diff) |
codegen: Reuse the next_child_local_id hack for template instantiations.
This should be good enough, following the pattern of anonymous items, and should
prevent most of the current noise in stylo updates.
Closes #620
Fixes #619
Diffstat (limited to 'src/codegen/mod.rs')
-rw-r--r-- | src/codegen/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/codegen/mod.rs b/src/codegen/mod.rs index 06e3a4f6..2f8ad805 100644 --- a/src/codegen/mod.rs +++ b/src/codegen/mod.rs @@ -760,8 +760,8 @@ impl CodeGenerator for TemplateInstantiation { let name = item.canonical_name(ctx); let fn_name = format!("__bindgen_test_layout_{}_instantiation_{}", - name, - item.id().as_usize()); + name, item.exposed_id(ctx)); + let fn_name = ctx.rust_ident_raw(&fn_name); let prefix = ctx.trait_prefix(); |