diff --git a/rstest/src/lib.rs b/rstest/src/lib.rs index 12450d8..e84563d 100644 --- a/rstest/src/lib.rs +++ b/rstest/src/lib.rs @@ -1107,6 +1107,10 @@ pub use rstest_macros::fixture; /// in this case the `#[actix_rt::test]` attribute will replace the standard `#[test]` /// attribute. /// +/// Some test attributes allow to inject arguments into the test function, in a similar way to rstest. +/// This can lead to compile errors when rstest is not able to resolve the additional arguments. +/// To avoid this, see [Ignoring Arguments](attr.rstest.html#ignoring-arguments). +/// /// ## Local lifetime and `#[by_ref]` attribute /// /// In some cases you may want to use a local lifetime for some arguments of your test. diff --git a/rstest_macros/src/parse/ignore.rs b/rstest_macros/src/parse/ignore.rs index f51c6df..7a16a8e 100644 --- a/rstest_macros/src/parse/ignore.rs +++ b/rstest_macros/src/parse/ignore.rs @@ -49,13 +49,12 @@ mod should { assert_eq!(by_refs, to_idents!(expected_refs)); } - #[rstest] - #[case::no_more_than_one("fn f(#[ignore] #[ignore] a: u32) {}", "more than once")] - fn raise_error(#[case] item_fn: &str, #[case] message: &str) { - let mut item_fn: ItemFn = item_fn.ast(); + #[test] + fn raise_error() { + let mut item_fn: ItemFn = "fn f(#[ignore] #[ignore] a: u32) {}".ast(); let err = extract_ignores(&mut item_fn).unwrap_err(); - assert_in!(format!("{:?}", err), message); + assert_in!(format!("{:?}", err), "more than once"); } }