File tree Expand file tree Collapse file tree 4 files changed +14
-8
lines changed
Expand file tree Collapse file tree 4 files changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -33,8 +33,8 @@ rand_xorshift = "0.4"
3333regex = " 1.0"
3434regex-syntax = " 0.8"
3535rusty-fork = { version = " 0.3.0" , default-features = false }
36- syn = " 2.0.100 "
36+ syn = " 2.0.108 "
3737tempfile = " 3.0"
38- trybuild = " =1.0.90 "
38+ trybuild = " =1.0.112 "
3939unarray = " 0.1.4"
4040x86 = " 0.52.0"
Original file line number Diff line number Diff line change @@ -825,7 +825,7 @@ impl ToTokens for MapClosure {
825825
826826/// Construct a `FreshVar` with the given `prefix` and the number it has in the
827827/// count of temporaries for that prefix.
828- fn fresh_var ( prefix : & str , count : usize ) -> FreshVar {
828+ fn fresh_var ( prefix : & str , count : usize ) -> FreshVar < ' _ > {
829829 FreshVar { prefix, count }
830830}
831831
Original file line number Diff line number Diff line change @@ -238,6 +238,7 @@ macro_rules! signed_integer_bin_search {
238238 ( $typ: ident, $int_any: ident, $uniform: ident, $incl: ident) => {
239239 #[ allow( missing_docs) ]
240240 pub mod $typ {
241+ #[ allow( unused_imports) ]
241242 use rand:: { Rng , RngCore } ;
242243
243244 use crate :: strategy:: * ;
@@ -343,6 +344,7 @@ macro_rules! unsigned_integer_bin_search {
343344 ( $typ: ident, $int_any: ident, $uniform: ident, $incl: ident) => {
344345 #[ allow( missing_docs) ]
345346 pub mod $typ {
347+ #[ allow( unused_imports) ]
346348 use rand:: { Rng , RngCore } ;
347349
348350 use crate :: strategy:: * ;
Original file line number Diff line number Diff line change @@ -153,16 +153,20 @@ pub trait ProptestResultExt<T, E>: private::Sealed {
153153 ///
154154 /// ```
155155 /// use proptest::prelude::*;
156- /// proptest! {
157- /// #[test]
158- /// fn test_that_only_works_with_positive_integers(a in -10i32..10i32) {
156+ ///
157+ /// fn test_conversion(a: i32) -> Result<(), TestCaseError> {
159158 /// // Reject the case if `a` cannot be converted to u8 (e.g., negative values)
160159 /// let _unsigned: u8 = a.try_into().prop_assume_ok()?;
161160 /// // ...rest of test...
161+ /// Ok(())
162+ /// }
163+ ///
164+ /// proptest! {
165+ /// #[test]
166+ /// fn test_that_only_works_with_positive_integers(a in -10i32..10i32) {
167+ /// test_conversion(a)?;
162168 /// }
163169 /// }
164- /// #
165- /// # fn main() { test_signed_to_unsigned(); }
166170 /// ```
167171 ///
168172 /// [`prop_assume!`]: crate::prop_assume
You can’t perform that action at this time.
0 commit comments