exclude unexported macro bindings from extern crate#119369
exclude unexported macro bindings from extern crate#119369bors merged 1 commit intorust-lang:masterfrom
Conversation
|
@bors try |
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 |
1 similar comment
|
☀️ Try build successful - checks-actions |
|
@craterbot check |
|
👌 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
|
🚧 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
|
🎉 Experiment
|
|
Many "No space left on device" errors, need to run for the second time as usual. |
|
👌 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
|
🚧 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
|
🎉 Experiment
|
|
The majority of issues are caused by the usage of the #[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? |
|
The issue still need to be created - #119369 (comment). |
This comment has been minimized.
This comment has been minimized.
|
r=me with the remaining nits addressed. |
This comment has been minimized.
This comment has been minimized.
|
Thanks! |
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`
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`
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#118578 (core: introduce split_at{,_mut}_checked) - rust-lang#119369 (exclude unexported macro bindings from extern crate) - rust-lang#119408 (xous: misc fixes + add network support) - rust-lang#119943 (std::net: bind update for using backlog as `-1` too.) - rust-lang#119948 (Make `unsafe_op_in_unsafe_fn` migrated in edition 2024) - rust-lang#119999 (remote-test: use u64 to represent file size) - rust-lang#120152 (add help message for `exclusive_range_pattern` error) - rust-lang#120213 (Don't actually make bound ty/const for RTN) - rust-lang#120225 (Fix -Zremap-path-scope typo) Failed merges: - rust-lang#119972 (Add `ErrCode`) r? `@ghost` `@rustbot` modify labels: rollup
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``
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 <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: tautschnig <[email protected]> Co-authored-by: Qinheping Hu <[email protected]> Co-authored-by: Michael Tautschnig <[email protected]> Co-authored-by: Felipe R. Monteiro <[email protected]>
Fixes #119301
Macros that aren't exported from an external crate should not be defined.
r? @petrochenkov