Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clean up the std library's #![feature]s
Signed-off-by: JmPotato <ghzpotato@gmail.com>
- Loading branch information
Showing
1 changed file
with
0 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -212,7 +212,6 @@ | |
#![needs_panic_runtime] | ||
// std may use features in a platform-specific way | ||
#![allow(unused_features)] | ||
#![feature(rustc_allow_const_fn_unstable)] | ||
#![cfg_attr(test, feature(internal_output_capture, print_internals, update_panic_count))] | ||
#![cfg_attr( | ||
all(target_vendor = "fortanix", target_env = "sgx"), | ||
|
@@ -222,22 +221,17 @@ | |
// std is implemented with unstable features, many of which are internal | ||
// compiler details that will never be stable | ||
// NB: the following list is sorted to minimize merge conflicts. | ||
#![feature(absolute_path)] | ||
#![feature(alloc_error_handler)] | ||
#![feature(alloc_layout_extra)] | ||
#![feature(allocator_api)] | ||
#![feature(allocator_internals)] | ||
#![feature(allow_internal_unsafe)] | ||
#![feature(allow_internal_unstable)] | ||
#![feature(arbitrary_self_types)] | ||
#![feature(array_error_internals)] | ||
#![feature(assert_matches)] | ||
#![feature(associated_type_bounds)] | ||
#![feature(async_iterator)] | ||
#![feature(atomic_mut_ptr)] | ||
#![feature(auto_traits)] | ||
#![feature(bench_black_box)] | ||
#![feature(bool_to_option)] | ||
#![feature(box_syntax)] | ||
#![feature(c_unwind)] | ||
#![feature(c_variadic)] | ||
|
@@ -248,7 +242,6 @@ | |
#![feature(char_internals)] | ||
#![feature(concat_bytes)] | ||
#![feature(concat_idents)] | ||
#![feature(const_fn_floating_point_arithmetic)] | ||
#![feature(const_fn_fn_ptr_basics)] | ||
#![feature(const_fn_trait_bound)] | ||
#![feature(const_format_args)] | ||
|
@@ -257,10 +250,8 @@ | |
#![feature(const_ipv4)] | ||
#![feature(const_ipv6)] | ||
#![feature(const_option)] | ||
#![feature(const_mut_refs)] | ||
#![feature(const_socketaddr)] | ||
#![feature(const_trait_impl)] | ||
#![feature(container_error_extra)] | ||
#![feature(c_size_t)] | ||
#![feature(core_ffi_c)] | ||
#![feature(core_intrinsics)] | ||
|
@@ -279,24 +270,17 @@ | |
#![feature(exact_size_is_empty)] | ||
#![feature(exhaustive_patterns)] | ||
#![feature(extend_one)] | ||
#![feature(fn_traits)] | ||
#![feature(float_minimum_maximum)] | ||
#![feature(format_args_nl)] | ||
#![feature(gen_future)] | ||
#![feature(generator_trait)] | ||
#![feature(get_mut_unchecked)] | ||
#![feature(hashmap_internals)] | ||
#![feature(int_error_internals)] | ||
#![feature(integer_atomics)] | ||
#![feature(int_log)] | ||
#![feature(into_future)] | ||
#![feature(intra_doc_pointers)] | ||
#![feature(lang_items)] | ||
#![feature(linkage)] | ||
#![feature(log_syntax)] | ||
#![feature(map_try_insert)] | ||
#![feature(maybe_uninit_slice)] | ||
#![feature(maybe_uninit_uninit_array)] | ||
#![feature(maybe_uninit_write_slice)] | ||
#![feature(min_specialization)] | ||
#![feature(mixed_integer_ops)] | ||
|
@@ -316,19 +300,14 @@ | |
#![feature(portable_simd)] | ||
#![feature(prelude_import)] | ||
#![feature(ptr_as_uninit)] | ||
#![feature(ptr_internals)] | ||
#![feature(raw_os_nonzero)] | ||
#![feature(rustc_attrs)] | ||
#![feature(rustc_private)] | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
JmPotato
Author
Contributor
|
||
#![feature(saturating_int_impl)] | ||
#![feature(slice_concat_ext)] | ||
#![feature(slice_internals)] | ||
#![feature(slice_ptr_get)] | ||
#![feature(slice_ptr_len)] | ||
#![feature(staged_api)] | ||
#![feature(std_internals)] | ||
#![feature(stdsimd)] | ||
#![feature(stmt_expr_attributes)] | ||
#![feature(str_internals)] | ||
#![feature(test)] | ||
#![feature(thread_local)] | ||
|
@@ -338,8 +317,6 @@ | |
#![feature(trace_macros)] | ||
#![feature(try_blocks)] | ||
#![feature(try_reserve_kind)] | ||
#![feature(unboxed_closures)] | ||
#![feature(unwrap_infallible)] | ||
#![feature(vec_into_raw_parts)] | ||
// NB: the above list is sorted to minimize merge conflicts. | ||
#![default_lib_allocator] | ||
|
With this removal of rustc_private we're hitting some errors while trying to build std in a non-standard way (we're using a build system not based on cargo that directly invokes rustc).
E.g., the first error is with
rust/library/std/src/lib.rs
Line 342 in 0407030
use of unstable library feature 'rustc_private': this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
In the
rustc
invocation used to build std, we pass the freshly builtliblibc-hash.rlib
explicitly as--extern=libc=/path/to/liblibc-hash.rlib
(so we don't fall back to the one shipped in sysroot).Does it make sense to add rustc_private back, or alternatively do you have any suggestions how we can maybe adapt the rustc invocation to tell it to apply the rustc_private feature to this module?