diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2019-05-19 13:59:44 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2019-05-19 13:59:44 +0300 |
| commit | 88fa5c6a45a533a78c698a22f4b16002a3bc9fc3 (patch) | |
| tree | 7de7f6bc6d9aa974bbddbe37ab2641290eb3c12e /src/libsyntax/tokenstream.rs | |
| parent | e0d2f7462b07039c7327d8331272a804c025b047 (diff) | |
| download | rust-88fa5c6a45a533a78c698a22f4b16002a3bc9fc3.tar.gz rust-88fa5c6a45a533a78c698a22f4b16002a3bc9fc3.zip | |
Improve type size assertions
Now they - Tell what the new size is, when it changes - Do not require passing an identifier
Diffstat (limited to 'src/libsyntax/tokenstream.rs')
| -rw-r--r-- | src/libsyntax/tokenstream.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/tokenstream.rs b/src/libsyntax/tokenstream.rs index 93b5ecadd14..3cb16c30a50 100644 --- a/src/libsyntax/tokenstream.rs +++ b/src/libsyntax/tokenstream.rs @@ -21,7 +21,7 @@ use crate::print::pprust; use syntax_pos::{BytePos, Mark, Span, DUMMY_SP}; #[cfg(target_arch = "x86_64")] -use rustc_data_structures::static_assert; +use rustc_data_structures::static_assert_size; use rustc_data_structures::sync::Lrc; use serialize::{Decoder, Decodable, Encoder, Encodable}; use smallvec::{SmallVec, smallvec}; @@ -158,7 +158,7 @@ pub type TreeAndJoint = (TokenTree, IsJoint); // `TokenStream` is used a lot. Make sure it doesn't unintentionally get bigger. #[cfg(target_arch = "x86_64")] -static_assert!(MEM_SIZE_OF_TOKEN_STREAM: mem::size_of::<TokenStream>() == 8); +static_assert_size!(TokenStream, 8); #[derive(Clone, Copy, Debug, PartialEq)] pub enum IsJoint { |
