diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs index 637323331f582..042e3b55cc994 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs @@ -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}; diff --git a/src/librustc/lib.rs b/src/librustc/lib.rs index 744ee1a65e154..33552ffb03e6d 100644 --- a/src/librustc/lib.rs +++ b/src/librustc/lib.rs @@ -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(overlapping_marker_traits)] #![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)] diff --git a/src/librustc_codegen_llvm/lib.rs b/src/librustc_codegen_llvm/lib.rs index 8091a74854070..98a3e695fa079 100644 --- a/src/librustc_codegen_llvm/lib.rs +++ b/src/librustc_codegen_llvm/lib.rs @@ -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 { - box LlvmCodegenBackend(()) + Box::new(LlvmCodegenBackend(())) } } @@ -245,7 +238,7 @@ impl CodegenBackend for LlvmCodegenBackend { } fn metadata_loader(&self) -> Box { - 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 { - box rustc_codegen_ssa::base::codegen_crate( + Box::new(rustc_codegen_ssa::base::codegen_crate( LlvmCodegenBackend(()), tcx, metadata, need_metadata_module, - ) + )) } fn join_codegen( diff --git a/src/librustc_codegen_llvm/metadata.rs b/src/librustc_codegen_llvm/metadata.rs index abe34bb148ce5..0f30c2c020de7 100644 --- a/src/librustc_codegen_llvm/metadata.rs +++ b/src/librustc_codegen_llvm/metadata.rs @@ -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)) } diff --git a/src/librustc_codegen_ssa/lib.rs b/src/librustc_codegen_ssa/lib.rs index f39587122c56d..a2bb39b9e4019 100644 --- a/src/librustc_codegen_ssa/lib.rs +++ b/src/librustc_codegen_ssa/lib.rs @@ -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)] diff --git a/src/librustc_codegen_utils/lib.rs b/src/librustc_codegen_utils/lib.rs index 6b802bf530e86..38906bbaef810 100644 --- a/src/librustc_codegen_utils/lib.rs +++ b/src/librustc_codegen_utils/lib.rs @@ -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)] diff --git a/src/librustc_data_structures/lib.rs b/src/librustc_data_structures/lib.rs index aaac7fb4460cd..13792a0c890c4 100644 --- a/src/librustc_data_structures/lib.rs +++ b/src/librustc_data_structures/lib.rs @@ -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] diff --git a/src/librustc_driver/lib.rs b/src/librustc_driver/lib.rs index 019ff431bcb97..52c6399498534 100644 --- a/src/librustc_driver/lib.rs +++ b/src/librustc_driver/lib.rs @@ -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; diff --git a/src/librustc_errors/lib.rs b/src/librustc_errors/lib.rs index 17b293401f89e..109b151e4140b 100644 --- a/src/librustc_errors/lib.rs +++ b/src/librustc_errors/lib.rs @@ -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; diff --git a/src/librustc_incremental/lib.rs b/src/librustc_incremental/lib.rs index 7ce4def2886b8..ca824fde7efc1 100644 --- a/src/librustc_incremental/lib.rs +++ b/src/librustc_incremental/lib.rs @@ -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] diff --git a/src/librustc_interface/lib.rs b/src/librustc_interface/lib.rs index e4e6849ab8e59..ba1e2216ca805 100644 --- a/src/librustc_interface/lib.rs +++ b/src/librustc_interface/lib.rs @@ -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)] diff --git a/src/librustc_lint/lib.rs b/src/librustc_lint/lib.rs index 78e9d0f14f2de..6e2db65c84005 100644 --- a/src/librustc_lint/lib.rs +++ b/src/librustc_lint/lib.rs @@ -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)] diff --git a/src/librustc_metadata/lib.rs b/src/librustc_metadata/lib.rs index d94f23ff8bc6a..d4cc3c32616ac 100644 --- a/src/librustc_metadata/lib.rs +++ b/src/librustc_metadata/lib.rs @@ -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"] diff --git a/src/librustc_mir/lib.rs b/src/librustc_mir/lib.rs index f064869d66471..4f1b90e34cf00 100644 --- a/src/librustc_mir/lib.rs +++ b/src/librustc_mir/lib.rs @@ -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)] diff --git a/src/librustc_resolve/lib.rs b/src/librustc_resolve/lib.rs index af4ba4c0eb20e..2e63c3e170605 100644 --- a/src/librustc_resolve/lib.rs +++ b/src/librustc_resolve/lib.rs @@ -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"] diff --git a/src/librustc_span/lib.rs b/src/librustc_span/lib.rs index 413bd77daae24..2e149c96b9123 100644 --- a/src/librustc_span/lib.rs +++ b/src/librustc_span/lib.rs @@ -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; diff --git a/src/librustc_target/lib.rs b/src/librustc_target/lib.rs index a9db0254a7d11..71150e74f70d4 100644 --- a/src/librustc_target/lib.rs +++ b/src/librustc_target/lib.rs @@ -8,7 +8,6 @@ //! LLVM. #![doc(html_root_url = "https://doc.rust-lang.org/nightly/")] -#![feature(box_syntax)] #![feature(bool_to_option)] #![feature(nll)] diff --git a/src/librustc_typeck/lib.rs b/src/librustc_typeck/lib.rs index 05ea9b1ac56dc..474868f0dd6c4 100644 --- a/src/librustc_typeck/lib.rs +++ b/src/librustc_typeck/lib.rs @@ -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)] diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs index ed3f0f94e0ed8..4e0a2d9427431 100644 --- a/src/librustdoc/lib.rs +++ b/src/librustdoc/lib.rs @@ -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; diff --git a/src/libserialize/lib.rs b/src/libserialize/lib.rs index 280fb078f7de4..b990e71bef0dd 100644 --- a/src/libserialize/lib.rs +++ b/src/libserialize/lib.rs @@ -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)] diff --git a/src/test/ui/consts/miri_unleashed/mutable_const2.stderr b/src/test/ui/consts/miri_unleashed/mutable_const2.stderr index a316d8f1698ac..3eb8e0ec18288 100644 --- a/src/test/ui/consts/miri_unleashed/mutable_const2.stderr +++ b/src/test/ui/consts/miri_unleashed/mutable_const2.stderr @@ -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