Skip to content

Commit

Permalink
chore: fix new clippy warnings in 1.80
Browse files Browse the repository at this point in the history
  • Loading branch information
bitwalker committed Aug 9, 2024
1 parent bc0e12e commit 0f5feff
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
6 changes: 3 additions & 3 deletions parser/src/ast/expression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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<Type>,
}
impl Call {
Expand Down
4 changes: 2 additions & 2 deletions parser/src/ast/module.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
///
Expand Down
24 changes: 12 additions & 12 deletions parser/src/transforms/inlining.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Vec<Statement>, SemanticAnalysisError> {
let span = expr.span();
let name = expr.name;
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 0f5feff

Please sign in to comment.