Skip to content

Commit

Permalink
rename core_intrinsics feature to core_intrinsics_internal so that it…
Browse files Browse the repository at this point in the history
… is considered 'internal'
  • Loading branch information
RalfJung committed Nov 21, 2023
1 parent d1583eb commit b9cdbc6
Show file tree
Hide file tree
Showing 221 changed files with 243 additions and 243 deletions.
2 changes: 1 addition & 1 deletion compiler/rustc_arena/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
)]
#![doc(rust_logo)]
#![feature(rustdoc_internals)]
#![feature(core_intrinsics)]
#![feature(core_intrinsics_internal)]
#![feature(dropck_eyepatch)]
#![feature(new_uninit)]
#![feature(maybe_uninit_slice)]
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_builtin_macros/src/deriving/generic/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1127,7 +1127,7 @@ impl<'a> MethodDef<'a> {
/// is equivalent to:
///
/// ```
/// #![feature(core_intrinsics)]
/// #![feature(core_intrinsics_internal)]
/// enum A {
/// A1,
/// A2(i32)
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_cranelift/example/alloc_example.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(start, core_intrinsics, alloc_error_handler, lang_items)]
#![feature(start, core_intrinsics_internal, alloc_error_handler, lang_items)]
#![no_std]

extern crate alloc;
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_cranelift/example/mod_bench.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(start, core_intrinsics, lang_items)]
#![feature(start, core_intrinsics_internal, lang_items)]
#![no_std]

#[cfg_attr(unix, link(name = "c"))]
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_cranelift/example/std_example.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#![feature(
core_intrinsics,
core_intrinsics_internal,
coroutines,
coroutine_trait,
is_sorted,
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_gcc/example/alloc_example.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(start, core_intrinsics, alloc_error_handler, lang_items)]
#![feature(start, core_intrinsics_internal, alloc_error_handler, lang_items)]
#![no_std]
#![allow(internal_features)]

Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_gcc/example/mod_bench.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(start, core_intrinsics, lang_items)]
#![feature(start, core_intrinsics_internal, lang_items)]
#![no_std]
#![allow(internal_features)]

Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_gcc/example/std_example.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(core_intrinsics, coroutines, coroutine_trait, is_sorted)]
#![feature(core_intrinsics_internal, coroutines, coroutine_trait, is_sorted)]

#[cfg(feature="master")]
#[cfg(target_arch="x86_64")]
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 @@ -20,7 +20,7 @@
#![feature(auto_traits)]
#![feature(cell_leak)]
#![feature(cfg_match)]
#![feature(core_intrinsics)]
#![feature(core_intrinsics_internal)]
#![feature(extend_one)]
#![feature(hash_raw_entry)]
#![feature(hasher_prefixfree_extras)]
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_middle/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#![feature(array_windows)]
#![feature(assert_matches)]
#![feature(box_patterns)]
#![feature(core_intrinsics)]
#![feature(core_intrinsics_internal)]
#![feature(discriminant_kind)]
#![feature(exhaustive_patterns)]
#![feature(coroutines)]
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_query_system/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#![feature(assert_matches)]
#![feature(core_intrinsics)]
#![feature(core_intrinsics_internal)]
#![feature(hash_raw_entry)]
#![feature(min_specialization)]
#![feature(let_chains)]
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_serialize/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#![feature(allocator_api)]
#![feature(associated_type_bounds)]
#![feature(const_option)]
#![feature(core_intrinsics)]
#![feature(core_intrinsics_internal)]
#![feature(inline_const)]
#![feature(min_specialization)]
#![feature(never_type)]
Expand Down
2 changes: 1 addition & 1 deletion library/alloc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
#![feature(const_refs_to_cell)]
#![feature(const_size_of_val)]
#![feature(const_waker)]
#![feature(core_intrinsics)]
#![feature(core_intrinsics_internal)]
#![feature(core_panic)]
#![feature(deprecated_suggestion)]
#![feature(dispatch_from_dyn)]
Expand Down
2 changes: 1 addition & 1 deletion library/alloc/tests/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#![feature(const_slice_from_raw_parts_mut)]
#![feature(const_ptr_write)]
#![feature(const_try)]
#![feature(core_intrinsics)]
#![feature(core_intrinsics_internal)]
#![feature(extract_if)]
#![feature(exact_size_is_empty)]
#![feature(linked_list_cursors)]
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/clone.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ pub trait Clone: Sized {
/// Derive macro generating an impl of the trait `Clone`.
#[rustc_builtin_macro]
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
#[allow_internal_unstable(core_intrinsics, derive_clone_copy)]
#[allow_internal_unstable(core_intrinsics_internal, derive_clone_copy)]
pub macro Clone($item:item) {
/* compiler built-in */
}
Expand Down
8 changes: 4 additions & 4 deletions library/core/src/cmp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ pub trait PartialEq<Rhs: ?Sized = Self> {
/// The behavior of this macro is described in detail [here](PartialEq#derivable).
#[rustc_builtin_macro]
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
#[allow_internal_unstable(core_intrinsics, structural_match)]
#[allow_internal_unstable(core_intrinsics_internal, structural_match)]
pub macro PartialEq($item:item) {
/* compiler built-in */
}
Expand Down Expand Up @@ -320,7 +320,7 @@ pub trait Eq: PartialEq<Self> {
/// Derive macro generating an impl of the trait [`Eq`].
#[rustc_builtin_macro]
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
#[allow_internal_unstable(core_intrinsics, derive_eq, structural_match)]
#[allow_internal_unstable(core_intrinsics_internal, derive_eq, structural_match)]
#[allow_internal_unstable(coverage_attribute)]
pub macro Eq($item:item) {
/* compiler built-in */
Expand Down Expand Up @@ -888,7 +888,7 @@ pub trait Ord: Eq + PartialOrd<Self> {
/// The behavior of this macro is described in detail [here](Ord#derivable).
#[rustc_builtin_macro]
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
#[allow_internal_unstable(core_intrinsics)]
#[allow_internal_unstable(core_intrinsics_internal)]
pub macro Ord($item:item) {
/* compiler built-in */
}
Expand Down Expand Up @@ -1178,7 +1178,7 @@ pub trait PartialOrd<Rhs: ?Sized = Self>: PartialEq<Rhs> {
/// The behavior of this macro is described in detail [here](PartialOrd#derivable).
#[rustc_builtin_macro]
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
#[allow_internal_unstable(core_intrinsics)]
#[allow_internal_unstable(core_intrinsics_internal)]
pub macro PartialOrd($item:item) {
/* compiler built-in */
}
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/default.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ pub trait Default: Sized {
/// Derive macro generating an impl of the trait `Default`.
#[rustc_builtin_macro(Default, attributes(default))]
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
#[allow_internal_unstable(core_intrinsics)]
#[allow_internal_unstable(core_intrinsics_internal)]
pub macro Default($item:item) {
/* compiler built-in */
}
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/fmt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ pub(crate) mod macros {
/// Derive macro generating an impl of the trait `Debug`.
#[rustc_builtin_macro]
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
#[allow_internal_unstable(core_intrinsics, fmt_helpers_for_derive)]
#[allow_internal_unstable(core_intrinsics_internal, fmt_helpers_for_derive)]
pub macro Debug($item:item) {
/* compiler built-in */
}
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/hash/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ pub(crate) mod macros {
/// Derive macro generating an impl of the trait `Hash`.
#[rustc_builtin_macro]
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
#[allow_internal_unstable(core_intrinsics)]
#[allow_internal_unstable(core_intrinsics_internal)]
pub macro Hash($item:item) {
/* compiler built-in */
}
Expand Down
16 changes: 8 additions & 8 deletions library/core/src/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
//! with atomic types and is equivalent to Java's `volatile`.

#![unstable(
feature = "core_intrinsics",
feature = "core_intrinsics_internal",
reason = "intrinsics are unlikely to ever be stabilized, instead \
they should be used through stabilized interfaces \
in the rest of the standard library",
Expand Down Expand Up @@ -1899,7 +1899,7 @@ extern "rust-intrinsic" {
/// # Examples
///
/// ```
/// #![feature(core_intrinsics)]
/// #![feature(core_intrinsics_internal)]
///
/// use std::intrinsics::ctlz;
///
Expand All @@ -1911,7 +1911,7 @@ extern "rust-intrinsic" {
/// An `x` with value `0` will return the bit width of `T`.
///
/// ```
/// #![feature(core_intrinsics)]
/// #![feature(core_intrinsics_internal)]
///
/// use std::intrinsics::ctlz;
///
Expand All @@ -1932,7 +1932,7 @@ extern "rust-intrinsic" {
/// # Examples
///
/// ```
/// #![feature(core_intrinsics)]
/// #![feature(core_intrinsics_internal)]
///
/// use std::intrinsics::ctlz_nonzero;
///
Expand All @@ -1958,7 +1958,7 @@ extern "rust-intrinsic" {
/// # Examples
///
/// ```
/// #![feature(core_intrinsics)]
/// #![feature(core_intrinsics_internal)]
///
/// use std::intrinsics::cttz;
///
Expand All @@ -1970,7 +1970,7 @@ extern "rust-intrinsic" {
/// An `x` with value `0` will return the bit width of `T`:
///
/// ```
/// #![feature(core_intrinsics)]
/// #![feature(core_intrinsics_internal)]
///
/// use std::intrinsics::cttz;
///
Expand All @@ -1991,7 +1991,7 @@ extern "rust-intrinsic" {
/// # Examples
///
/// ```
/// #![feature(core_intrinsics)]
/// #![feature(core_intrinsics_internal)]
///
/// use std::intrinsics::cttz_nonzero;
///
Expand Down Expand Up @@ -2452,7 +2452,7 @@ extern "rust-intrinsic" {
/// Here is an example of how this could cause a problem:
/// ```no_run
/// #![feature(const_eval_select)]
/// #![feature(core_intrinsics)]
/// #![feature(core_intrinsics_internal)]
/// use std::hint::unreachable_unchecked;
/// use std::intrinsics::const_eval_select;
///
Expand Down
8 changes: 4 additions & 4 deletions library/core/src/intrinsics/mir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
//! Typical usage will look like this:
//!
//! ```rust
//! #![feature(core_intrinsics, custom_mir)]
//! #![feature(core_intrinsics_internal, custom_mir)]
//! #![allow(internal_features)]
//!
//! use core::intrinsics::mir::*;
Expand Down Expand Up @@ -63,7 +63,7 @@
//! # Examples
//!
//! ```rust
//! #![feature(core_intrinsics, custom_mir)]
//! #![feature(core_intrinsics_internal, custom_mir)]
//! #![allow(internal_features)]
//!
//! use core::intrinsics::mir::*;
Expand Down Expand Up @@ -144,7 +144,7 @@
//! compiler:
//!
//! ```rust,compile_fail
//! #![feature(core_intrinsics, custom_mir)]
//! #![feature(core_intrinsics_internal, custom_mir)]
//!
//! extern crate core;
//! use core::intrinsics::mir::*;
Expand Down Expand Up @@ -363,7 +363,7 @@ define!(
///
/// ```rust
/// #![allow(internal_features)]
/// #![feature(custom_mir, core_intrinsics)]
/// #![feature(custom_mir, core_intrinsics_internal)]
///
/// use core::intrinsics::mir::*;
///
Expand Down
4 changes: 2 additions & 2 deletions library/core/src/macros/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1683,7 +1683,7 @@ pub(crate) mod builtin {
/// Unstable implementation detail of the `rustc` compiler, do not use.
#[rustc_builtin_macro]
#[stable(feature = "rust1", since = "1.0.0")]
#[allow_internal_unstable(core_intrinsics, libstd_sys_internals, rt)]
#[allow_internal_unstable(core_intrinsics_internal, libstd_sys_internals, rt)]
#[deprecated(since = "1.52.0", note = "rustc-serialize is deprecated and no longer supported")]
#[doc(hidden)] // While technically stable, using it is unstable, and deprecated. Hide it.
pub macro RustcDecodable($item:item) {
Expand All @@ -1693,7 +1693,7 @@ pub(crate) mod builtin {
/// Unstable implementation detail of the `rustc` compiler, do not use.
#[rustc_builtin_macro]
#[stable(feature = "rust1", since = "1.0.0")]
#[allow_internal_unstable(core_intrinsics, rt)]
#[allow_internal_unstable(core_intrinsics_internal, rt)]
#[deprecated(since = "1.52.0", note = "rustc-serialize is deprecated and no longer supported")]
#[doc(hidden)] // While technically stable, using it is unstable, and deprecated. Hide it.
pub macro RustcEncodable($item:item) {
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/marker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ pub trait Copy: Clone {
/// Derive macro generating an impl of the trait `Copy`.
#[rustc_builtin_macro]
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
#[allow_internal_unstable(core_intrinsics, derive_clone_copy)]
#[allow_internal_unstable(core_intrinsics_internal, derive_clone_copy)]
pub macro Copy($item:item) {
/* compiler built-in */
}
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/panic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ pub macro panic_2021 {
#[unstable(feature = "edition_panic", issue = "none", reason = "use panic!() instead")]
#[allow_internal_unstable(
core_panic,
core_intrinsics,
core_intrinsics_internal,
const_dispatch,
const_eval_select,
const_format_args,
Expand Down
2 changes: 1 addition & 1 deletion library/core/tests/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#![feature(const_trait_impl)]
#![feature(const_likely)]
#![feature(const_location_fields)]
#![feature(core_intrinsics)]
#![feature(core_intrinsics_internal)]
#![feature(core_io_borrowed_buf)]
#![feature(core_private_bignum)]
#![feature(core_private_diy_float)]
Expand Down
2 changes: 1 addition & 1 deletion library/panic_abort/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#![doc(issue_tracker_base_url = "https://github.com/rust-lang/rust/issues/")]
#![panic_runtime]
#![allow(unused_features)]
#![feature(core_intrinsics)]
#![feature(core_intrinsics_internal)]
#![feature(panic_runtime)]
#![feature(std_internals)]
#![feature(staged_api)]
Expand Down
2 changes: 1 addition & 1 deletion library/panic_unwind/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#![no_std]
#![unstable(feature = "panic_unwind", issue = "32837")]
#![doc(issue_tracker_base_url = "https://github.com/rust-lang/rust/issues/")]
#![feature(core_intrinsics)]
#![feature(core_intrinsics_internal)]
#![feature(lang_items)]
#![feature(panic_unwind)]
#![feature(staged_api)]
Expand Down
2 changes: 1 addition & 1 deletion library/std/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@
// Library features (core):
// tidy-alphabetical-start
#![feature(char_internals)]
#![feature(core_intrinsics)]
#![feature(core_intrinsics_internal)]
#![feature(core_io_borrowed_buf)]
#![feature(duration_constants)]
#![feature(error_generic_member_access)]
Expand Down
2 changes: 1 addition & 1 deletion src/doc/unstable-book/src/language-features/lang-items.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ allocation. A freestanding program that uses the `Box` sugar for dynamic
allocations via `malloc` and `free`:

```rust,ignore (libc-is-finicky)
#![feature(lang_items, start, core_intrinsics, rustc_private, panic_unwind, rustc_attrs)]
#![feature(lang_items, start, core_intrinsics_internal, rustc_private, panic_unwind, rustc_attrs)]
#![allow(internal_features)]
#![no_std]
Expand Down
2 changes: 1 addition & 1 deletion src/tools/clippy/tests/ui/cast_alignment.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Test casts for alignment issues

#![feature(rustc_private)]
#![feature(core_intrinsics)]
#![feature(core_intrinsics_internal)]
extern crate libc;

#[warn(clippy::cast_ptr_alignment)]
Expand Down
2 changes: 1 addition & 1 deletion src/tools/miri/tests/fail/breakpoint.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(core_intrinsics)]
#![feature(core_intrinsics_internal)]

fn main() {
unsafe {
Expand Down
2 changes: 1 addition & 1 deletion src/tools/miri/tests/fail/fast_math_both.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(core_intrinsics)]
#![feature(core_intrinsics_internal)]

fn main() {
unsafe {
Expand Down
2 changes: 1 addition & 1 deletion src/tools/miri/tests/fail/fast_math_first.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(core_intrinsics)]
#![feature(core_intrinsics_internal)]

fn main() {
unsafe {
Expand Down
Loading

0 comments on commit b9cdbc6

Please sign in to comment.