aboutsummaryrefslogtreecommitdiffstats
path: root/askama_derive
diff options
context:
space:
mode:
Diffstat (limited to 'askama_derive')
-rw-r--r--askama_derive/src/generator.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/askama_derive/src/generator.rs b/askama_derive/src/generator.rs
index 938d9dc..a81e6e4 100644
--- a/askama_derive/src/generator.rs
+++ b/askama_derive/src/generator.rs
@@ -57,9 +57,7 @@ impl<'a> Generator<'a> {
// Takes a Context and generates the relevant implementations.
fn build(mut self, ctx: &'a Context) -> String {
let heritage = if !ctx.blocks.is_empty() {
- if ctx.extends.is_some() && self.input.parent.is_none() {
- panic!("expected field '_parent' in extending template struct");
- } else if let Some(parent) = self.input.parent {
+ if let Some(parent) = self.input.parent {
self.deref_to_parent(parent);
}
let heritage = Heritage::new(ctx, self.contexts);