diff options
author | Nick Fitzgerald <fitzgen@gmail.com> | 2017-04-04 14:31:43 -0700 |
---|---|---|
committer | Nick Fitzgerald <fitzgen@gmail.com> | 2017-04-04 14:31:43 -0700 |
commit | 7b6245082128645c33f96fea49509c687c0785c7 (patch) | |
tree | 39b367f354515605967d78038cc097eb867cbad9 | |
parent | 5e38020b84d300b68befa65f73f0335bcd2fdca0 (diff) |
Warn when we can't find a template definition
But only if the type is not a builtin type. If it is a builtin type, then it's
expected that we won't have a definition.
-rw-r--r-- | src/ir/template.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ir/template.rs b/src/ir/template.rs index 18a3f805..3484a9c6 100644 --- a/src/ir/template.rs +++ b/src/ir/template.rs @@ -121,8 +121,14 @@ impl TemplateInstantiation { }); let definition = match definition { - None => return None, Some(def) => def, + None => { + if !ty.declaration().is_builtin() { + warn!("Could not find template definition for template \ + instantiation"); + } + return None + } }; let template_definition = |