Skip to content

Commit 51d4daa

Browse files
committed
add hygiene test
1 parent 6d28ca8 commit 51d4daa

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

proptest-macro/src/property_test/codegen/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ mod test_body;
1414
/// - implement `Arbitrary` for that struct (simple field-wise impl)
1515
/// - create a runner, do the rest
1616
///
17-
/// Currently, any attributes on fields are ignored - in the future, we probably want to read
17+
/// Currently, any attributes on parameters are ignored - in the future, we probably want to read
1818
/// these for things like customizing strategies
1919
pub(super) fn generate(item_fn: ItemFn, options: Options) -> TokenStream {
2020
let (mut argless_fn, args) = strip_args(item_fn);

proptest/tests/pass/hygiene.rs

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
fn main() {}
3+
4+
struct MyTestArgs {
5+
something_else: String,
6+
}
7+
8+
#[proptest::property_test]
9+
fn my_test(x: i32) {
10+
assert_eq!(x, x);
11+
}

0 commit comments

Comments
 (0)