diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2018-11-07 19:24:25 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-07 19:24:25 -0500 |
commit | fbc55435c58255a290a413eebeaa359a48ec20c6 (patch) | |
tree | 9cdcce979a6709d3874a4a266c834f065bcd3f5f /src | |
parent | 1a2e2b365f1a5cb4982cbcde6b92742f6bccaa3b (diff) | |
parent | 1088671defd177ce0659ef96f1cf9dcd352d0c69 (diff) |
Auto merge of #1436 - sanxiyn:canonical-path, r=emilio
Use canonical path for type alias loop detection
Fix #1435
Diffstat (limited to 'src')
-rw-r--r-- | src/codegen/mod.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/codegen/mod.rs b/src/codegen/mod.rs index 983ee4dd..34b5b4d9 100644 --- a/src/codegen/mod.rs +++ b/src/codegen/mod.rs @@ -666,6 +666,7 @@ impl CodeGenerator for Type { .through_type_refs() .resolve(ctx); let name = item.canonical_name(ctx); + let path = item.canonical_path(ctx); { let through_type_aliases = inner.into_resolver() @@ -678,7 +679,7 @@ impl CodeGenerator for Type { // typedef struct foo { ... } foo; // // here, and also other more complex cases like #946. - if through_type_aliases.canonical_name(ctx) == name { + if through_type_aliases.canonical_path(ctx) == path { return; } } |