about summary refs log tree commit diff
path: root/tvix/eval/src/compiler
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2022-08-26T17·17+0300
committertazjin <tazjin@tvl.su>2022-09-03T13·19+0000
commit3b64b7eb2ec178c11056d1e361def5b5b965ba43 (patch)
tree22e6600ed7cee4a03699567e6790f62c88dabe24 /tvix/eval/src/compiler
parent7d34e6e880935fe7c79bb74444bd65d155bebc72 (diff)
refactor(tvix/eval): rename CompilationResult -> CompilationOutput r/4618
grfn pointed out in cl/6174 that `Result` might cause developers to
believe that this behaves like std::Result, which it does not.

Change-Id: Ia30ab0dcb7e8da7bf842777ee3fe17bcf35cb0c1
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6281
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Diffstat (limited to 'tvix/eval/src/compiler')
-rw-r--r--tvix/eval/src/compiler/mod.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/tvix/eval/src/compiler/mod.rs b/tvix/eval/src/compiler/mod.rs
index d40cb1e14e06..69e661d46fcc 100644
--- a/tvix/eval/src/compiler/mod.rs
+++ b/tvix/eval/src/compiler/mod.rs
@@ -29,7 +29,7 @@ use crate::warnings::{EvalWarning, WarningKind};
 /// Represents the result of compiling a piece of Nix code. If
 /// compilation was successful, the resulting bytecode can be passed
 /// to the VM.
-pub struct CompilationResult {
+pub struct CompilationOutput {
     pub lambda: Lambda,
     pub warnings: Vec<EvalWarning>,
     pub errors: Vec<Error>,
@@ -1070,7 +1070,7 @@ pub fn compile(
     expr: ast::Expr,
     location: Option<PathBuf>,
     globals: HashMap<&'static str, Value>,
-) -> EvalResult<CompilationResult> {
+) -> EvalResult<CompilationOutput> {
     let mut root_dir = match location {
         Some(dir) => Ok(dir),
         None => std::env::current_dir().map_err(|e| {
@@ -1095,7 +1095,7 @@ pub fn compile(
 
     c.compile(expr);
 
-    Ok(CompilationResult {
+    Ok(CompilationOutput {
         lambda: c.contexts.pop().unwrap().lambda,
         warnings: c.warnings,
         errors: c.errors,