Skip to content

Commit

Permalink
chore: Forbid unsafe code (#824)
Browse files Browse the repository at this point in the history
chore: forbid unsafe code
  • Loading branch information
0xYYY authored Feb 12, 2023
1 parent 62d02a1 commit b196859
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions crates/arena/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#![forbid(unsafe_code)]
// For now we use a wrapper around generational-arena
pub use generational_arena::{Arena, Index};
1 change: 1 addition & 0 deletions crates/fm/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![forbid(unsafe_code)]
mod file_map;
mod file_reader;

Expand Down
1 change: 1 addition & 0 deletions crates/iter-extended/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![forbid(unsafe_code)]
use std::collections::BTreeMap;

/// Equivalent to .into_iter().map(f).collect::<Vec<_>>()
Expand Down
1 change: 1 addition & 0 deletions crates/nargo/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![forbid(unsafe_code)]
use noirc_frontend::graph::CrateType;
use std::path::{Path, PathBuf};

Expand Down
1 change: 1 addition & 0 deletions crates/noirc_abi/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![forbid(unsafe_code)]
use std::{collections::BTreeMap, convert::TryInto, str};

use acvm::FieldElement;
Expand Down
1 change: 1 addition & 0 deletions crates/noirc_driver/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![forbid(unsafe_code)]
use acvm::acir::circuit::Circuit;

use acvm::Language;
Expand Down
1 change: 1 addition & 0 deletions crates/noirc_errors/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![forbid(unsafe_code)]
mod position;
pub mod reporter;
pub use position::{Location, Position, Span, Spanned};
Expand Down
1 change: 1 addition & 0 deletions crates/noirc_evaluator/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![forbid(unsafe_code)]
mod errors;
mod ssa;

Expand Down
1 change: 1 addition & 0 deletions crates/noirc_frontend/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![forbid(unsafe_code)]
pub mod ast;
pub mod graph;
pub mod lexer;
Expand Down
1 change: 1 addition & 0 deletions crates/wasm/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![forbid(unsafe_code)]
use acvm::acir::circuit::Circuit;
use gloo_utils::format::JsValueSerdeExt;
use std::path::PathBuf;
Expand Down

0 comments on commit b196859

Please sign in to comment.