Skip to content

Commit f633c53

Browse files
authored
Merge pull request #481 from 0xMiden/greenhat/deny-warnings-add-check-release
2 parents ee108e6 + f60a15b commit f633c53

File tree

24 files changed

+43
-8
lines changed

24 files changed

+43
-8
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ on:
66
- main
77
- next
88
paths-ignore:
9-
- '**.md'
10-
- '**.txt'
11-
- 'docs/**'
9+
- "**.md"
10+
- "**.txt"
11+
- "docs/**"
1212
pull_request:
1313
paths-ignore:
14-
- '**.md'
15-
- '**.txt'
16-
- 'docs/**'
14+
- "**.md"
15+
- "**.txt"
16+
- "docs/**"
1717

1818
jobs:
1919
lint:
@@ -96,6 +96,11 @@ jobs:
9696
# error occurs
9797
run: |
9898
cargo make check --tests
99+
- name: Check(release)
100+
# We run `check` with `--release` to check the release build (without
101+
# `debug_assertions`, etc.)
102+
run: |
103+
cargo make check --release --tests
99104
- name: Test
100105
run: |
101106
cargo make test -E 'not (package(miden-integration-tests) or package(cargo-miden))'

codegen/masm/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#![feature(array_chunks)]
55
#![feature(iter_array_chunks)]
66
#![feature(iterator_try_collect)]
7+
#![deny(warnings)]
78

89
extern crate alloc;
910

dialects/arith/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#![feature(ptr_metadata)]
66
#![feature(specialization)]
77
#![allow(incomplete_features)]
8+
#![deny(warnings)]
89

910
extern crate alloc;
1011

dialects/cf/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#![feature(ptr_metadata)]
66
#![feature(specialization)]
77
#![allow(incomplete_features)]
8+
#![deny(warnings)]
89

910
extern crate alloc;
1011

dialects/hir/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#![feature(specialization)]
66
#![allow(incomplete_features)]
77
#![no_std]
8+
#![deny(warnings)]
89

910
extern crate alloc;
1011

dialects/scf/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#![feature(ptr_metadata)]
66
#![feature(specialization)]
77
#![allow(incomplete_features)]
8+
#![deny(warnings)]
89

910
extern crate alloc;
1011

dialects/ub/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#![feature(ptr_metadata)]
66
#![feature(specialization)]
77
#![allow(incomplete_features)]
8+
#![deny(warnings)]
89

910
extern crate alloc;
1011

eval/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#![no_std]
22
#![feature(debug_closure_helpers)]
3+
#![deny(warnings)]
34

45
#[cfg(any(feature = "std", test))]
56
extern crate std;

hir-analysis/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#![feature(unsize)]
88
// Specialization
99
#![allow(incomplete_features)]
10+
#![deny(warnings)]
1011

1112
extern crate alloc;
1213
#[cfg(test)]

hir-macros/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![deny(warnings)]
2+
13
extern crate proc_macro;
24

35
mod operation;

hir-symbol/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#![no_std]
2+
#![deny(warnings)]
23

34
extern crate alloc;
45
#[cfg(feature = "std")]

hir-transform/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#![no_std]
22
#![feature(new_range_api)]
3+
#![deny(warnings)]
34

45
extern crate alloc;
56
#[cfg(test)]

hir-type/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#![no_std]
2+
#![deny(warnings)]
23

34
extern crate alloc;
45

hir/src/ir/loops.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use crate::{
1414
adt::{SmallDenseMap, SmallSet},
1515
cfg::{Graph, Inverse, InvertibleGraph},
1616
pass::Analysis,
17-
BlockRef, EntityWithId, Operation, OperationRef, PostOrderBlockIter, Report,
17+
BlockRef, Operation, OperationRef, PostOrderBlockIter, Report,
1818
};
1919

2020
/// Represents the results of analyzing an [Operation] and computing the [LoopForest] for each of
@@ -537,6 +537,8 @@ impl LoopForest {
537537
other_l: Rc<Loop>,
538538
other_loop_headers: &mut SmallDenseMap<BlockRef, Rc<Loop>, 8>,
539539
) -> Result<(), Report> {
540+
use crate::EntityWithId;
541+
540542
let header = l.header();
541543
let other_header = other_l.header();
542544
if header != other_header {
@@ -1275,7 +1277,9 @@ impl Loop {
12751277
}
12761278

12771279
#[cfg(not(debug_assertions))]
1278-
pub fn verify_loop(&self) {}
1280+
pub fn verify_loop(&self) -> Result<(), Report> {
1281+
Ok(())
1282+
}
12791283

12801284
/// Verify loop structure of this loop and all nested loops.
12811285
pub fn verify_loop_nest(

hir/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
// Some of the above features require us to disable these warnings
4242
#![allow(incomplete_features)]
4343
#![allow(internal_features)]
44+
#![deny(warnings)]
4445

4546
extern crate alloc;
4647

midenc-compile/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#![no_std]
2+
#![deny(warnings)]
23

34
extern crate alloc;
45
#[cfg(feature = "std")]

midenc-driver/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![deny(warnings)]
2+
13
mod midenc;
24

35
pub use clap::Error as ClapError;

midenc-session/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#![feature(slice_split_once)]
55
// Specialization
66
#![allow(incomplete_features)]
7+
#![deny(warnings)]
78

89
extern crate alloc;
910
#[cfg(feature = "std")]

midenc-session/src/libs.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![deny(warnings)]
2+
13
use alloc::{borrow::Cow, format, str::FromStr, sync::Arc};
24
#[cfg(feature = "std")]
35
use alloc::{boxed::Box, string::ToString};

sdk/alloc/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#![no_std]
2+
#![deny(warnings)]
23

34
extern crate alloc;
45

sdk/base-sys/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Enable no_std for the bindings module
22
#![no_std]
3+
#![deny(warnings)]
34

45
#[cfg(feature = "bindings")]
56
pub mod bindings;

sdk/sdk/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#![no_std]
2+
#![deny(warnings)]
23

34
pub use miden_base_sys::bindings::*;
45
pub use miden_sdk_alloc::BumpAlloc;

sdk/stdlib-sys/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#![no_std]
2+
#![deny(warnings)]
23

34
mod intrinsics;
45
mod stdlib;

tools/cargo-miden/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![deny(warnings)]
2+
13
use std::path::PathBuf;
24

35
use anyhow::bail;

0 commit comments

Comments
 (0)