Skip to content

Remove unused macros from the codebase - #41934

Merged
bors merged 1 commit into
rust-lang:masterfrom
est31:remove_unused_macros
May 13, 2017
Merged

Remove unused macros from the codebase#41934
bors merged 1 commit into
rust-lang:masterfrom
est31:remove_unused_macros

Conversation

@est31

Copy link
Copy Markdown
Member

Thanks to the lint I've implemented in #41907 I've found some unused macros inside the rustc codebase.

@rust-highfive

Copy link
Copy Markdown
Contributor

r? @arielb1

(rust_highfive has picked a reviewer for you, use r? to override)

@est31

Copy link
Copy Markdown
MemberAuthor

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 #![deny(warnings)].

@est31est31 mentioned this pull request May 12, 2017
3 tasks
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.
@est31
est31force-pushed the remove_unused_macros branch from 18f494e to 80891f6CompareMay 12, 2017 07:39
@nagisa

Copy link
Copy Markdown
Member

@bors r+

@bors

bors commented May 12, 2017

Copy link
Copy Markdown
Collaborator

📌 Commit 80891f6 has been approved by nagisa

Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this pull request May 12, 2017
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.
Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this pull request May 12, 2017
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.
Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this pull request May 12, 2017
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.
@shepmastershepmaster added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label May 12, 2017
bors added a commit that referenced this pull request May 12, 2017
Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this pull request May 13, 2017
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 {

Copy link
Copy Markdown
Contributor

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.

@eddyb

Copy link
Copy Markdown
Contributor

@bors rollup

bors added a commit that referenced this pull request May 13, 2017
@bors
bors merged commit 80891f6 into rust-lang:masterMay 13, 2017
frewsxcv added a commit to frewsxcv/rust that referenced this pull request May 16, 2017
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*
Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this pull request May 16, 2017
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*
bors added a commit that referenced this pull request May 16, 2017
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*
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@est31@rust-highfive@nagisa@bors@eddyb@shepmaster@arielb1