From a365d19c4675fca84e4c7414875b97c63175a82e Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Tue, 12 Apr 2016 09:41:23 +0200 Subject: [PATCH] Fix whitespace in rustc error message --- posts/2016-04-11-kernel-heap.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/posts/2016-04-11-kernel-heap.md b/posts/2016-04-11-kernel-heap.md index e03b6936..758355cb 100644 --- a/posts/2016-04-11-kernel-heap.md +++ b/posts/2016-04-11-kernel-heap.md @@ -735,7 +735,7 @@ However, we get an error when we try to compile it: error: function calls in statics are limited to constant functions, struct and enum constructors [E0015] static HEAP: Mutex = Mutex::new(Heap::new(HEAP_START, HEAP_SIZE)); - ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` The reason is that the `Heap::new` function needs to initialize the first hole (like described [above](#initialization)). This can't be done at compile time, so the function can't be a `const` function. Therefore we can't use it to initialize a static.