exclude unexported macro bindings from extern crate by bvanjoi · Pull Request #119369 · rust-lang/rust (original) (raw)
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 andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation45 Commits1 Checks0 Files changed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
Fixes #119301
Macros that aren't exported from an external crate should not be defined.
rustbot added S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
Relevant to the compiler team, which will review and decide on the PR/issue.
labels
bors added a commit to rust-lang-ci/rust that referenced this pull request
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
☀️ Try build successful - checks-actions
Build commit: 3832a95 (3832a95f57d4260fb5641e183906f49b4e5c6bdd
)
1 similar comment
☀️ Try build successful - checks-actions
Build commit: 3832a95 (3832a95f57d4260fb5641e183906f49b4e5c6bdd
)
🚧 Experiment pr-119369
is now running
ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more
🚧 Experiment pr-119369-1
is now running
ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more
The majority of issues are caused by the usage of the quote
which exported from other crates. For instance, such instances occur in leptos_macro
:
#[macro_use] extern crate proc_macro_error;
use proc_macro::TokenStream;
#[proc_macro] pub fn view(_a: TokenStream) -> TokenStream { quote!{}; TokenStream::new() }
and the reduced was:
// extern-1 #[macro_export] macro_rules! quote { () => {} }
// extern-2 use extern_1::quote;
// code.rs #[macro_use] extern crate sera_2;
fn main() { quote! {}; }
Should we consider adding a lint for this issue?
rustbot added S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
and removed S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
This comment has been minimized.
r=me with the remaining nits addressed.
This comment has been minimized.
📌 Commit 9c3091e has been approved by petrochenkov
It is now in the queue for this repository.
bors added S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
labels
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request
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 pull request
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
This was referenced
Jan 22, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request
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
feliperodri added a commit to model-checking/kani that referenced this pull request
Related PRs so far:
- rust-lang/rust#119869
- rust-lang/rust#120080
- rust-lang/rust#120128
- rust-lang/rust#119369
- rust-lang/rust#116672
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.
Signed-off-by: Felipe R. Monteiro felisous@amazon.com Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: tautschnig tautschnig@users.noreply.github.com Co-authored-by: Qinheping Hu qinhh@amazon.com Co-authored-by: Michael Tautschnig tautschn@amazon.com Co-authored-by: Felipe R. Monteiro felisous@amazon.com
Labels
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Relevant to the compiler team, which will review and decide on the PR/issue.