clean up warnings
authorJacob Lifshay <programmerjake@gmail.com>
Thu, 2 Feb 2023 01:52:50 +0000 (17:52 -0800)
committerJacob Lifshay <programmerjake@gmail.com>
Thu, 2 Feb 2023 01:52:50 +0000 (17:52 -0800)
register_allocator/Cargo.toml
register_allocator/fuzz/Cargo.toml
register_allocator/fuzz/fuzz_targets/loc_set_max_conflicts_with.rs
register_allocator/fuzz/fuzz_targets/loc_set_ops.rs
register_allocator/src/function.rs
register_allocator/src/loc_set.rs

index ce3cba27a5a6f28d3ba1a29162d307c970b4c064..4d2a0c3b3289db6e8d87755581dd0e503cd430b2 100644 (file)
@@ -26,4 +26,10 @@ once_cell = "1.17.0"
 fuzzing = ["libfuzzer-sys"]
 
 [workspace]
-members = [".", "fuzz"]
\ No newline at end of file
+members = [".", "fuzz"]
+
+[profile.release]
+# for fuzzing
+debug = true
+debug-assertions = true
+overflow-checks = true
index 55278653c887b238f27fca28783c572feeafe2fa..5a4942a983336d7b302715a911e9a449ec051e70 100644 (file)
@@ -11,11 +11,6 @@ cargo-fuzz = true
 libfuzzer-sys = "0.4.5"
 bigint-presentation-code-register-allocator = { path = "../", features = ["fuzzing"] }
 
-[profile.release]
-debug = true
-debug-assertions = true
-overflow-checks = true
-
 [[bin]]
 name = "fn_new"
 path = "fuzz_targets/fn_new.rs"
index c2ee30f53e1d5b695c62a4a62fa201507f65a9bf..02b2e111d6a0575576fa0f825c5b9c915033b795 100644 (file)
@@ -1,7 +1,6 @@
 #![no_main]
 use bigint_presentation_code_register_allocator::{
     interned::{GlobalState, Intern},
-    loc::Loc,
     loc_set::LocSet,
 };
 use libfuzzer_sys::fuzz_target;
index c7be296efa8d34c4b10a6638b9ddf51017c9aee6..db03174d3b8370ed2b5ada0f6d9f356fa6dfbdd7 100644 (file)
@@ -87,8 +87,6 @@ macro_rules! check_all_op_combos {
 
 fuzz_target!(|data: (HashSet<Loc>, HashSet<Loc>)| {
     let (lhs_hash_set, rhs_hash_set) = data;
-    let lhs = LocSet::from_iter(lhs_hash_set.iter().copied());
-    let rhs = LocSet::from_iter(rhs_hash_set.iter().copied());
     check_all_op_combos!(
         &lhs_hash_set,
         &rhs_hash_set,
index b823f3c407058608123e2d08ed05a5e21abd5464..cff8039a8aebdcf85323675a366d7e77a9919ae0 100644 (file)
@@ -2,7 +2,7 @@ use crate::{
     error::{Error, Result},
     index::{BlockIdx, InstIdx, InstRange, SSAValIdx},
     interned::{GlobalState, Intern, Interned},
-    loc::{BaseTy, Loc, LocFields, LocKind, Ty},
+    loc::{BaseTy, Loc, Ty},
     loc_set::LocSet,
 };
 use arbitrary::Arbitrary;
index 4427569d3c12b2997b11eb869ebeb1e7b50117ce..7f987f677249b52469efecb9c28303815535bee8 100644 (file)
@@ -734,7 +734,7 @@ impl LocSetMaxConflictsWithTrait for Loc {
     fn reference_compute_result(
         lhs: &Interned<LocSet>,
         rhs: &Self,
-        global_state: &GlobalState,
+        _global_state: &GlobalState,
     ) -> u32 {
         lhs.iter().map(|loc| rhs.conflicts(loc) as u32).sum::<u32>()
     }