Skip to content

Regression from new lint out_of_scope_macro_calls #126984

Closed
@tgross35

Description

@tgross35

compiler_builtins is now getting:

 error: cannot find macro `define_rust_probestack` in this scope
   --> src/probestack.rs:134:5
    |
137 |     define_rust_probestack!(
    |     ^^^^^^^^^^^^^^^^^^^^^^
    |
    = 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 <https://github.com/rust-lang/rust/issues/124535>
    = help: import `macro_rules` with `use` to make it callable above its definition
    = note: `-D out-of-scope-macro-calls` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(out_of_scope_macro_calls)]`

But this doesn't seem right, unless I am misreading something. The global_asm! invocation that is enabled on x86_64 (https://github.com/rust-lang/compiler-builtins/blob/7a84ce4a90cd2d22494daead50f9026b5ca52140/src/probestack.rs#L130-L134) should find the define_rustc_probestack definition that is enabled on everything except apple or uefi (https://github.com/rust-lang/compiler-builtins/blob/7a84ce4a90cd2d22494daead50f9026b5ca52140/src/probestack.rs#L61-L79).

CI: https://github.com/rust-lang/compiler-builtins/actions/runs/9675571819/job/26693340492?pr=636#step:5:24

Unfortunately I haven't been successful in finding a mcve, https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=f299db7ba55daaa5b7721323bf72cfb8 works fine.

Metadata

Metadata

Assignees

Labels

A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.L-out_of_scope_macro_callsLint: out_of_scope_macro_callsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions