about summary refs log tree commit diff
path: root/src/libcore/num
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-05-16 23:27:36 +0000
committerbors <bors@rust-lang.org>2017-05-16 23:27:36 +0000
commit86319e473e4aef20d924e8be365400c72a191910 (patch)
treef547ec0ef101c9170d4deee175e3c53adebcd719 /src/libcore/num
parent0f68728fb372ff6b0b543f87ac6776f9d12a4b05 (diff)
parent6dbd706906d922ae5606eb5654dd804095ffc8c8 (diff)
Auto merge of #41907 - est31:macro_unused, r=jseyfried
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*
Diffstat (limited to 'src/libcore/num')
-rw-r--r--src/libcore/num/wrapping.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libcore/num/wrapping.rs b/src/libcore/num/wrapping.rs
index 013f02685ba..6cc374b13b7 100644
--- a/src/libcore/num/wrapping.rs
+++ b/src/libcore/num/wrapping.rs
@@ -12,6 +12,7 @@ use super::Wrapping;
 
 use ops::*;
 
+#[allow(unused_macros)]
 macro_rules! sh_impl_signed {
     ($t:ident, $f:ident) => (
         #[stable(feature = "rust1", since = "1.0.0")]