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

Remove unused macros from the codebase #41934

Merged
merged 1 commit into from
May 13, 2017

Conversation

est31
Copy link
Member

@est31 est31 commented May 12, 2017

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

@rust-highfive
Copy link
Collaborator

r? @arielb1

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

@est31
Copy link
Member Author

est31 commented May 12, 2017

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)].

@est31 est31 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 est31 force-pushed the remove_unused_macros branch from 18f494e to 80891f6 Compare May 12, 2017 07:39
@nagisa
Copy link
Member

nagisa commented May 12, 2017

@bors r+

@bors
Copy link
Contributor

bors commented May 12, 2017

📌 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.
@shepmaster shepmaster 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
Member

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
Member

eddyb commented May 13, 2017

@bors rollup

bors added a commit that referenced this pull request May 13, 2017
@bors bors merged commit 80891f6 into rust-lang:master May 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 free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: 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