Skip to content
Merged
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: 0 additions & 2 deletions compiler/rustc/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// We need this feature as it changes `dylib` linking behavior and allows us to link to `rustc_driver`.
#![feature(rustc_private)]
// Several crates are depended upon but unused so that they are present in the sysroot
#![expect(unused_crate_dependencies)]

use std::process::ExitCode;

Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_arena/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
// tidy-alphabetical-start
#![allow(clippy::mut_from_ref)] // Arena allocators are one place where this pattern is fine.
#![allow(internal_features)]
#![cfg_attr(bootstrap, feature(never_type))]
#![cfg_attr(bootstrap, feature(unwrap_infallible))]
#![cfg_attr(test, feature(test))]
#![deny(unsafe_op_in_unsafe_fn)]
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_ast_ir/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

// tidy-alphabetical-start
#![cfg_attr(feature = "nightly", allow(internal_features))]
#![cfg_attr(feature = "nightly", cfg_attr(bootstrap, feature(never_type)))]
#![cfg_attr(feature = "nightly", feature(rustc_attrs))]
// tidy-alphabetical-end

Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_attr_ir/src/attribute_docs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ macro_rules! include_example {
};
}

#[cfg_attr(not(bootstrap), doc(attribute = "rustc_dump_clauses"))]
#[doc(attribute = "rustc_dump_clauses")]
/// Dumps the list of [`ty::Clause`]s as computed by the [`clauses_of`] query.
///
/// See [`AttributeKind::RustcDumpClauses`] for the internal representation of this attribute.
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_borrowck/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// tidy-alphabetical-start
#![allow(internal_features)]
#![cfg_attr(bootstrap, feature(never_type))]
#![feature(default_field_values)]
#![feature(deref_patterns)]
#![feature(file_buffered)]
Expand Down
48 changes: 24 additions & 24 deletions compiler/rustc_codegen_llvm/src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,30 +67,30 @@ pub(crate) fn maybe_sign_fn_ptr<'ll, 'tcx>(
}

/*
* A note on nomenclature of linking: "extern", "foreign", and "upcall".
*
* An "extern" is an LLVM symbol we wind up emitting an undefined external
* reference to. This means "we don't have the thing in this compilation unit,
* please make sure you link it in at runtime". This could be a reference to
* C code found in a C library, or rust code found in a rust crate.
*
* Most "externs" are implicitly declared (automatically) as a result of a
* user declaring an extern _module_ dependency; this causes the rust driver
* to locate an extern crate, scan its compilation metadata, and emit extern
* declarations for any symbols used by the declaring crate.
*
* A "foreign" is an extern that references C (or other non-rust ABI) code.
* There is no metadata to scan for extern references so in these cases either
* a header-digester like bindgen, or manual function prototypes, have to
* serve as declarators. So these are usually given explicitly as prototype
* declarations, in rust code, with ABI attributes on them noting which ABI to
* link via.
*
* An "upcall" is a foreign call generated by the compiler (not corresponding
* to any user-written call in the code) into the runtime library, to perform
* some helper task such as bringing a task to life, allocating memory, etc.
*
*/
* A note on nomenclature of linking: "extern", "foreign", and "upcall".

@Mark-Simulacrum Mark-Simulacrum Sep 29, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assuming this was rustfmt -- I can try to check if we want, but seems fine either way.

View changes since the review

*
* An "extern" is an LLVM symbol we wind up emitting an undefined external
* reference to. This means "we don't have the thing in this compilation unit,
* please make sure you link it in at runtime". This could be a reference to
* C code found in a C library, or rust code found in a rust crate.
*
* Most "externs" are implicitly declared (automatically) as a result of a
* user declaring an extern _module_ dependency; this causes the rust driver
* to locate an extern crate, scan its compilation metadata, and emit extern
* declarations for any symbols used by the declaring crate.
*
* A "foreign" is an extern that references C (or other non-rust ABI) code.
* There is no metadata to scan for extern references so in these cases either
* a header-digester like bindgen, or manual function prototypes, have to
* serve as declarators. So these are usually given explicitly as prototype
* declarations, in rust code, with ABI attributes on them noting which ABI to
* link via.
*
* An "upcall" is a foreign call generated by the compiler (not corresponding
* to any user-written call in the code) into the runtime library, to perform
* some helper task such as bringing a task to life, allocating memory, etc.
*
*/

/// A structure representing an active landing pad for the duration of a basic
/// block.
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_codegen_llvm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
//! This API is completely unstable and subject to change.
// tidy-alphabetical-start
#![cfg_attr(bootstrap, feature(trim_prefix_suffix))]
#![feature(extern_types)]
#![feature(file_buffered)]
#![feature(impl_trait_in_assoc_type)]
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_const_eval/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// tidy-alphabetical-start
#![cfg_attr(bootstrap, feature(never_type))]
#![feature(array_try_map)]
#![feature(decl_macro)]
#![feature(deref_patterns)]
Expand Down
4 changes: 1 addition & 3 deletions compiler/rustc_data_structures/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@
#![allow(internal_features)]
#![allow(rustc::default_hash_types)]
#![allow(rustc::potential_query_instability)]
#![cfg_attr(bootstrap, feature(allocator_api))]
#![cfg_attr(bootstrap, feature(never_type))]
#![cfg_attr(bootstrap, feature(unwrap_infallible))]
#![cfg_attr(not(bootstrap), feature(allocator_ext))]
#![cfg_attr(test, feature(test))]
#![deny(unsafe_op_in_unsafe_fn)]
#![feature(allocator_ext)]
#![feature(ascii_char)]
#![feature(ascii_char_variants)]
#![feature(auto_traits)]
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_driver_impl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
//! This API is completely unstable and subject to change.
// tidy-alphabetical-start
#![cfg_attr(bootstrap, feature(trim_prefix_suffix))]
#![feature(decl_macro)]
#![feature(file_buffered)]
#![feature(panic_backtrace_config)]
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_feature/src/accepted.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ declare_features! (
/// Allows `#[target_feature(...)]` on aarch64 platforms
(accepted, aarch64_target_feature, "1.61.0", Some(44839)),
/// Allows `extern "custom" fn()`.
(accepted, abi_custom, "CURRENT_RUSTC_VERSION", Some(140829)),
(accepted, abi_custom, "1.100.0", Some(140829)),
/// Allows using the `efiapi` ABI.
(accepted, abi_efiapi, "1.68.0", Some(65815)),
/// Allows the sysV64 ABI to be specified on all platforms
Expand Down Expand Up @@ -336,7 +336,7 @@ declare_features! (
/// Allows specifying the whole-archive link modifier
(accepted, native_link_modifiers_whole_archive, "1.61.0", Some(81490)),
/// Allows the `!` type.
(accepted, never_type, "CURRENT_RUSTC_VERSION", Some(35121)),
(accepted, never_type, "1.100.0", Some(35121)),
/// Allows using non lexical lifetimes (RFC 2094).
(accepted, nll, "1.63.0", Some(43234)),
/// Allows using `#![no_std]`.
Expand Down
12 changes: 6 additions & 6 deletions compiler/rustc_feature/src/removed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ declare_features! (
/// Allows using the `amdgpu-kernel` ABI.
(removed, abi_amdgpu_kernel, "1.77.0", Some(51575), None, 120495),
(removed, abi_c_cmse_nonsecure_call, "1.90.0", Some(81391), Some("renamed to abi_cmse_nonsecure_call"), 142146),
(removed, abi_unadjusted, "CURRENT_RUSTC_VERSION", None, Some("merged into link_llvm_intrinsics"), 161398),
(removed, abi_unadjusted, "1.100.0", None, Some("merged into link_llvm_intrinsics"), 161398),
(removed, advanced_slice_patterns, "1.42.0", Some(62254),
Some("merged into `#![feature(slice_patterns)]`"), 67712),
(removed, allocator, "1.0.0", None, None),
Expand All @@ -67,7 +67,7 @@ declare_features! (
(removed, await_macro, "1.38.0", Some(50547),
Some("subsumed by `.await` syntax"), 62293),
/// Allows using `box` in patterns (RFC 469).
(removed, box_patterns, "CURRENT_RUSTC_VERSION", Some(29641), Some("superseded by `deref_patterns`")),
(removed, box_patterns, "1.100.0", Some(29641), Some("superseded by `deref_patterns`")),
/// Allows using the `box $expr` syntax.
(removed, box_syntax, "1.70.0", Some(49733), Some("replaced with `#[rustc_box]`"), 108471),
/// Allows capturing disjoint fields in a closure/coroutine (RFC 2229).
Expand Down Expand Up @@ -167,7 +167,7 @@ declare_features! (
),
133768
),
(removed, generic_const_args, "CURRENT_RUSTC_VERSION", Some(151972), Some("renamed to `gca_const_items`")),
(removed, generic_const_args, "1.100.0", Some(151972), Some("renamed to `gca_const_items`")),
(removed, import_shadowing, "1.0.0", None, None),
/// Allows in-band quantification of lifetime bindings (e.g., `fn foo(x: &'a u8) -> &'a u8`).
(removed, in_band_lifetimes, "1.61.0", Some(44524),
Expand All @@ -193,12 +193,12 @@ declare_features! (
which is available from cargo build scripts with `cargo:rustc-link-arg` now"), 83820),
(removed, macro_reexport, "1.0.0", Some(29638),
Some("subsumed by `pub use`"), 49982),
(removed, macroless_const_item_generic_const_args, "CURRENT_RUSTC_VERSION", Some(162540), Some("renamed to `gca_macroless_items`")),
(removed, macroless_generic_const_args, "CURRENT_RUSTC_VERSION", Some(159006), Some("renamed to `gca_macroless_args`")),
(removed, macroless_const_item_generic_const_args, "1.100.0", Some(162540), Some("renamed to `gca_macroless_items`")),
(removed, macroless_generic_const_args, "1.100.0", Some(159006), Some("renamed to `gca_macroless_args`")),
/// Allows using `#[main]` to replace the entrypoint `#[lang = "start"]` calls.
(removed, main, "1.53.0", Some(29634), None, 84217),
(removed, managed_boxes, "1.0.0", None, None),
(removed, min_generic_const_args, "CURRENT_RUSTC_VERSION", Some(132980), Some("renamed to `gca_min_const_items`")),
(removed, min_generic_const_args, "1.100.0", Some(132980), Some("renamed to `gca_min_const_items`")),
/// Allows the use of type alias impl trait in function return positions
(removed, min_type_alias_impl_trait, "1.56.0", Some(63063),
Some("removed in favor of full type_alias_impl_trait"), 87564),
Expand Down
12 changes: 6 additions & 6 deletions compiler/rustc_feature/src/unstable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ declare_features! (
/// Allows checking whether or not the backend correctly supports unstable float types.
(internal, cfg_target_has_reliable_f16_f128, "1.88.0", None),
/// Allows checking whether or not the backend correctly supports the unstable `f16b` type.
(internal, cfg_target_has_reliable_f16b, "CURRENT_RUSTC_VERSION", None),
(internal, cfg_target_has_reliable_f16b, "1.100.0", None),
/// Allows checking whether or not the target might have thread support.
(internal, cfg_target_has_threads, "1.99.0", None),
/// Allows identifying the `compiler_builtins` crate.
Expand All @@ -257,7 +257,7 @@ declare_features! (
/// Allows `#[link(..., cfg(..))]`; perma-unstable per #37406
(internal, link_cfg, "1.14.0", None),
/// Allows using `#[link_name="__enzyme_*"]`.
(internal, link_enzyme_intrinsics, "CURRENT_RUSTC_VERSION", None),
(internal, link_enzyme_intrinsics, "1.100.0", None),
/// Allows using `?Trait` trait bounds in more contexts.
(internal, more_maybe_bounds, "1.82.0", None),
/// Allow negative trait bounds. This is an internal-only feature for testing the trait solver!
Expand All @@ -273,7 +273,7 @@ declare_features! (
/// Allows using the `#[stable]` and `#[unstable]` attributes.
(internal, staged_api, "1.0.0", None),
/// Perma-unstable, only used in the test suite for binders (`for<'a>`).
(internal, test_binder_constraints, "CURRENT_RUSTC_VERSION", None),
(internal, test_binder_constraints, "1.100.0", None),
/// Perma-unstable, only used to test the `incomplete_features` lint.
(incomplete, test_incomplete_feature, "1.96.0", None),
/// Added for testing unstable lints; perma-unstable.
Expand Down Expand Up @@ -530,7 +530,7 @@ declare_features! (
/// Allow using 16-bit (half precision) floating point numbers.
(unstable, f16, "1.78.0", Some(116909)),
/// Allow using bfloat16 floating point numbers.
(unstable, f16b, "CURRENT_RUSTC_VERSION", Some(160630)),
(unstable, f16b, "1.100.0", Some(160630)),
/// Allows the use of `#[ffi_const]` on foreign functions.
(unstable, ffi_const, "1.45.0", Some(58328)),
/// Allows the use of `#[ffi_pure]` on foreign functions.
Expand All @@ -548,7 +548,7 @@ declare_features! (
/// Support delegating implementation of functions to other already implemented functions.
(incomplete, fn_delegation, "1.76.0", Some(118212)),
/// Traits for function pointers and items
(unstable, fn_static, "CURRENT_RUSTC_VERSION", Some(148768)),
(unstable, fn_static, "1.100.0", Some(148768)),
/// Allows using forced keywords `k#fn`.
(unstable, forced_keywords, "CURRENT_RUSTC_VERSION", Some(153839)),
/// Allows impls for the Freeze trait.
Expand All @@ -563,7 +563,7 @@ declare_features! (
(incomplete, gca_macroless_args, "1.99.0", Some(159006)),
/// Allows directly represented gca_const_items as the rhs of const items without the
/// `gca!` macro.
(incomplete, gca_macroless_items, "CURRENT_RUSTC_VERSION", Some(162540)),
(incomplete, gca_macroless_items, "1.100.0", Some(162540)),
/// Enables the generic const args MVP (paths to type const items and constructors
/// for ADTs and primitives).
(incomplete, gca_min_const_items, "1.84.0", Some(132980)),
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_hir/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
//! [rustc dev guide]: https://rustc-dev-guide.rust-lang.org/hir.html

// tidy-alphabetical-start
#![cfg_attr(bootstrap, feature(never_type))]
#![feature(associated_type_defaults)]
#![feature(closure_track_caller)]
#![feature(const_default)]
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_hir_analysis/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ This API is completely unstable and subject to change.
*/

// tidy-alphabetical-start
#![cfg_attr(bootstrap, feature(never_type))]
#![cfg_attr(bootstrap, feature(unwrap_infallible))]
#![feature(default_field_values)]
#![feature(gen_blocks)]
Expand Down
2 changes: 0 additions & 2 deletions compiler/rustc_hir_typeck/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
// tidy-alphabetical-start
#![cfg_attr(bootstrap, feature(never_type))]
#![cfg_attr(bootstrap, feature(trim_prefix_suffix))]
#![feature(deref_patterns)]
#![feature(iter_intersperse)]
#![feature(iter_order_by)]
Expand Down
7 changes: 3 additions & 4 deletions compiler/rustc_lint_defs/src/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2825,8 +2825,7 @@ declare_lint! {
///
/// ### Example
///
#[cfg_attr(bootstrap, doc = "```rust,ignore")]
#[cfg_attr(not(bootstrap), doc = "```rust,compile_fail")]
/// ```rust,compile_fail
/// #![feature(staged_api)]
/// #![stable(feature = "test", since = "1.0.0")]
///
Expand All @@ -2837,9 +2836,9 @@ declare_lint! {
/// pub use self::S as T;
///
/// fn main() {}
#[doc = "```"]
/// ```
///
#[cfg_attr(not(bootstrap), doc = "{{produces}}")]
/// {{produces}}
///
/// ### Explanation
///
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
rustc::default_hash_types,
reason = "we like performance but can't use `rustc_data_structures`"
)]
#![cfg_attr(bootstrap, feature(never_type))]
#![deny(
rustc::potential_query_instability,
reason = "macros shall produce deterministic output/errors"
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)]
#![cfg_attr(bootstrap, feature(never_type))]
#![feature(error_iter)]
#![feature(file_buffered)]
#![feature(gen_blocks)]
Expand Down
4 changes: 1 addition & 3 deletions compiler/rustc_middle/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,8 @@
// tidy-alphabetical-start
#![allow(internal_features)]
#![allow(rustc::direct_use_of_rustc_type_ir)]
#![cfg_attr(bootstrap, feature(allocator_api))]
#![cfg_attr(bootstrap, feature(never_type))]
#![cfg_attr(doc, feature(intra_doc_pointers))]
#![cfg_attr(not(bootstrap), feature(allocator_ext))]
#![feature(allocator_ext)]
#![feature(associated_type_defaults)]
#![feature(closure_track_caller)]
#![feature(const_default)]
Expand Down
2 changes: 0 additions & 2 deletions compiler/rustc_middle/src/ty/inhabitedness/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
//!
//! # Example
//! ```rust
#![cfg_attr(bootstrap, doc = "#![feature(never_type)]")]
//! mod a {
//! pub mod b {
//! pub struct SecretlyUninhabited {
Expand Down Expand Up @@ -175,7 +174,6 @@ impl<'tcx> Ty<'tcx> {
///
/// # Example
/// ```
#[cfg_attr(bootstrap, doc = "#![feature(never_type)]")]
/// # fn main() {}
/// enum Void {}
/// mod a {
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_mir_dataflow/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// tidy-alphabetical-start
#![cfg_attr(bootstrap, feature(never_type))]
#![feature(associated_type_defaults)]
#![feature(deref_patterns)]
#![feature(exact_size_is_empty)]
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_mir_transform/src/inline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1161,7 +1161,7 @@ fn new_call_temp<'tcx>(
* Integrates blocks from the callee function into the calling function.
* Updates block indices, references to locals and other control flow
* stuff.
*/
*/
struct Integrator<'a, 'tcx> {
args: &'a [Local],
new_locals: RangeFrom<Local>,
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_pattern_analysis/src/constructor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@
//!
//! ```rust
//! # #![feature(exhaustive_patterns)]
#![cfg_attr(feature = "rustc", cfg_attr(bootstrap, doc = "#![feature(never_type)]"))]
//! # let x = None::<!>;
//! match x {
//! None => {}
Expand Down
2 changes: 0 additions & 2 deletions compiler/rustc_resolve/src/late.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4097,7 +4097,6 @@ impl<'a, 'ast, 'ra, 'tcx> LateResolutionVisitor<'a, 'ast, 'ra, 'tcx> {
/// `Result<T, &!>` could look like:
/// ```rust
/// # #![feature(never_patterns)]
#[cfg_attr(bootstrap, doc = "#![feature(never_type)]")]
/// # fn bar(_x: u32) {}
/// let foo: Result<u32, &!> = Ok(0);
/// match foo {
Expand Down Expand Up @@ -4163,7 +4162,6 @@ impl<'a, 'ast, 'ra, 'tcx> LateResolutionVisitor<'a, 'ast, 'ra, 'tcx> {
/// `Result<T, &!>` could look like:
/// ```rust
/// # #![feature(never_patterns)]
#[cfg_attr(bootstrap, doc = "#![feature(never_type)]")]
/// # fn foo() -> Result<bool, &'static !> { Ok(true) }
/// let (Ok(x) | Err(&!)) = foo();
/// # let _ = x;
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 @@ -8,7 +8,6 @@

// tidy-alphabetical-start
#![allow(internal_features)]
#![cfg_attr(bootstrap, feature(trim_prefix_suffix))]
#![feature(arbitrary_self_types)]
#![feature(const_default)]
#![feature(const_trait_impl)]
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(bootstrap, feature(never_type))]
#![doc(test(attr(allow(unused_variables), deny(warnings))))]
#![feature(core_intrinsics)]
#![feature(min_specialization)]
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_trait_selection/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
//! This API is completely unstable and subject to change.
// tidy-alphabetical-start
#![cfg_attr(bootstrap, feature(never_type))]
#![cfg_attr(bootstrap, feature(unwrap_infallible))]
#![feature(associated_type_defaults)]
#![feature(default_field_values)]
Expand Down
Loading
Loading