From d4b20a5acc65d10b5b09b67b9a26b9cf8b6cd552 Mon Sep 17 00:00:00 2001 From: Julien Cretin Date: Thu, 10 Dec 2020 16:14:17 +0100 Subject: [PATCH 1/2] Fix linked_list_allocator version to fix build They released version 0.8.7 today which breaks our assumption that Heap::empty is callable in const context. --- third_party/lang-items/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/lang-items/Cargo.toml b/third_party/lang-items/Cargo.toml index 39ffbf0..d4b3e33 100644 --- a/third_party/lang-items/Cargo.toml +++ b/third_party/lang-items/Cargo.toml @@ -11,7 +11,7 @@ edition = "2018" [dependencies] libtock_core = { path = "../../third_party/libtock-rs/core", default-features = false, features = ["alloc_init", "custom_panic_handler", "custom_alloc_error_handler"] } libtock_drivers = { path = "../libtock-drivers" } -linked_list_allocator = { version = "0.8.1", default-features = false } +linked_list_allocator = { version = "=0.8.1", default-features = false } [features] debug_allocations = [] From 7a641d639199c108007149eb01cedd26e4e0e655 Mon Sep 17 00:00:00 2001 From: Julien Cretin Date: Thu, 10 Dec 2020 16:20:26 +0100 Subject: [PATCH 2/2] Use the new const_mut_refs default feature of linked_list_allocator This is necessary for Heap::empty() to be const. --- third_party/lang-items/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/lang-items/Cargo.toml b/third_party/lang-items/Cargo.toml index d4b3e33..5d109f3 100644 --- a/third_party/lang-items/Cargo.toml +++ b/third_party/lang-items/Cargo.toml @@ -11,7 +11,7 @@ edition = "2018" [dependencies] libtock_core = { path = "../../third_party/libtock-rs/core", default-features = false, features = ["alloc_init", "custom_panic_handler", "custom_alloc_error_handler"] } libtock_drivers = { path = "../libtock-drivers" } -linked_list_allocator = { version = "=0.8.1", default-features = false } +linked_list_allocator = { version = "0.8.7", default-features = false, features = ["const_mut_refs"] } [features] debug_allocations = []