chore: comment

This commit is contained in:
2025-08-07 21:00:32 +08:00
parent f946cb2fd1
commit 67cdcfea33
24 changed files with 734 additions and 105 deletions

View File

@@ -10,9 +10,8 @@ use rnix::ast;
use nixjit_error::{Error, Result};
use nixjit_ir::{Attr, AttrSet, ConcatStrings, ExprId, Select, Str, Var};
use super::ToHir;
use super::downgrade::Downgrade;
use super::{Attrs, DowngradeContext, Param};
use super::{Attrs, DowngradeContext, Param, ToHir};
/// Downgrades a function parameter from the AST.
pub fn downgrade_param(param: ast::Param, ctx: &mut impl DowngradeContext) -> Result<Param> {
@@ -215,7 +214,7 @@ pub fn downgrade_static_attrpathvalue(
let path = downgrade_attrpath(value.attrpath().unwrap(), ctx)?;
if path.iter().any(|attr| matches!(attr, Attr::Dynamic(_))) {
return Err(Error::DowngradeError(
"dynamic attributes not allowed".to_string(),
"dynamic attributes not allowed in let bindings".to_string(),
));
}
let value = value.value().unwrap().downgrade(ctx)?;