diff options
author | John Hodge <tpg@mutabah.net> | 2016-11-24 12:45:40 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-11-24 12:45:40 +0800 |
commit | b30e0cb052522a03b827e636c1d76219690e3d81 (patch) | |
tree | 55997aa26ff59795574668a65c7d9f659d640ac4 | |
parent | db711beb114c6b494aa5ce60358f7323073fa90d (diff) | |
download | mrust-b30e0cb052522a03b827e636c1d76219690e3d81.tar.gz |
HIR Typecheck Expr - Defer unsize to TraitObject if there are magic parameters
-rw-r--r-- | src/hir_typeck/expr_cs.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/hir_typeck/expr_cs.cpp b/src/hir_typeck/expr_cs.cpp index 1e1997b1..962bf42c 100644 --- a/src/hir_typeck/expr_cs.cpp +++ b/src/hir_typeck/expr_cs.cpp @@ -4264,6 +4264,11 @@ namespace { return false; } + if( best_impl.has_magic_params() ) { + DEBUG("Defer as there were magic parameters"); + return false; + } + // TODO: Get a better way of equating these that doesn't require getting copies of the impl's types context.equate_types(sp, ty_src, best_impl.get_impl_type()); auto args = best_impl.get_trait_params(); |