about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2019-11-11 22:18:35 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2019-11-11 22:23:25 +0300
commite7c42f0cf0b46ec4788f98c5bf30cda8a45cdd83 (patch)
tree58c7230f991bdf442e75865b477bdcbfb9ce0b6b
parent56237d75b4271a8a2e0f47d86ea76ebf6d966152 (diff)
downloadrust-e7c42f0cf0b46ec4788f98c5bf30cda8a45cdd83.tar.gz
rust-e7c42f0cf0b46ec4788f98c5bf30cda8a45cdd83.zip
Tiny cleanup to size assertions
-rw-r--r--src/librustc_errors/lib.rs4
-rw-r--r--src/libsyntax/ast.rs5
-rw-r--r--src/libsyntax/token.rs4
-rw-r--r--src/libsyntax/tokenstream.rs4
4 files changed, 4 insertions, 13 deletions
diff --git a/src/librustc_errors/lib.rs b/src/librustc_errors/lib.rs
index fb5cccf61a7..8ee28875c62 100644
--- a/src/librustc_errors/lib.rs
+++ b/src/librustc_errors/lib.rs
@@ -15,8 +15,6 @@ use Level::*;
 
 use emitter::{Emitter, EmitterWriter, is_case_difference};
 use registry::Registry;
-#[cfg(target_arch = "x86_64")]
-use rustc_data_structures::static_assert_size;
 use rustc_data_structures::sync::{self, Lrc, Lock};
 use rustc_data_structures::fx::{FxHashSet, FxIndexMap};
 use rustc_data_structures::stable_hasher::StableHasher;
@@ -54,7 +52,7 @@ pub type PResult<'a, T> = Result<T, DiagnosticBuilder<'a>>;
 // `PResult` is used a lot. Make sure it doesn't unintentionally get bigger.
 // (See also the comment on `DiagnosticBuilderInner`.)
 #[cfg(target_arch = "x86_64")]
-static_assert_size!(PResult<'_, bool>, 16);
+rustc_data_structures::static_assert_size!(PResult<'_, bool>, 16);
 
 /// Indicates the confidence in the correctness of a suggestion.
 ///
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs
index c83931a0668..13bf6752ba2 100644
--- a/src/libsyntax/ast.rs
+++ b/src/libsyntax/ast.rs
@@ -38,9 +38,6 @@ use rustc_data_structures::thin_vec::ThinVec;
 use rustc_index::vec::Idx;
 use rustc_serialize::{self, Decoder, Encoder};
 
-#[cfg(target_arch = "x86_64")]
-use rustc_data_structures::static_assert_size;
-
 use std::fmt;
 
 #[cfg(test)]
@@ -1028,7 +1025,7 @@ pub struct Expr {
 
 // `Expr` is used a lot. Make sure it doesn't unintentionally get bigger.
 #[cfg(target_arch = "x86_64")]
-static_assert_size!(Expr, 96);
+rustc_data_structures::static_assert_size!(Expr, 96);
 
 impl Expr {
     /// Returns `true` if this expression would be valid somewhere that expects a value;
diff --git a/src/libsyntax/token.rs b/src/libsyntax/token.rs
index c70e3442703..ab798e93d67 100644
--- a/src/libsyntax/token.rs
+++ b/src/libsyntax/token.rs
@@ -14,8 +14,6 @@ use syntax_pos::{self, Span, DUMMY_SP};
 
 use std::fmt;
 use std::mem;
-#[cfg(target_arch = "x86_64")]
-use rustc_data_structures::static_assert_size;
 use rustc_data_structures::sync::Lrc;
 
 #[derive(Clone, PartialEq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)]
@@ -261,7 +259,7 @@ pub enum TokenKind {
 
 // `TokenKind` is used a lot. Make sure it doesn't unintentionally get bigger.
 #[cfg(target_arch = "x86_64")]
-static_assert_size!(TokenKind, 16);
+rustc_data_structures::static_assert_size!(TokenKind, 16);
 
 #[derive(Clone, PartialEq, RustcEncodable, RustcDecodable, Debug)]
 pub struct Token {
diff --git a/src/libsyntax/tokenstream.rs b/src/libsyntax/tokenstream.rs
index 4d08d0974c1..2201f1ed6ca 100644
--- a/src/libsyntax/tokenstream.rs
+++ b/src/libsyntax/tokenstream.rs
@@ -16,8 +16,6 @@
 use crate::token::{self, DelimToken, Token, TokenKind};
 
 use syntax_pos::{Span, DUMMY_SP};
-#[cfg(target_arch = "x86_64")]
-use rustc_data_structures::static_assert_size;
 use rustc_data_structures::sync::Lrc;
 use smallvec::{SmallVec, smallvec};
 
@@ -129,7 +127,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_size!(TokenStream, 8);
+rustc_data_structures::static_assert_size!(TokenStream, 8);
 
 #[derive(Clone, Copy, Debug, PartialEq, RustcEncodable, RustcDecodable)]
 pub enum IsJoint {