diff options
author | Nick Fitzgerald <fitzgen@gmail.com> | 2017-04-17 13:23:22 -0700 |
---|---|---|
committer | Nick Fitzgerald <fitzgen@gmail.com> | 2017-04-17 16:01:57 -0700 |
commit | 8fc90585593c011c5a5be03278d6b785db5f16b8 (patch) | |
tree | 30afb8765865b1888add5a2c730c5e8dfa848d52 /src/codegen/mod.rs | |
parent | c6a1e003d792c7067d5f3ec792196d449a9b3bbf (diff) |
Make a builder for item resolution options
We have a couple knobs to turn for item resolution, such as whether we keep
going through type references and type aliases. It makes sense to have a single,
easy place to configure these knobs.
Diffstat (limited to 'src/codegen/mod.rs')
-rw-r--r-- | src/codegen/mod.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/codegen/mod.rs b/src/codegen/mod.rs index 20151fe3..950de02a 100644 --- a/src/codegen/mod.rs +++ b/src/codegen/mod.rs @@ -2647,8 +2647,10 @@ impl TryToRustTy for TemplateInstantiation { // This can happen if we generated an opaque type for a partial // template specialization, and we've hit an instantiation of // that partial specialization. - extra_assert!(ctx.resolve_type_through_type_refs(decl) - .is_opaque()); + extra_assert!(decl.into_resolver() + .through_type_refs() + .resolve(ctx) + .is_opaque(ctx)); return Err(error::Error::InstantiationOfOpaqueType); } }; |