Skip to content

regression: cannot find macro in scope #125201

Closed

Description

@BoxyUwU
[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]    |

Activity

  1. added
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    on May 17, 2024
  2. added
    I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on May 17, 2024
  3. added this to the 1.79.0 milestone on May 17, 2024
  4. compiler-errors commented on May 17, 2024

    @compiler-errors
    Contributor

    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

  5. compiler-errors commented on May 17, 2024

    @compiler-errors
    Contributor

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

  6. dtolnay commented on May 17, 2024

    @dtolnay
    Member

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

  7. added
    A-resolveArea: Name/path resolution done by `rustc_resolve` specifically
    on May 17, 2024
  8. removed
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on May 18, 2024
  9. apiraino commented on May 28, 2024

    @apiraino
    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

  10. added
    P-highHigh priority
    and removed
    I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}
    on May 28, 2024
  11. petrochenkov commented on May 28, 2024

    @petrochenkov
    Contributor

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

  12. self-assigned this
    on May 28, 2024
  13. petrochenkov commented on May 29, 2024

    @petrochenkov
    Contributor

    Fixed in #125734.

  14. danielhenrymantilla commented on May 29, 2024

    @danielhenrymantilla
    Contributor

    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)
  15. petrochenkov commented on May 29, 2024

    @petrochenkov
    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.

  16. added 2 commits that reference this issue on May 29, 2024
  17. added a commit that references this issue on May 30, 2024
  18. lqd commented on May 30, 2024

    @lqd
    Member

    Reopening to track beta backport

  19. reopened this on May 30, 2024
  20. Mark-Simulacrum commented on Jun 7, 2024

    @Mark-Simulacrum
    Member

    Closing, backported to beta.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A-resolveArea: Name/path resolution done by `rustc_resolve` specificallyP-highHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions