aboutsummaryrefslogtreecommitdiffstats
path: root/askama_derive/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--askama_derive/src/generator.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/askama_derive/src/generator.rs b/askama_derive/src/generator.rs
index 8f0b7b3..c6c5d10 100644
--- a/askama_derive/src/generator.rs
+++ b/askama_derive/src/generator.rs
@@ -1579,6 +1579,16 @@ impl<'a> Generator<'a> {
}
buf.write(name);
}
+ Target::OrChain(targets) => match targets.first() {
+ None => buf.write("_"),
+ Some(first_target) => {
+ self.visit_target(buf, initialized, first_level, first_target);
+ for target in &targets[1..] {
+ buf.write(" | ");
+ self.visit_target(buf, initialized, first_level, target);
+ }
+ }
+ },
Target::Tuple(path, targets) => {
buf.write(&path.join("::"));
buf.write("(");