Merge pull request #751 from powdr-labs/allow_println

Explicitly allow printing to stdout.
This commit is contained in:
Leo
2023-11-06 19:24:56 +00:00
committed by GitHub
7 changed files with 9 additions and 0 deletions

View File

@@ -56,6 +56,7 @@ pub fn filter_reachable_from<R: Register, F: FunctionOpKind, A: Architecture>(
.collect();
}
#[allow(clippy::print_stderr)]
pub fn find_reachable_labels<'a, R: Register, F: FunctionOpKind, A: Architecture>(
label: &'a str,
statements: &'a [Statement<R, F>],

View File

@@ -134,6 +134,7 @@ pub fn compile_asm<T: FieldElement>(
/// fixed and witness columns.
///
/// Returns the relative pil file name and the compilation result if any compilation was done.
#[allow(clippy::print_stderr)]
pub fn compile_asm_string<T: FieldElement>(
file_name: &str,
contents: &str,

View File

@@ -42,6 +42,7 @@ mod test {
use super::*;
#[allow(clippy::print_stdout)]
fn mock_prove_asm(file_name: &str, inputs: &[Bn254Field]) {
// read and compile PIL.

View File

@@ -80,6 +80,7 @@ impl<T: FieldElement> PILAnalyzer<T> {
self.process_file_contents(&path, &contents);
}
#[allow(clippy::print_stderr)]
pub fn process_file_contents(&mut self, path: &Path, contents: &str) {
let old_current_file = std::mem::take(&mut self.current_file);
let old_line_starts = std::mem::take(&mut self.line_starts);

View File

@@ -290,6 +290,7 @@ fn main() -> Result<(), io::Error> {
}
}
#[allow(clippy::print_stderr)]
fn run_command(command: Commands) {
match command {
Commands::Rust {
@@ -611,6 +612,7 @@ fn read_and_prove<T: FieldElement>(
write_proving_results_to_fs(is_aggr, &proof, &constraints_serialization, dir);
}
#[allow(clippy::print_stdout)]
fn optimize_and_output<T: FieldElement>(file: &str) {
println!(
"{}",

View File

@@ -18,6 +18,7 @@ fn build_lalrpop() {
.unwrap();
}
#[allow(clippy::print_stdout)]
fn build_instruction_tests() {
let out_dir = env::var("OUT_DIR").unwrap();
let destination = Path::new(&out_dir).join("instruction_tests.rs");

View File

@@ -26,6 +26,7 @@ type Expression = asm_utils::ast::Expression<FunctionKind>;
/// Compiles a rust file all the way down to PIL and generates
/// fixed and witness columns.
#[allow(clippy::print_stderr)]
pub fn compile_rust(
file_name: &str,
output_dir: &Path,
@@ -68,6 +69,7 @@ pub fn compile_rust(
)
}
#[allow(clippy::print_stderr)]
pub fn compile_riscv_asm_bundle(
original_file_name: &str,
riscv_asm_files: BTreeMap<String, String>,