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

issue-80074 test should not compile #119301

Closed
Mark-Simulacrum opened this issue Dec 25, 2023 · 2 comments · Fixed by #119369
Closed

issue-80074 test should not compile #119301

Mark-Simulacrum opened this issue Dec 25, 2023 · 2 comments · Fixed by #119369
Assignees
Labels
A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) C-bug Category: This is a bug. P-high High priority regression-from-stable-to-stable Performance or correctness regression from one stable version to another. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@Mark-Simulacrum
Copy link
Member

Mark-Simulacrum commented Dec 25, 2023

The test in https://github.com/rust-lang/rust/blob/master/tests/ui/extern/issue-80074.rs shouldn't actually compile -- it's using a non-exported macro from a foreign crate. Instead, we should get an error indicating that the name is private and/or that the name doesn't exist at all.

Likely a regression introduced by #88019.

See discussion in https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/cross-crate.20macro.20usage.20allowed.20with.20no.20macro_export.3F

@Mark-Simulacrum Mark-Simulacrum added A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Dec 25, 2023
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Dec 25, 2023
@saethlin saethlin added C-bug Category: This is a bug. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Dec 26, 2023
@petrochenkov petrochenkov added the regression-from-stable-to-stable Performance or correctness regression from one stable version to another. label Dec 26, 2023
@rustbot rustbot added the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Dec 26, 2023
@apiraino
Copy link
Contributor

WG-prioritization assigning priority (Zulip discussion).

The question now is what happens if we revert/change this behaviour. What could the impact be (as an option, this could be discussed in a triage meeting)

@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 Dec 26, 2023
@bvanjoi
Copy link
Contributor

bvanjoi commented Dec 27, 2023

An interesting issue. I will attempt to resolve it.

@rustbot claim

bors added a commit to rust-lang-ci/rust that referenced this issue Dec 28, 2023
exclude unexported macro bindings from extern crate

Fixes rust-lang#119301

Macros that aren't exported from an external crate should not be defined.

r? `@petrochenkov`
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Jan 22, 2024
exclude unexported macro bindings from extern crate

Fixes rust-lang#119301

Macros that aren't exported from an external crate should not be defined.

r? `@petrochenkov`
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Jan 22, 2024
exclude unexported macro bindings from extern crate

Fixes rust-lang#119301

Macros that aren't exported from an external crate should not be defined.

r? `@petrochenkov`
@bors bors closed this as completed in c5984ca Jan 22, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Jan 22, 2024
Rollup merge of rust-lang#119369 - bvanjoi:fix-119301, r=petrochenkov

exclude unexported macro bindings from extern crate

Fixes rust-lang#119301

Macros that aren't exported from an external crate should not be defined.

r? ``@petrochenkov``
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) C-bug Category: This is a bug. P-high High priority regression-from-stable-to-stable Performance or correctness regression from one stable version to another. 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.

6 participants