From 7b6245082128645c33f96fea49509c687c0785c7 Mon Sep 17 00:00:00 2001 From: Nick Fitzgerald Date: Tue, 4 Apr 2017 14:31:43 -0700 Subject: 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. --- src/ir/template.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 = -- cgit v1.2.3