mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 08:13:41 +00:00
Add #[inline]
in impl_tag
This commit is contained in:
parent
2b8d27b402
commit
bec7ce4824
@ -100,6 +100,7 @@ macro_rules! impl_tag {
|
||||
)*
|
||||
]);
|
||||
|
||||
#[inline]
|
||||
fn into_usize(self) -> usize {
|
||||
// This forbids use of repeating patterns (`Enum::V`&`Enum::V`, etc)
|
||||
// (or at least it should, see <https://github.com/rust-lang/rust/issues/110613>)
|
||||
@ -112,6 +113,7 @@ macro_rules! impl_tag {
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
unsafe fn from_usize(tag: usize) -> Self {
|
||||
match tag {
|
||||
$(
|
||||
|
Loading…
Reference in New Issue
Block a user