Rollup merge of #66498 - bjorn3:less_feature_flags, r=Dylan-DPC
Remove unused feature gates I think many of the remaining unstable things can be easily be replaced with stable things. I have kept the `#![feature(nll)]` even though it is only necessary in `libstd`, to make regressions of it harder.
This commit is contained in:
commit
ec0cfd1d01
|
@ -103,7 +103,6 @@
|
|||
//! More documentation can be found in each respective module below, and you can
|
||||
//! also check out the `src/bootstrap/README.md` file for more information.
|
||||
|
||||
#![feature(core_intrinsics)]
|
||||
#![feature(drain_filter)]
|
||||
|
||||
use std::cell::{Cell, RefCell};
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
//! This API is completely unstable and subject to change.
|
||||
|
||||
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/")]
|
||||
#![feature(arbitrary_self_types)]
|
||||
#![feature(bool_to_option)]
|
||||
#![feature(box_patterns)]
|
||||
#![feature(box_syntax)]
|
||||
|
@ -39,21 +38,15 @@
|
|||
#![feature(marker_trait_attr)]
|
||||
#![feature(extern_types)]
|
||||
#![feature(nll)]
|
||||
#![feature(optin_builtin_traits)]
|
||||
#![feature(option_expect_none)]
|
||||
#![feature(range_is_empty)]
|
||||
#![feature(specialization)]
|
||||
#![feature(unboxed_closures)]
|
||||
#![feature(thread_local)]
|
||||
#![feature(trace_macros)]
|
||||
#![feature(trusted_len)]
|
||||
#![feature(vec_remove_item)]
|
||||
#![feature(stmt_expr_attributes)]
|
||||
#![feature(integer_atomics)]
|
||||
#![feature(test)]
|
||||
#![feature(in_band_lifetimes)]
|
||||
#![feature(crate_visibility_modifier)]
|
||||
#![feature(log_syntax)]
|
||||
#![feature(associated_type_bounds)]
|
||||
#![feature(rustc_attrs)]
|
||||
#![feature(hash_raw_entry)]
|
||||
|
|
|
@ -6,18 +6,11 @@
|
|||
|
||||
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/")]
|
||||
#![feature(bool_to_option)]
|
||||
#![feature(box_patterns)]
|
||||
#![feature(box_syntax)]
|
||||
#![feature(const_cstr_unchecked)]
|
||||
#![feature(crate_visibility_modifier)]
|
||||
#![feature(extern_types)]
|
||||
#![feature(in_band_lifetimes)]
|
||||
#![feature(libc)]
|
||||
#![feature(nll)]
|
||||
#![feature(optin_builtin_traits)]
|
||||
#![feature(concat_idents)]
|
||||
#![feature(link_args)]
|
||||
#![feature(static_nobundle)]
|
||||
#![feature(trusted_len)]
|
||||
#![recursion_limit = "256"]
|
||||
|
||||
|
@ -196,7 +189,7 @@ unsafe impl Sync for LlvmCodegenBackend {}
|
|||
|
||||
impl LlvmCodegenBackend {
|
||||
pub fn new() -> Box<dyn CodegenBackend> {
|
||||
box LlvmCodegenBackend(())
|
||||
Box::new(LlvmCodegenBackend(()))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -245,7 +238,7 @@ impl CodegenBackend for LlvmCodegenBackend {
|
|||
}
|
||||
|
||||
fn metadata_loader(&self) -> Box<MetadataLoaderDyn> {
|
||||
box metadata::LlvmMetadataLoader
|
||||
Box::new(metadata::LlvmMetadataLoader)
|
||||
}
|
||||
|
||||
fn provide(&self, providers: &mut ty::query::Providers<'_>) {
|
||||
|
@ -262,12 +255,12 @@ impl CodegenBackend for LlvmCodegenBackend {
|
|||
metadata: EncodedMetadata,
|
||||
need_metadata_module: bool,
|
||||
) -> Box<dyn Any> {
|
||||
box rustc_codegen_ssa::base::codegen_crate(
|
||||
Box::new(rustc_codegen_ssa::base::codegen_crate(
|
||||
LlvmCodegenBackend(()),
|
||||
tcx,
|
||||
metadata,
|
||||
need_metadata_module,
|
||||
)
|
||||
))
|
||||
}
|
||||
|
||||
fn join_codegen(
|
||||
|
|
|
@ -22,10 +22,11 @@ impl MetadataLoader for LlvmMetadataLoader {
|
|||
// Use ArchiveRO for speed here, it's backed by LLVM and uses mmap
|
||||
// internally to read the file. We also avoid even using a memcpy by
|
||||
// just keeping the archive along while the metadata is in use.
|
||||
let archive = ArchiveRO::open(filename).map(|ar| OwningRef::new(box ar)).map_err(|e| {
|
||||
debug!("llvm didn't like `{}`: {}", filename.display(), e);
|
||||
format!("failed to read rlib metadata in '{}': {}", filename.display(), e)
|
||||
})?;
|
||||
let archive =
|
||||
ArchiveRO::open(filename).map(|ar| OwningRef::new(Box::new(ar))).map_err(|e| {
|
||||
debug!("llvm didn't like `{}`: {}", filename.display(), e);
|
||||
format!("failed to read rlib metadata in '{}': {}", filename.display(), e)
|
||||
})?;
|
||||
let buf: OwningRef<_, [u8]> = archive.try_map(|ar| {
|
||||
ar.iter()
|
||||
.filter_map(|s| s.ok())
|
||||
|
@ -44,9 +45,10 @@ impl MetadataLoader for LlvmMetadataLoader {
|
|||
let buf = path_to_c_string(filename);
|
||||
let mb = llvm::LLVMRustCreateMemoryBufferWithContentsOfFile(buf.as_ptr())
|
||||
.ok_or_else(|| format!("error reading library: '{}'", filename.display()))?;
|
||||
let of = ObjectFile::new(mb).map(|of| OwningRef::new(box of)).ok_or_else(|| {
|
||||
format!("provided path not an object file: '{}'", filename.display())
|
||||
})?;
|
||||
let of =
|
||||
ObjectFile::new(mb).map(|of| OwningRef::new(Box::new(of))).ok_or_else(|| {
|
||||
format!("provided path not an object file: '{}'", filename.display())
|
||||
})?;
|
||||
let buf = of.try_map(|of| search_meta_section(of, target, filename))?;
|
||||
Ok(rustc_erase_owner!(buf))
|
||||
}
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/")]
|
||||
#![feature(bool_to_option)]
|
||||
#![feature(box_patterns)]
|
||||
#![feature(box_syntax)]
|
||||
#![feature(core_intrinsics)]
|
||||
#![feature(libc)]
|
||||
#![feature(stmt_expr_attributes)]
|
||||
#![feature(try_blocks)]
|
||||
#![feature(in_band_lifetimes)]
|
||||
#![feature(nll)]
|
||||
|
|
|
@ -3,10 +3,6 @@
|
|||
//! This API is completely unstable and subject to change.
|
||||
|
||||
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/")]
|
||||
#![feature(arbitrary_self_types)]
|
||||
#![feature(box_patterns)]
|
||||
#![feature(box_syntax)]
|
||||
#![feature(core_intrinsics)]
|
||||
#![feature(never_type)]
|
||||
#![feature(nll)]
|
||||
#![feature(in_band_lifetimes)]
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
#![feature(generators)]
|
||||
#![feature(generator_trait)]
|
||||
#![feature(fn_traits)]
|
||||
#![feature(unsize)]
|
||||
#![feature(specialization)]
|
||||
#![feature(optin_builtin_traits)]
|
||||
#![feature(nll)]
|
||||
|
@ -20,11 +19,9 @@
|
|||
#![feature(hash_raw_entry)]
|
||||
#![feature(stmt_expr_attributes)]
|
||||
#![feature(core_intrinsics)]
|
||||
#![feature(integer_atomics)]
|
||||
#![feature(test)]
|
||||
#![feature(associated_type_bounds)]
|
||||
#![feature(thread_id_value)]
|
||||
#![cfg_attr(unix, feature(libc))]
|
||||
#![allow(rustc::default_hash_types)]
|
||||
|
||||
#[macro_use]
|
||||
|
|
|
@ -5,12 +5,7 @@
|
|||
//! This API is completely unstable and subject to change.
|
||||
|
||||
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/")]
|
||||
#![feature(box_syntax)]
|
||||
#![cfg_attr(unix, feature(libc))]
|
||||
#![feature(nll)]
|
||||
#![feature(set_stdio)]
|
||||
#![feature(no_debug)]
|
||||
#![feature(integer_atomics)]
|
||||
#![recursion_limit = "256"]
|
||||
|
||||
pub extern crate getopts;
|
||||
|
|
|
@ -4,9 +4,7 @@
|
|||
|
||||
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/")]
|
||||
#![feature(crate_visibility_modifier)]
|
||||
#![cfg_attr(unix, feature(libc))]
|
||||
#![feature(nll)]
|
||||
#![feature(optin_builtin_traits)]
|
||||
|
||||
pub use emitter::ColorConfig;
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/")]
|
||||
#![feature(in_band_lifetimes)]
|
||||
#![feature(nll)]
|
||||
#![feature(specialization)]
|
||||
#![recursion_limit = "256"]
|
||||
|
||||
#[macro_use]
|
||||
|
|
|
@ -2,10 +2,8 @@
|
|||
#![feature(box_syntax)]
|
||||
#![feature(set_stdio)]
|
||||
#![feature(nll)]
|
||||
#![feature(arbitrary_self_types)]
|
||||
#![feature(generator_trait)]
|
||||
#![feature(generators)]
|
||||
#![cfg_attr(unix, feature(libc))]
|
||||
#![recursion_limit = "256"]
|
||||
|
||||
#[cfg(unix)]
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/")]
|
||||
#![cfg_attr(test, feature(test))]
|
||||
#![feature(bool_to_option)]
|
||||
#![feature(box_patterns)]
|
||||
#![feature(box_syntax)]
|
||||
#![feature(crate_visibility_modifier)]
|
||||
#![feature(never_type)]
|
||||
|
|
|
@ -1,15 +1,11 @@
|
|||
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/")]
|
||||
#![feature(bool_to_option)]
|
||||
#![feature(box_patterns)]
|
||||
#![feature(core_intrinsics)]
|
||||
#![feature(crate_visibility_modifier)]
|
||||
#![feature(drain_filter)]
|
||||
#![feature(in_band_lifetimes)]
|
||||
#![feature(libc)]
|
||||
#![feature(nll)]
|
||||
#![feature(proc_macro_internals)]
|
||||
#![feature(proc_macro_quote)]
|
||||
#![feature(rustc_private)]
|
||||
#![feature(specialization)]
|
||||
#![feature(stmt_expr_attributes)]
|
||||
#![recursion_limit = "256"]
|
||||
|
|
|
@ -6,21 +6,15 @@ Rust MIR: a lowered representation of Rust. Also: an experiment!
|
|||
|
||||
#![feature(nll)]
|
||||
#![feature(in_band_lifetimes)]
|
||||
#![feature(inner_deref)]
|
||||
#![feature(bool_to_option)]
|
||||
#![feature(box_patterns)]
|
||||
#![feature(box_syntax)]
|
||||
#![feature(crate_visibility_modifier)]
|
||||
#![feature(core_intrinsics)]
|
||||
#![feature(decl_macro)]
|
||||
#![feature(drain_filter)]
|
||||
#![feature(exhaustive_patterns)]
|
||||
#![feature(iter_order_by)]
|
||||
#![feature(never_type)]
|
||||
#![feature(specialization)]
|
||||
#![feature(try_trait)]
|
||||
#![feature(unicode_internals)]
|
||||
#![feature(slice_concat_ext)]
|
||||
#![feature(trusted_len)]
|
||||
#![feature(try_blocks)]
|
||||
#![feature(associated_type_bounds)]
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/")]
|
||||
#![feature(bool_to_option)]
|
||||
#![feature(crate_visibility_modifier)]
|
||||
#![feature(label_break_value)]
|
||||
#![feature(nll)]
|
||||
#![recursion_limit = "256"]
|
||||
|
||||
|
|
|
@ -8,9 +8,7 @@
|
|||
#![feature(crate_visibility_modifier)]
|
||||
#![feature(nll)]
|
||||
#![feature(optin_builtin_traits)]
|
||||
#![feature(rustc_attrs)]
|
||||
#![feature(specialization)]
|
||||
#![feature(step_trait)]
|
||||
|
||||
use rustc_data_structures::AtomicRef;
|
||||
use rustc_macros::HashStable_Generic;
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
//! LLVM.
|
||||
|
||||
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/")]
|
||||
#![feature(box_syntax)]
|
||||
#![feature(bool_to_option)]
|
||||
#![feature(nll)]
|
||||
|
||||
|
|
|
@ -58,10 +58,8 @@ This API is completely unstable and subject to change.
|
|||
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/")]
|
||||
#![allow(non_camel_case_types)]
|
||||
#![feature(bool_to_option)]
|
||||
#![feature(box_patterns)]
|
||||
#![feature(box_syntax)]
|
||||
#![feature(crate_visibility_modifier)]
|
||||
#![feature(exhaustive_patterns)]
|
||||
#![feature(in_band_lifetimes)]
|
||||
#![feature(nll)]
|
||||
#![feature(try_blocks)]
|
||||
|
|
|
@ -3,19 +3,15 @@
|
|||
html_playground_url = "https://play.rust-lang.org/"
|
||||
)]
|
||||
#![feature(rustc_private)]
|
||||
#![feature(arbitrary_self_types)]
|
||||
#![feature(box_patterns)]
|
||||
#![feature(box_syntax)]
|
||||
#![feature(in_band_lifetimes)]
|
||||
#![feature(nll)]
|
||||
#![feature(set_stdio)]
|
||||
#![feature(test)]
|
||||
#![feature(vec_remove_item)]
|
||||
#![feature(ptr_offset_from)]
|
||||
#![feature(crate_visibility_modifier)]
|
||||
#![feature(drain_filter)]
|
||||
#![feature(never_type)]
|
||||
#![feature(unicode_internals)]
|
||||
#![recursion_limit = "256"]
|
||||
|
||||
extern crate env_logger;
|
||||
|
|
|
@ -10,7 +10,6 @@ Core encoding and decoding interfaces.
|
|||
test(attr(allow(unused_variables), deny(warnings)))
|
||||
)]
|
||||
#![feature(box_syntax)]
|
||||
#![feature(core_intrinsics)]
|
||||
#![feature(specialization)]
|
||||
#![feature(never_type)]
|
||||
#![feature(nll)]
|
||||
|
|
|
@ -10,7 +10,7 @@ error: internal compiler error: mutable allocation in constant
|
|||
LL | const MUTABLE_BEHIND_RAW: *mut i32 = &UnsafeCell::new(42) as *const _ as *mut _;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
thread 'rustc' panicked at 'no errors encountered even though `delay_span_bug` issued', src/librustc_errors/lib.rs:357:17
|
||||
thread 'rustc' panicked at 'no errors encountered even though `delay_span_bug` issued', src/librustc_errors/lib.rs:355:17
|
||||
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
|
||||
|
||||
error: internal compiler error: unexpected panic
|
||||
|
|
Loading…
Reference in New Issue