This repository was archived by the owner on Mar 7, 2021. It is now read-only.
This repository was archived by the owner on Mar 7, 2021. It is now read-only.
Use stable Rust (tracking ticket for unstable features we use) #41
Open
Description
More ambitious than #37, and won't be possible for a long while yet. Here's what we use currently:
-
#![feature(alloc)]
: to be able to use liballoc (Box
,String
,Vec
, etc.). Tracking issue for location of facade crates rust-lang/rust#27783 I think, though I don't see any recent progress about liballoc specifically. (But as noted in Make it possible to write modules in stable Rust #37 most things we need are re-exported through libstd, so maybe we can advocate for pushing the unstable attribute down to the things that aren't re-exported?) -
#![feature(global_allocator)]
: to be able to define an allocator backed bykmalloc
. PR Stabilize GlobalAlloc and #[global_allocator] rust-lang/rust#51241 from today stabilizesglobal_allocator
and I think all the things underallocator_api
that we use. (Also, as part of its work, it pushes down some of liballoc's wide instability to particular modules; we might want to advocate to do more of that to stabilize the re-exported parts of liballoc to solve the previous one.) -
#![feature(allocator_api)]
: See Tracking issue for the #[alloc_error_handler] attribute (for no_std + liballoc) rust-lang/rust#51540 -
#![feature(lang_items)]
for#[lang = "oom"]
: See Tracking issue for the #[alloc_error_handler] attribute (for no_std + liballoc) rust-lang/rust#51540 -
#![feature(use_extern_macros)]
: I think we don't need it, Remove#![feature(use_extern_macros)]
#40. -
#![feature(panic_implementation)]
: for#[panic_implementation]
-
#![feature(alloc_error_handler)]
: See either Tracking issue for the #[alloc_error_handler] attribute (for no_std + liballoc) rust-lang/rust#51540 or RFC: Existential types with external definition rust-lang/rfcs#2492. -
#[feaure(const_str_as_bytes)]
: See Stabilizestr::len
,[T]::len
andstr::as_bytes
as const fn rust-lang/rust#63770