From 0f5feff03a6f846308e8ccb865dabf095113ef1a Mon Sep 17 00:00:00 2001 From: Paul Schoenfelder Date: Fri, 9 Aug 2024 02:29:59 -0400 Subject: [PATCH] chore: fix new clippy warnings in 1.80 --- parser/src/ast/expression.rs | 6 +++--- parser/src/ast/module.rs | 4 ++-- parser/src/transforms/inlining.rs | 24 ++++++++++++------------ 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/parser/src/ast/expression.rs b/parser/src/ast/expression.rs index aa28d0f1..9f16c013 100644 --- a/parser/src/ast/expression.rs +++ b/parser/src/ast/expression.rs @@ -472,7 +472,7 @@ pub enum ScalarExpr { /// /// 1. The call is the top-level expression of a constraint, and is to an evaluator function /// 2. The call is not the top-level expression of a constraint, and is to a pure function - /// that produces a scalar value type. + /// that produces a scalar value type. /// /// If neither of the above are true, the call is invalid in a `ScalarExpr` context Call(Call), @@ -1138,8 +1138,8 @@ pub struct Call { /// /// * Calls to evaluators produce no value, and thus have no type /// * When parsed, the callee has not yet been resolved, so we don't know the - /// type of the function being called. During semantic analysis, the callee is - /// resolved and this field is set to the result type of that function. + /// type of the function being called. During semantic analysis, the callee is + /// resolved and this field is set to the result type of that function. pub ty: Option, } impl Call { diff --git a/parser/src/ast/module.rs b/parser/src/ast/module.rs index c9363ca9..2d306b36 100644 --- a/parser/src/ast/module.rs +++ b/parser/src/ast/module.rs @@ -35,8 +35,8 @@ pub enum ModuleType { /// /// * Fields which are only allowed in root modules are empty/unset in library modules /// * Fields which must be present in root modules are guaranteed to be present in a root module -/// * It is guaranteed that at least one boundary constraint and one integrity constraint are present -/// in a root module +/// * It is guaranteed that at least one boundary constraint and one integrity constraint are +/// present in a root module /// * No duplicate module-level declarations were present /// * All globally-visible declarations are unique /// diff --git a/parser/src/transforms/inlining.rs b/parser/src/transforms/inlining.rs index 871ee6a6..f4221517 100644 --- a/parser/src/transforms/inlining.rs +++ b/parser/src/transforms/inlining.rs @@ -364,21 +364,21 @@ impl<'a> Inlining<'a> { /// Let expressions are expanded using the following rules: /// /// * The let-bound expression is expanded first. If it expands to a statement block and - /// not an expression, the block is inlined in place of the let being expanded, and the - /// rest of the expansion takes place at the end of the block; replacing the last statement - /// in the block. If the last statement in the block was an expression, it is treated as - /// the let-bound value. If the last statement in the block was another `let` however, then - /// we recursively walk down the let tree until we reach the bottom, which must always be - /// an expression statement. + /// not an expression, the block is inlined in place of the let being expanded, and the + /// rest of the expansion takes place at the end of the block; replacing the last statement + /// in the block. If the last statement in the block was an expression, it is treated as + /// the let-bound value. If the last statement in the block was another `let` however, then + /// we recursively walk down the let tree until we reach the bottom, which must always be + /// an expression statement. /// /// * The body is expanded in-place after the previous step has been completed. /// /// * If a let-bound variable is an alias for a declaration, we replace all uses - /// of the variable with direct references to the declaration, making the let-bound variable - /// dead + /// of the variable with direct references to the declaration, making the let-bound + /// variable dead /// /// * If a let-bound variable is dead (i.e. has no references), then the let is elided, - /// by replacing it with the result of expanding its body + /// by replacing it with the result of expanding its body fn expand_let(&mut self, expr: Let) -> Result, SemanticAnalysisError> { let span = expr.span(); let name = expr.name; @@ -744,9 +744,9 @@ impl<'a> Inlining<'a> { /// the expansion is, respectively: /// /// * A tree of let statements (using generated variables), where each let binds the value of a - /// single iteration of the comprehension. The body of the final let, and thus the effective value - /// of the entire tree, is a vector containing all of the bindings in the evaluation order of the - /// comprehension. + /// single iteration of the comprehension. The body of the final let, and thus the effective + /// value of the entire tree, is a vector containing all of the bindings in the evaluation + /// order of the comprehension. /// * A flat list of constraint statements fn expand_comprehension( &mut self,