about summary refs log tree commit diff
path: root/tvix/eval/src/warnings.rs
blob: 3bae2554cff135f7a667d824182b07f52dab4bd0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
//! Implements warnings that are emitted in cases where code passed to
//! Tvix exhibits problems that the user could address.

#[derive(Debug)]
pub enum WarningKind {
    DeprecatedLiteralURL,
    UselessInherit,
    UnusedBinding,
    ShadowedGlobal(&'static str),

    /// Tvix internal warning for features triggered by users that are
    /// not actually implemented yet.
    NotImplemented(&'static str),
}

#[derive(Debug)]
pub struct EvalWarning {
    pub kind: WarningKind,
    pub span: codemap::Span,
}