]> git.lizzy.rs Git - rust.git/blobdiff - src/libsyntax/attr.rs
rollup merge of #21438: taralx/kill-racycell
[rust.git] / src / libsyntax / attr.rs
index 2cea55dfc55efa6ae5bf890fac8296ef8e2ca804..8f58b7694b6fb3763a7318517ede958544052433 100644 (file)
@@ -170,7 +170,7 @@ pub fn mk_word_item(name: InternedString) -> P<MetaItem> {
     P(dummy_spanned(MetaWord(name)))
 }
 
-thread_local! { static NEXT_ATTR_ID: Cell<uint> = Cell::new(0) }
+thread_local! { static NEXT_ATTR_ID: Cell<usize> = Cell::new(0) }
 
 pub fn mk_attr_id() -> AttrId {
     let id = NEXT_ATTR_ID.with(|slot| {
@@ -464,10 +464,10 @@ fn int_type_of_word(s: &str) -> Option<IntType> {
         "u32" => Some(UnsignedInt(ast::TyU32)),
         "i64" => Some(SignedInt(ast::TyI64)),
         "u64" => Some(UnsignedInt(ast::TyU64)),
-        "int" => Some(SignedInt(ast::TyIs)),
-        "uint" => Some(UnsignedInt(ast::TyUs)),
-        "isize" => Some(SignedInt(ast::TyIs)),
-        "usize" => Some(UnsignedInt(ast::TyUs)),
+        "int" => Some(SignedInt(ast::TyIs(true))),
+        "uint" => Some(UnsignedInt(ast::TyUs(true))),
+        "isize" => Some(SignedInt(ast::TyIs(false))),
+        "usize" => Some(UnsignedInt(ast::TyUs(false))),
         _ => None
     }
 }
@@ -511,7 +511,7 @@ fn is_ffi_safe(self) -> bool {
             SignedInt(ast::TyI16) | UnsignedInt(ast::TyU16) |
             SignedInt(ast::TyI32) | UnsignedInt(ast::TyU32) |
             SignedInt(ast::TyI64) | UnsignedInt(ast::TyU64) => true,
-            SignedInt(ast::TyIs) | UnsignedInt(ast::TyUs) => false
+            SignedInt(ast::TyIs(_)) | UnsignedInt(ast::TyUs(_)) => false
         }
     }
 }