Skip to content

Commit

Permalink
Merge pull request #751 from powdr-labs/allow_println
Browse files Browse the repository at this point in the history
Explicitly allow printing to stdout.
  • Loading branch information
Leo authored Nov 6, 2023
2 parents d99187f + 1ce585d commit 93cf6d7
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions asm_utils/src/reachability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>],
Expand Down
1 change: 1 addition & 0 deletions compiler/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions halo2/src/mock_prover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
1 change: 1 addition & 0 deletions pil_analyzer/src/pil_analyzer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 2 additions & 0 deletions powdr_cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ fn main() -> Result<(), io::Error> {
}
}

#[allow(clippy::print_stderr)]
fn run_command(command: Commands) {
match command {
Commands::Rust {
Expand Down Expand Up @@ -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!(
"{}",
Expand Down
1 change: 1 addition & 0 deletions riscv/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 2 additions & 0 deletions riscv/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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>,
Expand Down

0 comments on commit 93cf6d7

Please sign in to comment.