Reorder unsafe
macro cases
This commit is contained in:
parent
c4de986afa
commit
6ec492fdde
1 changed files with 33 additions and 33 deletions
|
@ -183,17 +183,6 @@ macro_rules! template {
|
||||||
}
|
}
|
||||||
|
|
||||||
macro_rules! ungated {
|
macro_rules! ungated {
|
||||||
($attr:ident, $typ:expr, $tpl:expr, $duplicates:expr, $encode_cross_crate:expr $(,)?) => {
|
|
||||||
BuiltinAttribute {
|
|
||||||
name: sym::$attr,
|
|
||||||
encode_cross_crate: $encode_cross_crate,
|
|
||||||
type_: $typ,
|
|
||||||
safety: AttributeSafety::Normal,
|
|
||||||
template: $tpl,
|
|
||||||
gate: Ungated,
|
|
||||||
duplicates: $duplicates,
|
|
||||||
}
|
|
||||||
};
|
|
||||||
(unsafe $attr:ident, $typ:expr, $tpl:expr, $duplicates:expr, $encode_cross_crate:expr $(,)?) => {
|
(unsafe $attr:ident, $typ:expr, $tpl:expr, $duplicates:expr, $encode_cross_crate:expr $(,)?) => {
|
||||||
BuiltinAttribute {
|
BuiltinAttribute {
|
||||||
name: sym::$attr,
|
name: sym::$attr,
|
||||||
|
@ -205,31 +194,20 @@ macro_rules! ungated {
|
||||||
duplicates: $duplicates,
|
duplicates: $duplicates,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
($attr:ident, $typ:expr, $tpl:expr, $duplicates:expr, $encode_cross_crate:expr $(,)?) => {
|
||||||
|
BuiltinAttribute {
|
||||||
|
name: sym::$attr,
|
||||||
|
encode_cross_crate: $encode_cross_crate,
|
||||||
|
type_: $typ,
|
||||||
|
safety: AttributeSafety::Normal,
|
||||||
|
template: $tpl,
|
||||||
|
gate: Ungated,
|
||||||
|
duplicates: $duplicates,
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
macro_rules! gated {
|
macro_rules! gated {
|
||||||
($attr:ident, $typ:expr, $tpl:expr, $duplicates:expr, $encode_cross_crate:expr, $gate:ident, $msg:expr $(,)?) => {
|
|
||||||
BuiltinAttribute {
|
|
||||||
name: sym::$attr,
|
|
||||||
encode_cross_crate: $encode_cross_crate,
|
|
||||||
type_: $typ,
|
|
||||||
safety: AttributeSafety::Normal,
|
|
||||||
template: $tpl,
|
|
||||||
duplicates: $duplicates,
|
|
||||||
gate: Gated(Stability::Unstable, sym::$gate, $msg, cfg_fn!($gate)),
|
|
||||||
}
|
|
||||||
};
|
|
||||||
($attr:ident, $typ:expr, $tpl:expr, $duplicates:expr, $encode_cross_crate:expr, $msg:expr $(,)?) => {
|
|
||||||
BuiltinAttribute {
|
|
||||||
name: sym::$attr,
|
|
||||||
encode_cross_crate: $encode_cross_crate,
|
|
||||||
type_: $typ,
|
|
||||||
safety: AttributeSafety::Normal,
|
|
||||||
template: $tpl,
|
|
||||||
duplicates: $duplicates,
|
|
||||||
gate: Gated(Stability::Unstable, sym::$attr, $msg, cfg_fn!($attr)),
|
|
||||||
}
|
|
||||||
};
|
|
||||||
(unsafe $attr:ident, $typ:expr, $tpl:expr, $duplicates:expr, $encode_cross_crate:expr, $gate:ident, $msg:expr $(,)?) => {
|
(unsafe $attr:ident, $typ:expr, $tpl:expr, $duplicates:expr, $encode_cross_crate:expr, $gate:ident, $msg:expr $(,)?) => {
|
||||||
BuiltinAttribute {
|
BuiltinAttribute {
|
||||||
name: sym::$attr,
|
name: sym::$attr,
|
||||||
|
@ -252,6 +230,28 @@ macro_rules! gated {
|
||||||
gate: Gated(Stability::Unstable, sym::$attr, $msg, cfg_fn!($attr)),
|
gate: Gated(Stability::Unstable, sym::$attr, $msg, cfg_fn!($attr)),
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
($attr:ident, $typ:expr, $tpl:expr, $duplicates:expr, $encode_cross_crate:expr, $gate:ident, $msg:expr $(,)?) => {
|
||||||
|
BuiltinAttribute {
|
||||||
|
name: sym::$attr,
|
||||||
|
encode_cross_crate: $encode_cross_crate,
|
||||||
|
type_: $typ,
|
||||||
|
safety: AttributeSafety::Normal,
|
||||||
|
template: $tpl,
|
||||||
|
duplicates: $duplicates,
|
||||||
|
gate: Gated(Stability::Unstable, sym::$gate, $msg, cfg_fn!($gate)),
|
||||||
|
}
|
||||||
|
};
|
||||||
|
($attr:ident, $typ:expr, $tpl:expr, $duplicates:expr, $encode_cross_crate:expr, $msg:expr $(,)?) => {
|
||||||
|
BuiltinAttribute {
|
||||||
|
name: sym::$attr,
|
||||||
|
encode_cross_crate: $encode_cross_crate,
|
||||||
|
type_: $typ,
|
||||||
|
safety: AttributeSafety::Normal,
|
||||||
|
template: $tpl,
|
||||||
|
duplicates: $duplicates,
|
||||||
|
gate: Gated(Stability::Unstable, sym::$attr, $msg, cfg_fn!($attr)),
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
macro_rules! rustc_attr {
|
macro_rules! rustc_attr {
|
||||||
|
|
Loading…
Add table
Reference in a new issue