Skip to content

Commit

Permalink
fixes for Rust 1.80
Browse files Browse the repository at this point in the history
  • Loading branch information
vaivaswatha committed Aug 1, 2024
1 parent 5eee3d7 commit 89258ea
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
1 change: 1 addition & 0 deletions pliron-llvm/src/llvm_sys/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//! checks that `phi_node` is indeed a C++ `PHINode`.
//! 2. `core::llvm_count_param_types(ty: LLVMTypeRef)`
//! checks that `ty` is a function type.
//!
//! This ensures that there are no undefined behavior / invalid memory accesses.
//! We do not check for invalid IR that is caught by the verifier.
//! As a general guideline, ensure that the C-Types (which are C++ base classes)
Expand Down
2 changes: 1 addition & 1 deletion src/builtin/op_interfaces.rs
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ decl_op_interface! {
{
let op = &*op.get_operation().deref(ctx);
if op.get_num_operands() != 1 {
return verify_err!(op.loc(), ZeroOpdVerifyErr(op.get_opid().to_string()));
return verify_err!(op.loc(), OneOpdVerifyErr(op.get_opid().to_string()));
}
Ok(())
}
Expand Down
7 changes: 5 additions & 2 deletions src/graph/walkers.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
//! Walk the IR graph. At each node:
//! Walk the IR graph.
//!
//! At each node:
//! - Call a callback to process the node.
//! - Walk over the children.
//! The relative orders of performing the above is configurable.
//!
//! The relative orders of performing the above is configurable.
//!
//! Throughout this module, only parent-child relations are considered,
//! i.e., operations->regions, region->blocks and block->operations.
Expand Down
12 changes: 7 additions & 5 deletions src/irfmt/parsers.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Utilities for parsing.
use std::str::FromStr;

use crate::{
Expand All @@ -21,11 +23,11 @@ use combine::{

/// Parse from `parser`, ignoring whitespace(s) before and after.
/// > **Warning**: Do not use this inside inside repeating combiners, such as [combine::many].
/// After successfully parsing one instance, if spaces are consumed to parse
/// the next one, but the next one doesn't exist, it is treated as a failure
/// that consumed some input. This messes things up. So spaces must be consumed
/// after a successfull parse, and not prior to an upcoming one.
/// A possibly right way to, for example, parse a comma separated list of [Identifier]s:
/// > After successfully parsing one instance, if spaces are consumed to parse
/// > the next one, but the next one doesn't exist, it is treated as a failure
/// > that consumed some input. This messes things up. So spaces must be consumed
/// > after a successfull parse, and not prior to an upcoming one.
/// > A possibly right way to, for example, parse a comma separated list of [Identifier]s:
///
///```
/// # use combine::{parser::char::spaces, Parser};
Expand Down

0 comments on commit 89258ea

Please sign in to comment.