diff options
Diffstat (limited to 'tvix/eval/src')
-rw-r--r-- | tvix/eval/src/compiler.rs | 9 | ||||
-rw-r--r-- | tvix/eval/src/warnings.rs | 1 |
2 files changed, 9 insertions, 1 deletions
diff --git a/tvix/eval/src/compiler.rs b/tvix/eval/src/compiler.rs index e2d194e8ddbb..75ea99ea787c 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 44e47793c5dd..953f93ff467e 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)] |