about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--tvix/eval/src/compiler.rs9
-rw-r--r--tvix/eval/src/warnings.rs1
2 files changed, 9 insertions, 1 deletions
diff --git a/tvix/eval/src/compiler.rs b/tvix/eval/src/compiler.rs
index e2d194e8dd..75ea99ea78 100644
--- a/tvix/eval/src/compiler.rs
+++ b/tvix/eval/src/compiler.rs
@@ -680,7 +680,14 @@ impl Compiler {
             match inherit.from() {
                 // Within a `let` binding, inheriting from the outer
                 // scope is practically a no-op.
-                None => continue,
+                None => {
+                    self.warnings.push(EvalWarning {
+                        node: inherit.node().clone(),
+                        kind: WarningKind::UselessInherit,
+                    });
+
+                    continue;
+                }
                 Some(_) => todo!("let inherit from attrs"),
             }
         }
diff --git a/tvix/eval/src/warnings.rs b/tvix/eval/src/warnings.rs
index 44e47793c5..953f93ff46 100644
--- a/tvix/eval/src/warnings.rs
+++ b/tvix/eval/src/warnings.rs
@@ -4,6 +4,7 @@
 #[derive(Debug)]
 pub enum WarningKind {
     DeprecatedLiteralURL,
+    UselessInherit,
 }
 
 #[derive(Debug)]