diff options
| author | Eduard Burtescu <edy.burt@gmail.com> | 2015-05-27 11:18:36 +0300 |
|---|---|---|
| committer | Eduard Burtescu <edy.burt@gmail.com> | 2015-05-27 11:19:03 +0300 |
| commit | 377b0900aede976b2d37a499bbd7b62c2e39b358 (patch) | |
| tree | b4a5a4431d36ed1a4e0a39c7d2ef2563ecac9bf4 /src/test/debuginfo | |
| parent | 6e8e4f847c2ea02fec021ea15dfb2de6beac797a (diff) | |
| download | rust-377b0900aede976b2d37a499bbd7b62c2e39b358.tar.gz rust-377b0900aede976b2d37a499bbd7b62c2e39b358.zip | |
Use `const fn` to abstract away the contents of UnsafeCell & friends.
Diffstat (limited to 'src/test/debuginfo')
| -rw-r--r-- | src/test/debuginfo/constant-debug-locs.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/debuginfo/constant-debug-locs.rs b/src/test/debuginfo/constant-debug-locs.rs index 5fc58075504..72448ca2e00 100644 --- a/src/test/debuginfo/constant-debug-locs.rs +++ b/src/test/debuginfo/constant-debug-locs.rs @@ -19,7 +19,7 @@ // This test makes sure that the compiler doesn't crash when trying to assign // debug locations to const-expressions. -use std::sync::MUTEX_INIT; +use std::sync::StaticMutex; use std::cell::UnsafeCell; const CONSTANT: u64 = 3 + 4; @@ -49,7 +49,7 @@ const VEC: [u32; 8] = [0; 8]; const NESTED: (Struct, TupleStruct) = (STRUCT, TUPLE_STRUCT); -const UNSAFE_CELL: UnsafeCell<bool> = UnsafeCell { value: false }; +const UNSAFE_CELL: UnsafeCell<bool> = UnsafeCell::new(false); fn main() { let mut _constant = CONSTANT; @@ -61,6 +61,6 @@ fn main() { let mut _string = STRING; let mut _vec = VEC; let mut _nested = NESTED; - let mut _extern = MUTEX_INIT; + let mut _extern = StaticMutex::new(); let mut _unsafe_cell = UNSAFE_CELL; } |
