-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Remove unused macros from the codebase #41934
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
r? @arielb1 (rust_highfive has picked a reviewer for you, use r? to override) |
I want to get this through separate review as its easy and simple, and to not burden @jseyfried . This change does block the other PR though, as if the lint gets added, we emit warnings for each of these macros and all of the crates have |
Removes unused macros from: * libcore * libcollections The last use of these two macros was removed in commit b64c9d5 when the char_range_at_reverse function was been removed. * librustc_errors Their last use was removed by commits 2f2c3e1 and 11dc974. * libsyntax_ext * librustc_trans Also, put the otry macro in back/msvc/mod.rs under the same cfg argument as the places that use it.
18f494e
to
80891f6
Compare
@bors r+ |
📌 Commit 80891f6 has been approved by |
Remove unused macros from the codebase Thanks to the lint I've implemented in rust-lang#41907 I've found some unused macros inside the rustc codebase.
Remove unused macros from the codebase Thanks to the lint I've implemented in rust-lang#41907 I've found some unused macros inside the rustc codebase.
Remove unused macros from the codebase Thanks to the lint I've implemented in rust-lang#41907 I've found some unused macros inside the rustc codebase.
Remove unused macros from the codebase Thanks to the lint I've implemented in rust-lang#41907 I've found some unused macros inside the rustc codebase.
// option. This file may not be copied, modified, or distributed | ||
// except according to those terms. | ||
|
||
macro_rules! unpack_datum { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahahahahahhaahahaha I didn't even realize this file existed.
@bors rollup |
Add lint for unused macros Addresses parts of rust-lang#34938, to add a lint for unused macros. We now output warnings by default when we encounter a macro that we didn't use for expansion. Issues to be resolved before this PR is ready for merge: - [x] fix the NodeId issue described above - [x] remove all unused macros from rustc and the libraries or set `#[allow(unused_macros)]` next to them if they should be kept for some reason. This is needed for successful boostrap and bors to accept the PR. -> rust-lang#41934 - [x] ~~implement the full extent of rust-lang#34938, that means the macro match arm checking as well.~~ *let's not do this for now*
Add lint for unused macros Addresses parts of rust-lang#34938, to add a lint for unused macros. We now output warnings by default when we encounter a macro that we didn't use for expansion. Issues to be resolved before this PR is ready for merge: - [x] fix the NodeId issue described above - [x] remove all unused macros from rustc and the libraries or set `#[allow(unused_macros)]` next to them if they should be kept for some reason. This is needed for successful boostrap and bors to accept the PR. -> rust-lang#41934 - [x] ~~implement the full extent of rust-lang#34938, that means the macro match arm checking as well.~~ *let's not do this for now*
Add lint for unused macros Addresses parts of #34938, to add a lint for unused macros. We now output warnings by default when we encounter a macro that we didn't use for expansion. Issues to be resolved before this PR is ready for merge: - [x] fix the NodeId issue described above - [x] remove all unused macros from rustc and the libraries or set `#[allow(unused_macros)]` next to them if they should be kept for some reason. This is needed for successful boostrap and bors to accept the PR. -> #41934 - [x] ~~implement the full extent of #34938, that means the macro match arm checking as well.~~ *let's not do this for now*
Thanks to the lint I've implemented in #41907 I've found some unused macros inside the rustc codebase.