Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/rustc_abi/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// tidy-alphabetical-start
#![cfg_attr(all(feature = "nightly", bootstrap), feature(assert_matches))]
#![cfg_attr(all(feature = "nightly", bootstrap, test), feature(assert_matches))]
#![cfg_attr(feature = "nightly", allow(internal_features))]
#![cfg_attr(feature = "nightly", feature(rustc_attrs))]
#![cfg_attr(feature = "nightly", feature(step_trait))]
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_codegen_cranelift/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Note: please avoid adding other feature gates where possible
#![feature(rustc_private)]
// Only used to define intrinsics in `compiler_builtins.rs`.
#![feature(f16)]
#![feature(f128)]
#![cfg_attr(feature = "jit", feature(f16))]
#![cfg_attr(feature = "jit", feature(f128))]
// Note: please avoid adding other feature gates where possible
#![warn(rust_2018_idioms)]
#![warn(unreachable_pub)]
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_data_structures/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#![allow(rustc::potential_query_instability)]
#![cfg_attr(bootstrap, feature(assert_matches))]
#![cfg_attr(bootstrap, feature(cold_path))]
#![cfg_attr(test, feature(test))]
#![deny(unsafe_op_in_unsafe_fn)]
#![feature(allocator_api)]
#![feature(ascii_char)]
Expand All @@ -30,7 +31,6 @@
#![feature(ptr_alignment_type)]
#![feature(rustc_attrs)]
#![feature(sized_hierarchy)]
#![feature(test)]
#![feature(thread_id_value)]
#![feature(trusted_len)]
#![feature(type_alias_impl_trait)]
Expand Down
2 changes: 0 additions & 2 deletions compiler/rustc_errors/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
#![feature(negative_impls)]
#![feature(never_type)]
#![feature(rustc_attrs)]
#![feature(try_blocks)]
#![feature(yeet_expr)]
// tidy-alphabetical-end

extern crate self as rustc_errors;
Expand Down
3 changes: 2 additions & 1 deletion compiler/rustc_index/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// tidy-alphabetical-start
#![cfg_attr(all(feature = "nightly", test), feature(stmt_expr_attributes))]
#![cfg_attr(feature = "nightly", feature(extend_one, step_trait, test))]
#![cfg_attr(all(feature = "nightly", test), feature(test))]
#![cfg_attr(feature = "nightly", feature(extend_one, step_trait))]
#![cfg_attr(feature = "nightly", feature(new_range_api))]
// tidy-alphabetical-end

Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_macros/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// tidy-alphabetical-start
#![allow(rustc::default_hash_types)]
#![feature(if_let_guard)]
#![feature(never_type)]
#![feature(proc_macro_diagnostic)]
#![feature(proc_macro_tracked_env)]
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_metadata/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// tidy-alphabetical-start
#![allow(internal_features)]
#![feature(decl_macro)]
#![feature(error_iter)]
#![feature(file_buffered)]
#![feature(gen_blocks)]
Expand Down
3 changes: 1 addition & 2 deletions compiler/rustc_middle/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#![allow(internal_features)]
#![allow(rustc::direct_use_of_rustc_type_ir)]
#![cfg_attr(bootstrap, feature(assert_matches))]
#![cfg_attr(doc, feature(intra_doc_pointers))]
#![feature(allocator_api)]
#![feature(associated_type_defaults)]
#![feature(box_as_ptr)]
Expand All @@ -43,7 +44,6 @@
#![feature(file_buffered)]
#![feature(gen_blocks)]
#![feature(if_let_guard)]
#![feature(intra_doc_pointers)]
#![feature(min_specialization)]
#![feature(negative_impls)]
#![feature(never_type)]
Expand All @@ -56,7 +56,6 @@
#![feature(try_trait_v2_residual)]
#![feature(try_trait_v2_yeet)]
#![feature(type_alias_impl_trait)]
#![feature(unwrap_infallible)]
#![feature(yeet_expr)]
#![recursion_limit = "256"]
// tidy-alphabetical-end
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_parse/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
// tidy-alphabetical-start
#![cfg_attr(bootstrap, feature(assert_matches))]
#![cfg_attr(test, feature(iter_order_by))]
#![feature(box_patterns)]
#![feature(debug_closure_helpers)]
#![feature(default_field_values)]
#![feature(if_let_guard)]
#![feature(iter_intersperse)]
#![feature(iter_order_by)]
#![recursion_limit = "256"]
// tidy-alphabetical-end

Expand Down
5 changes: 0 additions & 5 deletions compiler/rustc_passes/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@
//!
//! This API is completely unstable and subject to change.
// tidy-alphabetical-start
#![feature(if_let_guard)]
#![feature(map_try_insert)]
// tidy-alphabetical-end

use rustc_middle::query::Providers;

pub mod abi_test;
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_pattern_analysis/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
// tidy-alphabetical-start
#![allow(unused_crate_dependencies)]
#![cfg_attr(feature = "rustc", feature(if_let_guard))]
// tidy-alphabetical-end

pub(crate) mod checks;
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_public_bridge/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
// tidy-alphabetical-start
#![allow(rustc::usage_of_ty_tykind)]
#![doc(test(attr(allow(unused_variables), deny(warnings), allow(internal_features))))]
#![feature(sized_hierarchy)]
#![feature(trait_alias)]
// tidy-alphabetical-end

Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_resolve/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#![feature(const_default)]
#![feature(const_trait_impl)]
#![feature(control_flow_into_value)]
#![feature(decl_macro)]
#![feature(default_field_values)]
#![feature(if_let_guard)]
#![feature(iter_intersperse)]
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_serialize/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// tidy-alphabetical-start
#![allow(internal_features)]
#![allow(rustc::internal)]
#![cfg_attr(test, feature(test))]
#![doc(test(attr(allow(unused_variables), deny(warnings), allow(internal_features))))]
#![feature(core_intrinsics)]
#![feature(min_specialization)]
Expand Down
5 changes: 1 addition & 4 deletions compiler/rustc_type_ir/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@
#![allow(rustc::usage_of_type_ir_inherent)]
#![allow(rustc::usage_of_type_ir_traits)]
#![cfg_attr(feature = "nightly", allow(internal_features))]
#![cfg_attr(
feature = "nightly",
feature(associated_type_defaults, never_type, rustc_attrs, negative_impls)
)]
#![cfg_attr(feature = "nightly", feature(associated_type_defaults, rustc_attrs, negative_impls))]
// tidy-alphabetical-end

extern crate self as rustc_type_ir;
Expand Down
8 changes: 4 additions & 4 deletions library/alloc/src/boxed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1514,7 +1514,7 @@ impl<T: ?Sized, A: Allocator> Box<T, A> {
/// Recreate a `Box` which was previously converted to a `NonNull` pointer
/// using [`Box::into_non_null_with_allocator`]:
/// ```
/// #![feature(allocator_api, box_vec_non_null)]
/// #![feature(allocator_api)]
///
/// use std::alloc::System;
///
Expand All @@ -1524,7 +1524,7 @@ impl<T: ?Sized, A: Allocator> Box<T, A> {
/// ```
/// Manually create a `Box` from scratch by using the system allocator:
/// ```
/// #![feature(allocator_api, box_vec_non_null, slice_ptr_get)]
/// #![feature(allocator_api)]
///
/// use std::alloc::{Allocator, Layout, System};
///
Expand Down Expand Up @@ -1629,7 +1629,7 @@ impl<T: ?Sized, A: Allocator> Box<T, A> {
/// Converting the `NonNull` pointer back into a `Box` with
/// [`Box::from_non_null_in`] for automatic cleanup:
/// ```
/// #![feature(allocator_api, box_vec_non_null)]
/// #![feature(allocator_api)]
///
/// use std::alloc::System;
///
Expand All @@ -1640,7 +1640,7 @@ impl<T: ?Sized, A: Allocator> Box<T, A> {
/// Manual cleanup by explicitly running the destructor and deallocating
/// the memory:
/// ```
/// #![feature(allocator_api, box_vec_non_null)]
/// #![feature(allocator_api)]
///
/// use std::alloc::{Allocator, Layout, System};
///
Expand Down
7 changes: 1 addition & 6 deletions library/alloc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
//! [`Rc`]: rc
//! [`RefCell`]: core::cell

#![allow(unused_features)]
#![allow(incomplete_features)]
#![allow(unused_attributes)]
#![stable(feature = "alloc", since = "1.36.0")]
Expand Down Expand Up @@ -85,13 +86,11 @@
//
// Library features:
// tidy-alphabetical-start
#![cfg_attr(not(no_global_oom_handling), feature(string_replace_in_place))]
#![feature(allocator_api)]
#![feature(array_into_iter_constructors)]
#![feature(ascii_char)]
#![feature(async_fn_traits)]
#![feature(async_iterator)]
#![feature(box_vec_non_null)]
#![feature(bstr)]
#![feature(bstr_internals)]
#![feature(cast_maybe_uninit)]
Expand Down Expand Up @@ -148,7 +147,6 @@
#![feature(slice_ptr_get)]
#![feature(slice_range)]
#![feature(std_internals)]
#![feature(str_internals)]
#![feature(temporary_niche_types)]
#![feature(transmutability)]
#![feature(trivial_clone)]
Expand All @@ -158,7 +156,6 @@
#![feature(try_blocks)]
#![feature(try_trait_v2)]
#![feature(try_trait_v2_residual)]
#![feature(try_with_capacity)]
#![feature(tuple_trait)]
#![feature(ub_checks)]
#![feature(unicode_internals)]
Expand All @@ -176,10 +173,8 @@
#![feature(const_trait_impl)]
#![feature(coroutine_trait)]
#![feature(decl_macro)]
#![feature(derive_const)]
#![feature(dropck_eyepatch)]
#![feature(fundamental)]
#![feature(hashmap_internals)]
#![feature(intrinsics)]
#![feature(lang_items)]
#![feature(min_specialization)]
Expand Down
6 changes: 3 additions & 3 deletions library/alloc/src/vec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1238,7 +1238,7 @@ impl<T, A: Allocator> Vec<T, A> {
/// # Examples
///
/// ```
/// #![feature(allocator_api, box_vec_non_null)]
/// #![feature(allocator_api)]
///
/// use std::alloc::System;
///
Expand All @@ -1265,7 +1265,7 @@ impl<T, A: Allocator> Vec<T, A> {
/// Using memory that was allocated elsewhere:
///
/// ```rust
/// #![feature(allocator_api, box_vec_non_null)]
/// #![feature(allocator_api)]
///
/// use std::alloc::{AllocError, Allocator, Global, Layout};
///
Expand Down Expand Up @@ -1365,7 +1365,7 @@ impl<T, A: Allocator> Vec<T, A> {
/// # Examples
///
/// ```
/// #![feature(allocator_api, box_vec_non_null)]
/// #![feature(allocator_api)]
///
/// use std::alloc::System;
///
Expand Down
5 changes: 0 additions & 5 deletions library/alloctests/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
// tidy-alphabetical-start
#![feature(allocator_api)]
#![feature(array_into_iter_constructors)]
#![feature(box_vec_non_null)]
#![feature(char_internals)]
#![feature(const_alloc_error)]
#![feature(const_cmp)]
Expand Down Expand Up @@ -55,16 +54,12 @@
//
// Language features:
// tidy-alphabetical-start
#![feature(cfg_sanitize)]
#![feature(const_trait_impl)]
#![feature(dropck_eyepatch)]
#![feature(lang_items)]
#![feature(min_specialization)]
#![feature(negative_impls)]
#![feature(never_type)]
#![feature(optimize_attribute)]
#![feature(prelude_import)]
#![feature(rustc_allow_const_fn_unstable)]
#![feature(rustc_attrs)]
#![feature(staged_api)]
#![feature(test)]
Expand Down
3 changes: 0 additions & 3 deletions library/alloctests/tests/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#![feature(const_heap)]
#![feature(deque_extend_front)]
#![feature(iter_array_chunks)]
#![feature(wtf8_internals)]
#![feature(cow_is_borrowed)]
#![feature(core_intrinsics)]
#![feature(downcast_unchecked)]
Expand All @@ -30,8 +29,6 @@
#![feature(string_remove_matches)]
#![feature(const_btree_len)]
#![feature(const_trait_impl)]
#![feature(panic_update_hook)]
#![feature(pointer_is_aligned_to)]
#![feature(test)]
#![feature(thin_box)]
#![feature(drain_keep_rest)]
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/ascii/ascii_char.rs
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,7 @@ impl AsciiChar {
/// # Examples
///
/// ```
/// #![feature(ascii_char, ascii_char_variants, is_ascii_octdigit)]
/// #![feature(ascii_char, ascii_char_variants)]
///
/// use std::ascii;
///
Expand Down
1 change: 0 additions & 1 deletion library/core/src/cell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,6 @@ impl<T, const N: usize> Cell<[T; N]> {
/// following is unsound:
///
/// ```rust
/// #![feature(cell_get_cloned)]
/// # use std::cell::Cell;
///
/// #[derive(Copy, Debug)]
Expand Down
2 changes: 2 additions & 0 deletions library/core/src/convert/num.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ impl_float_from_bool!(
f16;
doctest_prefix:
// rustdoc doesn't remove the conventional space after the `///`
///# #![allow(unused_features)]
///#![feature(f16)]
///# #[cfg(all(target_arch = "x86_64", target_os = "linux"))] {
///
Expand All @@ -230,6 +231,7 @@ impl_float_from_bool!(f64);
impl_float_from_bool!(
f128;
doctest_prefix:
///# #![allow(unused_features)]
///#![feature(f128)]
///# #[cfg(all(target_arch = "x86_64", target_os = "linux"))] {
///
Expand Down
Loading
Loading