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 | 32 |
1 files changed, 16 insertions, 16 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..34c79be7118 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 @@ -90,7 +90,7 @@ pub fn pub_fn() { let e = used_enum::foo3; SemiUsedStruct::la_la_la(); - let i = 1i; + let i = 1is; match i { USED_STATIC => (), USED_CONST => (), |
