From 7e77972d71967c65e5446e55673869ef2a8d27bb Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Fri, 12 Aug 2022 17:07:32 +0300 Subject: feat(tvix/eval): add mechanism for emitting warnings from compiler These can be used predominantly to emit warnings about things that the compiler can infer, such as deprecated language features. Change-Id: I3649c625459d7f3f95cdf42d5c651d23d66569ec Reviewed-on: https://cl.tvl.fyi/c/depot/+/6174 Reviewed-by: grfn Tested-by: BuildkiteCI --- tvix/eval/src/warnings.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 tvix/eval/src/warnings.rs (limited to 'tvix/eval/src/warnings.rs') diff --git a/tvix/eval/src/warnings.rs b/tvix/eval/src/warnings.rs new file mode 100644 index 0000000000..4406d05106 --- /dev/null +++ b/tvix/eval/src/warnings.rs @@ -0,0 +1,11 @@ +/// Warnings are emitted in cases where code passed to Tvix exhibits +/// problems that the user could address. + +#[derive(Debug)] +pub enum WarningKind {} + +#[derive(Debug)] +pub struct EvalWarning { + pub node: rnix::SyntaxNode, + pub kind: WarningKind, +} -- cgit 1.4.1