Allow unused rules in some places in the compiler, library and tools
This commit is contained in:
parent
0bd2232fe4
commit
5646e9a172
4 changed files with 6 additions and 4 deletions
|
@ -816,6 +816,7 @@ fn generic_simd_intrinsic<'ll, 'tcx>(
|
||||||
span: Span,
|
span: Span,
|
||||||
) -> Result<&'ll Value, ()> {
|
) -> Result<&'ll Value, ()> {
|
||||||
// macros for error handling:
|
// macros for error handling:
|
||||||
|
#[cfg_attr(not(bootstrap), allow(unused_macro_rules))]
|
||||||
macro_rules! emit_error {
|
macro_rules! emit_error {
|
||||||
($msg: tt) => {
|
($msg: tt) => {
|
||||||
emit_error!($msg, )
|
emit_error!($msg, )
|
||||||
|
@ -1144,6 +1145,7 @@ fn generic_simd_intrinsic<'ll, 'tcx>(
|
||||||
span: Span,
|
span: Span,
|
||||||
args: &[OperandRef<'tcx, &'ll Value>],
|
args: &[OperandRef<'tcx, &'ll Value>],
|
||||||
) -> Result<&'ll Value, ()> {
|
) -> Result<&'ll Value, ()> {
|
||||||
|
#[cfg_attr(not(bootstrap), allow(unused_macro_rules))]
|
||||||
macro_rules! emit_error {
|
macro_rules! emit_error {
|
||||||
($msg: tt) => {
|
($msg: tt) => {
|
||||||
emit_error!($msg, )
|
emit_error!($msg, )
|
||||||
|
|
|
@ -258,6 +258,7 @@ macro_rules! make_mir_visitor {
|
||||||
// for best performance, we want to use an iterator rather
|
// for best performance, we want to use an iterator rather
|
||||||
// than a for-loop, to avoid calling `body::Body::invalidate` for
|
// than a for-loop, to avoid calling `body::Body::invalidate` for
|
||||||
// each basic block.
|
// each basic block.
|
||||||
|
#[cfg_attr(not(bootstrap), allow(unused_macro_rules))]
|
||||||
macro_rules! basic_blocks {
|
macro_rules! basic_blocks {
|
||||||
(mut) => (body.basic_blocks_mut().iter_enumerated_mut());
|
(mut) => (body.basic_blocks_mut().iter_enumerated_mut());
|
||||||
() => (body.basic_blocks().iter_enumerated());
|
() => (body.basic_blocks().iter_enumerated());
|
||||||
|
@ -279,6 +280,7 @@ macro_rules! make_mir_visitor {
|
||||||
self.visit_local_decl(local, & $($mutability)? body.local_decls[local]);
|
self.visit_local_decl(local, & $($mutability)? body.local_decls[local]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg_attr(not(bootstrap), allow(unused_macro_rules))]
|
||||||
macro_rules! type_annotations {
|
macro_rules! type_annotations {
|
||||||
(mut) => (body.user_type_annotations.iter_enumerated_mut());
|
(mut) => (body.user_type_annotations.iter_enumerated_mut());
|
||||||
() => (body.user_type_annotations.iter_enumerated());
|
() => (body.user_type_annotations.iter_enumerated());
|
||||||
|
@ -932,6 +934,7 @@ macro_rules! make_mir_visitor {
|
||||||
body: &$($mutability)? Body<'tcx>,
|
body: &$($mutability)? Body<'tcx>,
|
||||||
location: Location
|
location: Location
|
||||||
) {
|
) {
|
||||||
|
#[cfg_attr(not(bootstrap), allow(unused_macro_rules))]
|
||||||
macro_rules! basic_blocks {
|
macro_rules! basic_blocks {
|
||||||
(mut) => (body.basic_blocks_mut());
|
(mut) => (body.basic_blocks_mut());
|
||||||
() => (body.basic_blocks());
|
() => (body.basic_blocks());
|
||||||
|
|
|
@ -56,6 +56,7 @@ macro_rules! vec {
|
||||||
// `slice::into_vec` function which is only available with cfg(test)
|
// `slice::into_vec` function which is only available with cfg(test)
|
||||||
// NB see the slice::hack module in slice.rs for more information
|
// NB see the slice::hack module in slice.rs for more information
|
||||||
#[cfg(all(not(no_global_oom_handling), test))]
|
#[cfg(all(not(no_global_oom_handling), test))]
|
||||||
|
#[cfg_attr(not(bootstrap), allow(unused_macro_rules))]
|
||||||
macro_rules! vec {
|
macro_rules! vec {
|
||||||
() => (
|
() => (
|
||||||
$crate::vec::Vec::new()
|
$crate::vec::Vec::new()
|
||||||
|
|
|
@ -280,10 +280,6 @@ fn main() {
|
||||||
fn register_all() -> Vec<(&'static str, Option<&'static str>)> {
|
fn register_all() -> Vec<(&'static str, Option<&'static str>)> {
|
||||||
let mut long_codes: Vec<(&'static str, Option<&'static str>)> = Vec::new();
|
let mut long_codes: Vec<(&'static str, Option<&'static str>)> = Vec::new();
|
||||||
macro_rules! register_diagnostics {
|
macro_rules! register_diagnostics {
|
||||||
($($ecode:ident: $message:expr,)*) => (
|
|
||||||
register_diagnostics!{$($ecode:$message,)* ;}
|
|
||||||
);
|
|
||||||
|
|
||||||
($($ecode:ident: $message:expr,)* ; $($code:ident,)*) => (
|
($($ecode:ident: $message:expr,)* ; $($code:ident,)*) => (
|
||||||
$(
|
$(
|
||||||
{long_codes.extend([
|
{long_codes.extend([
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue