about summary refs log tree commit diff
path: root/tvix/eval/src/warnings.rs
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2023-01-23T17·28+0300
committerclbot <clbot@tvl.fyi>2023-01-23T17·59+0000
commit9ecf6684526a0f82476234ee8feea56a442f6c0e (patch)
tree780166b458d1b202dca07c65b6c633b87086384c /tvix/eval/src/warnings.rs
parentd2f1a290a43f7a337ddfed78e382bf6c13d798c1 (diff)
chore(tvix/eval): delete "useless parenthesis" warning/optimisation r/5747
Two main reasons:

1. Traversing the structure to do this optimisation is
   actually *slower* than not optimising it.

2. There are literally hundreds of thousands of incidences of this in
   nixpkgs, and with some of the weird code there some of
   these (functionally) useless parens are actually required for
   readability reasons.

Change-Id: I1044b1c5f9fe20df4b6085851fc3b191277c65dc
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7917
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
Diffstat (limited to 'tvix/eval/src/warnings.rs')
-rw-r--r--tvix/eval/src/warnings.rs4
1 files changed, 0 insertions, 4 deletions
diff --git a/tvix/eval/src/warnings.rs b/tvix/eval/src/warnings.rs
index 5395fc20b9c8..aa567f302755 100644
--- a/tvix/eval/src/warnings.rs
+++ b/tvix/eval/src/warnings.rs
@@ -17,7 +17,6 @@ pub enum WarningKind {
     DeadCode,
     EmptyInherit,
     EmptyLet,
-    UselessParens,
 
     /// Tvix internal warning for features triggered by users that are
     /// not actually implemented yet, but do not cause runtime failures.
@@ -101,8 +100,6 @@ impl EvalWarning {
 
             WarningKind::EmptyLet => "this `let`-expression contains no bindings".to_string(),
 
-            WarningKind::UselessParens => "these parenthesis can be removed".to_string(),
-
             WarningKind::NotImplemented(what) => {
                 format!("feature not yet implemented in tvix: {}", what)
             }
@@ -123,7 +120,6 @@ impl EvalWarning {
             WarningKind::DeadCode => "W008",
             WarningKind::EmptyInherit => "W009",
             WarningKind::EmptyLet => "W010",
-            WarningKind::UselessParens => "W011",
 
             WarningKind::NotImplemented(_) => "W999",
         }