]> git.lizzy.rs Git - rust.git/commitdiff
alloc: Convert statics to constants
authorAlex Crichton <alex@alexcrichton.com>
Mon, 6 Oct 2014 23:32:00 +0000 (16:32 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Thu, 9 Oct 2014 16:44:51 +0000 (09:44 -0700)
src/liballoc/heap.rs

index 9a4390747198c9652a7a04e9e8f93cf621100a27..5a0f860ff844ef74278d244c83dc8437262a3278 100644 (file)
@@ -85,7 +85,7 @@ pub fn stats_print() {
 ///
 /// This preserves the non-null invariant for types like `Box<T>`. The address may overlap with
 /// non-zero-size memory allocations.
-pub static EMPTY: *mut () = 0x1 as *mut ();
+pub const EMPTY: *mut () = 0x1 as *mut ();
 
 /// The allocator for unique pointers.
 #[cfg(not(test))]