From e9ec2a7b362669f8f9df550389bc834bf8a8322d Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Fri, 30 Dec 2022 07:55:18 +0100 Subject: [PATCH] Add `use test_case::test_case;` to CONTRIBUTING.md I previously tried adding the #[test_case()] attribute macro and got confused because the Rust compilation suddenly failed with: error[E0658]: use of unstable library feature 'custom_test_frameworks': custom test frameworks are an unstable feature which is a quite confusing error message. The solution is to just add `use test_case::test_case;`, so this commit adds that line to the example in CONTRIBUTING.md to spare others this source of confusion. --- CONTRIBUTING.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9e6294320a..a89b0b1a57 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -71,6 +71,8 @@ output, codify the behavior as a snapshot test by adding a new `testcase` macro section of `src/linter.rs`, like so: ```rust +use test_case::test_case; + #[test_case(CheckCode::A001, Path::new("A001.py"); "A001")] ... ```