diff options
Diffstat (limited to '')
-rw-r--r-- | askama_derive/src/input.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/askama_derive/src/input.rs b/askama_derive/src/input.rs index 72d5d20..c23d30f 100644 --- a/askama_derive/src/input.rs +++ b/askama_derive/src/input.rs @@ -4,6 +4,7 @@ use quote::ToTokens; use askama_shared::{Config, Syntax}; +use std::io::{self, Write}; use std::path::PathBuf; use syn; @@ -144,6 +145,15 @@ impl<'a> TemplateInput<'a> { _ => None, }; + if parent.is_some() { + io::stderr() + .write_fmt(format_args!( + " --> in struct {}\n = use of deprecated field '_parent'\n", + ast.ident + )) + .unwrap(); + } + // Validate syntax let syntax = syntax.map_or_else( || config.syntaxes.get(config.default_syntax).unwrap(), |