Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

regression: cannot find macro in scope #125201

Closed
BoxyUwU opened this issue May 17, 2024 · 10 comments · Fixed by #125734
Closed

regression: cannot find macro in scope #125201

BoxyUwU opened this issue May 17, 2024 · 10 comments · Fixed by #125734
Assignees
Labels
A-resolve Area: Name resolution P-high High priority regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Milestone

Comments

@BoxyUwU
Copy link
Member

BoxyUwU commented May 17, 2024

[INFO] [stdout] error: cannot find macro `stringified_module_code` in this scope
[INFO] [stdout]   --> /opt/rustwide/cargo-home/registry/src/index.crates.io-6f17d22bba15001f/safer-ffi-0.1.4/src/libc.rs:9:10
[INFO] [stdout]    |
[INFO] [stdout] 9  | #![doc = stringified_module_code!()]
[INFO] [stdout]    |          ^^^^^^^^^^^^^^^^^^^^^^^ consider moving the definition of `stringified_module_code` before this call
[INFO] [stdout]    |
@BoxyUwU BoxyUwU added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. regression-from-stable-to-beta Performance or correctness regression from stable to beta. labels May 17, 2024
@rustbot rustbot added I-prioritize Issue: Indicates that prioritization has been requested for this issue. needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels May 17, 2024
@BoxyUwU BoxyUwU added this to the 1.79.0 milestone May 17, 2024
@compiler-errors
Copy link
Member

searched commit range: 4d570ee...aed2187
regressed commit: 35194e7

bisected with cargo-bisect-rustc v0.6.8

Host triple: x86_64-unknown-linux-gnu
Reproduce with:

cargo bisect-rustc --start=2024-04-01 

Did this regress in #124382? cc @petrochenkov

@compiler-errors
Copy link
Member

Specifically 7517a4f seems suspicious due to title alone, didn't look into it much though.

@dtolnay
Copy link
Member

dtolnay commented May 17, 2024

This was reported by one of the affected crate authors in #124535.

@dtolnay dtolnay added the A-resolve Area: Name resolution label May 17, 2024
@saethlin saethlin removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label May 18, 2024
@apiraino
Copy link
Contributor

WG-prioritization assigning priority (Zulip discussion).

Since these crates regressed, it could probably be good to keep this on the radar (release in 15 days)

@rustbot label -I-prioritize +P-high

@rustbot rustbot added P-high High priority and removed I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels May 28, 2024
@petrochenkov
Copy link
Contributor

I plan to fix it later this week (#124535 is assigned to me).

@petrochenkov
Copy link
Contributor

Fixed in #125734.

@danielhenrymantilla
Copy link
Contributor

danielhenrymantilla commented May 29, 2024

Thanks @petrochenkov! FWIW, I've since submitted a new version of safer-ffi which does not rely in this AST ordering quirk: maybe that way in a few months this "breakage" can take place? I wouldn't want safer-ffi to embody the following xkcd:

xkcd: workflow (1172)

@petrochenkov
Copy link
Contributor

@danielhenrymantilla
I plan to fix this properly in #125741 after the initial regression is addressed (maybe with a temporary deprecation lint), so fixing crates exploiting this bug still make sense.

fmease added a commit to fmease/rust that referenced this issue May 29, 2024
ast: Revert a breaking attribute visiting order change

Fixes rust-lang#124535
Fixes rust-lang#125201
@bors bors closed this as completed in fdfffc0 May 30, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this issue May 30, 2024
Rollup merge of rust-lang#125734 - petrochenkov:macinattr, r=wesleywiser

ast: Revert a breaking attribute visiting order change

Fixes rust-lang#124535
Fixes rust-lang#125201
@lqd
Copy link
Member

lqd commented May 30, 2024

Reopening to track beta backport

@lqd lqd reopened this May 30, 2024
@Mark-Simulacrum
Copy link
Member

Closing, backported to beta.

flip1995 pushed a commit to flip1995/rust-clippy that referenced this issue Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-resolve Area: Name resolution P-high High priority regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants