]> git.lizzy.rs Git - rust.git/blobdiff - src/test/compile-fail/lint-dead-code-1.rs
Update compile fail tests to use isize.
[rust.git] / src / test / compile-fail / lint-dead-code-1.rs
index 9e5f15c2721961797f1de9864751670fcda937f9..e55922db3d5fc75d8050c855750c6efdd7069eed 100644 (file)
@@ -29,28 +29,28 @@ mod foo2 {
     pub struct Bar2;
 }
 
-pub static pub_static: int = 0;
-static priv_static: int = 0; //~ ERROR: static item is never used
-const used_static: int = 0;
-pub static used_static2: int = used_static;
-const USED_STATIC: int = 0;
-const STATIC_USED_IN_ENUM_DISCRIMINANT: int = 10;
-
-pub const pub_const: int = 0;
-const priv_const: int = 0; //~ ERROR: constant item is never used
-const used_const: int = 0;
-pub const used_const2: int = used_const;
-const USED_CONST: int = 1;
-const CONST_USED_IN_ENUM_DISCRIMINANT: int = 11;
+pub static pub_static: isize = 0;
+static priv_static: isize = 0; //~ ERROR: static item is never used
+const used_static: isize = 0;
+pub static used_static2: isize = used_static;
+const USED_STATIC: isize = 0;
+const STATIC_USED_IN_ENUM_DISCRIMINANT: isize = 10;
+
+pub const pub_const: isize = 0;
+const priv_const: isize = 0; //~ ERROR: constant item is never used
+const used_const: isize = 0;
+pub const used_const2: isize = used_const;
+const USED_CONST: isize = 1;
+const CONST_USED_IN_ENUM_DISCRIMINANT: isize = 11;
 
 pub type typ = *const UsedStruct4;
 pub struct PubStruct;
 struct PrivStruct; //~ ERROR: struct is never used
 struct UsedStruct1 {
     #[allow(dead_code)]
-    x: int
+    x: isize
 }
-struct UsedStruct2(int);
+struct UsedStruct2(isize);
 struct UsedStruct3;
 struct UsedStruct4;
 // this struct is never used directly, but its method is, so we don't want