From 54636ac18c31c335c48611db226f8de91fa274d1 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Thu, 11 Jul 2024 07:13:54 +0200 Subject: [PATCH] Fix warning with nightly rust: ``` warning: cannot find macro `self_test` in this scope --> lib.rs:44:10 | 44 | #![doc = self_test!(/** | ^^^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #124535 = help: import `macro_rules` with `use` to make it callable above its definition = note: `#[warn(out_of_scope_macro_calls)]` on by default ``` --- lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib.rs b/lib.rs index e054bdd..5a38412 100644 --- a/lib.rs +++ b/lib.rs @@ -511,6 +511,8 @@ macro_rules! self_test { }; } +use self_test; + // The following struct is inserted only during generation of the documentation in order to exploit doc-tests. // These doc-tests are used to check that invalid arguments to the `document_features!` macro cause a compile time error. // For a more principled way of testing compilation error, maybe investigate .