Skip to content

Commit 04e6a5b

Browse files
authored
bump MSRV to 1.66.0 (#218)
1 parent f91cc10 commit 04e6a5b

File tree

16 files changed

+24
-21
lines changed

16 files changed

+24
-21
lines changed

.github/workflows/main.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
strategy:
6363
fail-fast: false
6464
matrix:
65-
rust: [1.57.0, stable, nightly]
65+
rust: ['1.66.0', stable, nightly]
6666
os: [ubuntu-latest, macOS-latest]
6767

6868
steps:

bin/cargo-bolero/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ keywords = ["testing", "quickcheck", "property", "fuzz", "fuzzing"]
99
license = "MIT"
1010
edition = "2018"
1111
readme = "README.md"
12-
rust-version = "1.66.0"
12+
rust-version = "1.76.0"
1313

1414
[features]
1515
default = ["afl", "libfuzzer", "kani"]

bin/cargo-bolero/src/manifest.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ impl Package {
6060
pub fn resolve(manifest_path: Option<&str>, package: Option<&str>) -> Result<Self> {
6161
Metadata::from_manifest_path(manifest_path)?
6262
.resolve_package(package)
63-
.map(|package| package.clone())
63+
.cloned()
6464
}
6565

6666
pub fn manifest_dir(&self) -> PathBuf {

bin/clippy.toml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
msrv = "1.76.0"

bin/rust-toolchain

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[toolchain]
2-
channel = "1.66.0"
2+
channel = "1.73.0"
33
components = [ "rustc", "clippy", "rustfmt" ]

clippy.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
msrv = "1.30.0"
1+
msrv = "1.66.0"

lib/bolero-engine/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ keywords = ["testing", "quickcheck", "property", "fuzz", "fuzzing"]
99
license = "MIT"
1010
edition = "2018"
1111
readme = "../../README.md"
12-
rust-version = "1.57.0"
12+
rust-version = "1.66.0"
1313

1414
[features]
1515
rng = ["rand", "rand_xoshiro", "bolero-generator/alloc"]

lib/bolero-engine/src/panic.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ macro_rules! backtrace {
2020
}
2121

2222
thread_local! {
23-
static ERROR: RefCell<Option<PanicError>> = RefCell::new(None);
23+
static ERROR: RefCell<Option<PanicError>> = const { RefCell::new(None) };
2424
static CAPTURE_BACKTRACE: RefCell<bool> = RefCell::new(*RUST_BACKTRACE);
25-
static FORWARD_PANIC: RefCell<bool> = RefCell::new(true);
25+
static FORWARD_PANIC: RefCell<bool> = const { RefCell::new(true) };
2626
static THREAD_NAME: String = String::from(std::thread::current().name().unwrap_or("main"));
2727
}
2828

lib/bolero-engine/src/test.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ where
197197
let value = core::panic::AssertUnwindSafe(generate_value!(self, driver));
198198

199199
panic::catch(|| {
200-
let res = (fun)(*value);
200+
let res = (fun)(&value);
201201
match res.into_test_result() {
202202
Ok(()) => Ok(true),
203203
Err(err) => Err(err),

lib/bolero-generator/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ keywords = ["testing", "quickcheck", "property", "fuzz", "fuzzing"]
99
license = "MIT"
1010
edition = "2021"
1111
readme = "README.md"
12-
rust-version = "1.57.0"
12+
rust-version = "1.66.0"
1313

1414
[features]
1515
default = ["either", "std"]

lib/bolero-generator/src/driver/macros.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,10 @@ macro_rules! gen_from_bytes {
8282
#[inline]
8383
fn gen_bool(&mut self, probability: Option<f32>) -> Option<bool> {
8484
if let Some(probability) = probability {
85-
let value = self.gen_u32(Bound::Unbounded, Bound::Unbounded)? as f32
86-
/ core::u32::MAX as f32;
85+
let value = u32::sample_unbound(self)? as f32 / core::u32::MAX as f32;
8786
Some(value < probability)
8887
} else {
89-
let value: u8 = self.gen_u8(Bound::Unbounded, Bound::Unbounded)?;
88+
let value = u8::sample_unbound(self)?;
9089
Some(value < (u8::MAX / 2))
9190
}
9291
}

lib/bolero-generator/src/uniform.rs

+7-5
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,8 @@ impl Uniform for char {
226226

227227
#[cfg(test)]
228228
mod tests {
229+
#![allow(clippy::redundant_closure_call)]
230+
229231
use super::*;
230232
use core::fmt;
231233

@@ -343,19 +345,19 @@ mod tests {
343345
driver_mode: DriverMode,
344346
map: impl Fn(u8, u8) -> (Bound<T>, Bound<T>),
345347
) {
346-
for min in 0..=255 {
347-
for max in 0..=255 {
348-
let (min_b, max_b) = map(min, max);
348+
for min in 0..=T::ENTRIES {
349+
for max in 0..=T::ENTRIES {
350+
let (min_b, max_b) = map(min as _, max as _);
349351
let mut expected = Seen::default();
350352
T::fill_expected(min_b, max_b, &mut expected);
351353

352354
let min_b = BoundExt::as_ref(&min_b);
353355
let max_b = BoundExt::as_ref(&max_b);
354356

355357
let mut actual = Seen::default();
356-
for seed in 0..=255 {
358+
for seed in 0..=T::ENTRIES {
357359
let mut driver = Byte {
358-
value: Some(seed),
360+
value: Some(seed as _),
359361
driver_mode,
360362
};
361363
let result = T::sample(&mut driver, min_b, max_b);

lib/bolero/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ keywords = ["testing", "quickcheck", "property", "fuzz", "fuzzing"]
99
license = "MIT"
1010
edition = "2018"
1111
readme = "../../README.md"
12-
rust-version = "1.57.0"
12+
rust-version = "1.66.0"
1313

1414
[features]
1515
default = ["std"]

lib/bolero/src/test/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ impl TestEngine {
176176
T::Value: core::fmt::Debug,
177177
{
178178
let mut file_options = options.clone();
179-
let mut rng_options = options.clone();
179+
let mut rng_options = options;
180180

181181
// set the driver mode to direct for file replays since they were likely generated with
182182
// fuzzers

lib/clippy.toml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
msrv = "1.66.0"

lib/rust-toolchain

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[toolchain]
2-
channel = "1.57.0"
2+
channel = "1.66.0"
33
components = [ "rustc", "clippy", "rustfmt" ]

0 commit comments

Comments
 (0)