Skip to content

Commit 9714d3c

Browse files
committed
tests: uncomment regression tests for 13970, 13971, 13972
Closes #13971
1 parent a0f86de commit 9714d3c

File tree

1 file changed

+17
-27
lines changed

1 file changed

+17
-27
lines changed

src/test/run-pass/const-block.rs

Lines changed: 17 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
use std::marker::Sync;
1515

1616
struct Foo {
17-
a: uint,
17+
a: usize,
1818
b: *const ()
1919
}
2020

@@ -24,27 +24,24 @@ fn foo<T>(a: T) -> T {
2424
a
2525
}
2626

27-
static BLOCK_INTEGRAL: uint = { 1 };
27+
static BLOCK_INTEGRAL: usize = { 1 };
2828
static BLOCK_EXPLICIT_UNIT: () = { () };
2929
static BLOCK_IMPLICIT_UNIT: () = { };
3030
static BLOCK_FLOAT: f64 = { 1.0 };
31-
static BLOCK_ENUM: Option<uint> = { Some(100) };
31+
static BLOCK_ENUM: Option<usize> = { Some(100) };
3232
static BLOCK_STRUCT: Foo = { Foo { a: 12, b: 0 as *const () } };
33-
static BLOCK_UNSAFE: uint = unsafe { 1000 };
33+
static BLOCK_UNSAFE: usize = unsafe { 1000 };
3434

35-
// FIXME: #13970
36-
// static BLOCK_FN_INFERRED: fn(uint) -> uint = { foo };
35+
static BLOCK_FN_INFERRED: fn(usize) -> usize = { foo };
3736

38-
// FIXME: #13971
39-
// static BLOCK_FN: fn(uint) -> uint = { foo::<uint> };
37+
static BLOCK_FN: fn(usize) -> usize = { foo::<usize> };
4038

41-
// FIXME: #13972
42-
// static BLOCK_ENUM_CONSTRUCTOR: fn(uint) -> Option<uint> = { Some };
39+
static BLOCK_ENUM_CONSTRUCTOR: fn(usize) -> Option<usize> = { Some };
4340

44-
// FIXME: #13973
45-
// static BLOCK_UNSAFE_SAFE_PTR: &'static int = unsafe { &*(0xdeadbeef as *int) };
46-
// static BLOCK_UNSAFE_SAFE_PTR_2: &'static int = unsafe {
47-
// static X: *int = 0xdeadbeef as *int;
41+
// FIXME #13972
42+
// static BLOCK_UNSAFE_SAFE_PTR: &'static isize = unsafe { &*(0xdeadbeef as *const isize) };
43+
// static BLOCK_UNSAFE_SAFE_PTR_2: &'static isize = unsafe {
44+
// const X: *const isize = 0xdeadbeef as *const isize;
4845
// &*X
4946
// };
5047

@@ -57,17 +54,10 @@ pub fn main() {
5754
assert_eq!(BLOCK_STRUCT.b, 0 as *const ());
5855
assert_eq!(BLOCK_ENUM, Some(100));
5956
assert_eq!(BLOCK_UNSAFE, 1000);
60-
61-
// FIXME: #13970
62-
// assert_eq!(BLOCK_FN_INFERRED(300), 300);
63-
64-
// FIXME: #13971
65-
// assert_eq!(BLOCK_FN(300), 300);
66-
67-
// FIXME: #13972
68-
// assert_eq!(BLOCK_ENUM_CONSTRUCTOR(200), Some(200));
69-
70-
// FIXME: #13973
71-
// assert_eq!(BLOCK_UNSAFE_SAFE_PTR as *int as uint, 0xdeadbeef_u);
72-
// assert_eq!(BLOCK_UNSAFE_SAFE_PTR_2 as *int as uint, 0xdeadbeef_u);
57+
assert_eq!(BLOCK_FN_INFERRED(300), 300);
58+
assert_eq!(BLOCK_FN(300), 300);
59+
assert_eq!(BLOCK_ENUM_CONSTRUCTOR(200), Some(200));
60+
// FIXME #13972
61+
// assert_eq!(BLOCK_UNSAFE_SAFE_PTR as *const isize as usize, 0xdeadbeef_us);
62+
// assert_eq!(BLOCK_UNSAFE_SAFE_PTR_2 as *const isize as usize, 0xdeadbeef_us);
7363
}

0 commit comments

Comments
 (0)