diff options
Diffstat (limited to 'src/test/compile-fail/lint-dead-code-1.rs')
| -rw-r--r-- | src/test/compile-fail/lint-dead-code-1.rs | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/test/compile-fail/lint-dead-code-1.rs b/src/test/compile-fail/lint-dead-code-1.rs index 9e5f15c2721..e55922db3d5 100644 --- a/src/test/compile-fail/lint-dead-code-1.rs +++ b/src/test/compile-fail/lint-dead-code-1.rs @@ -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 |
