You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto merge of rust-lang#124617 - GuillaumeGomez:rollup-eihxh6v, r=GuillaumeGomez
Rollup of 3 pull requests
Successful merges:
- rust-lang#124568 (Adjust `#[macro_export]`/doctest help suggestion for non_local_defs lint)
- rust-lang#124582 (always print nice 'std not found' error when std is not found)
- rust-lang#124597 (Use an explicit x86-64 cpu in tests that are sensitive to it)
r? `@ghost`
`@rustbot` modify labels: rollup
warning: non-local `macro_rules!` definition, they should be avoided as they go against expectation
2
+
--> $DIR/non_local_defs.rs:9:1
3
+
|
4
+
LL | macro_rules! a_macro { () => {} }
5
+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6
+
|
7
+
= help: remove the `#[macro_export]` or make this doc-test a standalone test with its own `fn main() { ... }`
8
+
= note: a `macro_rules!` definition is non-local if it is nested inside an item and has a `#[macro_export]` attribute
9
+
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module
10
+
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
11
+
= note: `#[warn(non_local_definitions)]` on by default
0 commit comments