Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
d4b194b
adjust NodeAppArgs to expose entire tree
royAmmerschuber Oct 27, 2025
119f642
Merge pull request #4654 from royAmmerschuber/feature/tree-visitor-re…
RalfJung Nov 2, 2025
b913337
Prepare for merging from rust-lang/rust
Nov 3, 2025
a88edb7
Merge ref 'c5dabe8cf798' from rust-lang/rust
Nov 3, 2025
c0b05aa
Merge pull request #4660 from rust-lang/rustup-2025-11-03
RalfJung Nov 3, 2025
c6a8c46
add test for duplicate warning on used deprecated unit structs
jdonszelmann Oct 22, 2025
1b00911
deduplicate warnings (attempt 2)
jdonszelmann Oct 28, 2025
ec7c884
Use Github URL to fetch GenMC
michaliskok Nov 3, 2025
3e0ea10
Prepare for merging from rust-lang/rust
Nov 4, 2025
ee2ee6c
Merge ref '5f9dd05862d2' from rust-lang/rust
Nov 4, 2025
459dae5
wasi is too strange of a target, remove it for now
RalfJung Nov 4, 2025
a47726f
GenmcScalar: rename extra to provenance
RalfJung Nov 4, 2025
97c9bc2
Merge pull request #4662 from rust-lang/rustup-2025-11-04
RalfJung Nov 4, 2025
2aff762
Merge pull request #4661 from michaliskok/genmc-url
RalfJung Nov 4, 2025
100a870
user-relevant span: if no frame is in a local crate, use topmost non-…
RalfJung Oct 27, 2025
f714813
Merge pull request #4653 from RalfJung/user-relevant
RalfJung Nov 4, 2025
bddac3c
x86/rounding-error test: avoid rounding during error calculation
RalfJung Nov 4, 2025
ac94379
Merge pull request #4666 from RalfJung/rounding-error
RalfJung Nov 4, 2025
389c3ce
Remove no longer necessary lint allow
bjorn3 Oct 30, 2025
f7f0ca4
triagebot: Create Zulip topics for libs backports
tgross35 Nov 4, 2025
72d94d1
[rustdoc search] Simplify itemTypes and filter "dependencies"
GuillaumeGomez Nov 3, 2025
1d34478
Move warning reporting from flag_to_backend_features to cfg_target_fe…
bjorn3 Nov 5, 2025
973c752
Unify the configuration of the compiler docs
bjorn3 Nov 5, 2025
222480d
Allow internal_features lint in doc tests
bjorn3 Nov 5, 2025
eaf979e
Fix ICE from lit_to_mir_constant caused by type error
chenyukang Nov 5, 2025
32c93cc
Merge `Vec::push{,_mut}_within_capacity`
WaffleLapkin Nov 5, 2025
b01cc1c
Auto merge of #148516 - bjorn3:target_feature_parsing_improvements, r…
bors Nov 5, 2025
a508f61
Rollup merge of #147994 - jdonszelmann:duplicate-warning-struct, r=pe…
matthiaskrgr Nov 5, 2025
54fa498
Rollup merge of #148440 - GuillaumeGomez:improve-search-code, r=notri…
matthiaskrgr Nov 5, 2025
5f3b186
Rollup merge of #148501 - tgross35:triagebot-libs-backports, r=Amanieu
matthiaskrgr Nov 5, 2025
d195074
Rollup merge of #148517 - bjorn3:lint_cleanup, r=joboet
matthiaskrgr Nov 5, 2025
958f2a9
Rollup merge of #148518 - bjorn3:unify_compiler_doc_config, r=Guillau…
matthiaskrgr Nov 5, 2025
5ed4faf
Rollup merge of #148523 - RalfJung:miri, r=RalfJung
matthiaskrgr Nov 5, 2025
72cef11
Rollup merge of #148525 - chenyukang:yukang-fix-148515, r=wesleywiser
matthiaskrgr Nov 5, 2025
05f3a3d
Rollup merge of #148534 - WaffleLapkin:push_within_capacity_now_with_…
matthiaskrgr Nov 5, 2025
401ae55
Auto merge of #148544 - matthiaskrgr:rollup-n9dqgwc, r=matthiaskrgr
bors Nov 5, 2025
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_abi/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
// tidy-alphabetical-start
#![cfg_attr(feature = "nightly", allow(internal_features))]
#![cfg_attr(feature = "nightly", doc(rust_logo))]
#![cfg_attr(feature = "nightly", feature(assert_matches))]
#![cfg_attr(feature = "nightly", feature(rustc_attrs))]
#![cfg_attr(feature = "nightly", feature(rustdoc_internals))]
#![cfg_attr(feature = "nightly", feature(step_trait))]
// tidy-alphabetical-end

Expand Down
7 changes: 1 addition & 6 deletions compiler/rustc_arena/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,13 @@
#![allow(internal_features)]
#![cfg_attr(test, feature(test))]
#![deny(unsafe_op_in_unsafe_fn)]
#![doc(
html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/",
test(no_crate_inject, attr(deny(warnings)))
)]
#![doc(rust_logo)]
#![doc(test(no_crate_inject, attr(deny(warnings), allow(internal_features))))]
#![feature(core_intrinsics)]
#![feature(decl_macro)]
#![feature(dropck_eyepatch)]
#![feature(maybe_uninit_slice)]
#![feature(never_type)]
#![feature(rustc_attrs)]
#![feature(rustdoc_internals)]
#![feature(unwrap_infallible)]
// tidy-alphabetical-end

Expand Down
8 changes: 1 addition & 7 deletions compiler/rustc_ast/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,13 @@
//! This API is completely unstable and subject to change.

// tidy-alphabetical-start
#![allow(internal_features)]
#![doc(
html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/",
test(attr(deny(warnings)))
)]
#![doc(rust_logo)]
#![doc(test(attr(deny(warnings), allow(internal_features))))]
#![feature(array_windows)]
#![feature(associated_type_defaults)]
#![feature(box_patterns)]
#![feature(if_let_guard)]
#![feature(iter_order_by)]
#![feature(macro_metavar_expr)]
#![feature(rustdoc_internals)]
#![recursion_limit = "256"]
// tidy-alphabetical-end

Expand Down
3 changes: 0 additions & 3 deletions compiler/rustc_ast_lowering/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,8 @@
//! in the HIR, especially for multiple identifiers.

// tidy-alphabetical-start
#![allow(internal_features)]
#![doc(rust_logo)]
#![feature(box_patterns)]
#![feature(if_let_guard)]
#![feature(rustdoc_internals)]
// tidy-alphabetical-end

use std::sync::Arc;
Expand Down
3 changes: 0 additions & 3 deletions compiler/rustc_ast_passes/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@
//! by `rustc_ast_lowering`.
// tidy-alphabetical-start
#![allow(internal_features)]
#![doc(rust_logo)]
#![feature(box_patterns)]
#![feature(if_let_guard)]
#![feature(iter_is_partitioned)]
#![feature(rustdoc_internals)]
// tidy-alphabetical-end

pub mod ast_validation;
Expand Down
3 changes: 0 additions & 3 deletions compiler/rustc_ast_pretty/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
// tidy-alphabetical-start
#![allow(internal_features)]
#![doc(rust_logo)]
#![feature(box_patterns)]
#![feature(negative_impls)]
#![feature(rustdoc_internals)]
// tidy-alphabetical-end

mod helpers;
Expand Down
3 changes: 0 additions & 3 deletions compiler/rustc_attr_parsing/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,7 @@
//! containing both `C` and `packed` annotations.

// tidy-alphabetical-start
#![allow(internal_features)]
#![doc(rust_logo)]
#![feature(decl_macro)]
#![feature(rustdoc_internals)]
#![recursion_limit = "256"]
// tidy-alphabetical-end

Expand Down
3 changes: 0 additions & 3 deletions compiler/rustc_baked_icu_data/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@

// tidy-alphabetical-start
#![allow(elided_lifetimes_in_paths)]
#![allow(internal_features)]
#![allow(unreachable_pub)] // because this crate is mostly generated code
#![doc(rust_logo)]
#![feature(rustdoc_internals)]
// #![warn(unreachable_pub)] // don't use because this crate is mostly generated code
// tidy-alphabetical-end

Expand Down
2 changes: 0 additions & 2 deletions compiler/rustc_borrowck/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@

// tidy-alphabetical-start
#![allow(internal_features)]
#![doc(rust_logo)]
#![feature(assert_matches)]
#![feature(box_patterns)]
#![feature(file_buffered)]
#![feature(if_let_guard)]
#![feature(negative_impls)]
#![feature(never_type)]
#![feature(rustc_attrs)]
#![feature(rustdoc_internals)]
#![feature(stmt_expr_attributes)]
#![feature(try_blocks)]
// tidy-alphabetical-end
Expand Down
3 changes: 0 additions & 3 deletions compiler/rustc_builtin_macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,13 @@
#![allow(internal_features)]
#![allow(rustc::diagnostic_outside_of_impl)]
#![allow(rustc::untranslatable_diagnostic)]
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
#![doc(rust_logo)]
#![feature(assert_matches)]
#![feature(box_patterns)]
#![feature(decl_macro)]
#![feature(if_let_guard)]
#![feature(iter_order_by)]
#![feature(proc_macro_internals)]
#![feature(proc_macro_quote)]
#![feature(rustdoc_internals)]
#![feature(try_blocks)]
#![recursion_limit = "256"]
// tidy-alphabetical-end
Expand Down
3 changes: 0 additions & 3 deletions compiler/rustc_codegen_cranelift/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
// tidy-alphabetical-start
#![allow(rustc::diagnostic_outside_of_impl)]
#![allow(rustc::untranslatable_diagnostic)]
#![cfg_attr(doc, allow(internal_features))]
#![cfg_attr(doc, doc(rust_logo))]
#![cfg_attr(doc, feature(rustdoc_internals))]
// Note: please avoid adding other feature gates where possible
#![feature(rustc_private)]
// Only used to define intrinsics in `compiler_builtins.rs`.
Expand Down
35 changes: 13 additions & 22 deletions compiler/rustc_codegen_gcc/src/gcc_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ fn gcc_features_by_flags(sess: &Session, features: &mut Vec<String>) {

/// The list of GCC features computed from CLI flags (`-Ctarget-cpu`, `-Ctarget-feature`,
/// `--target` and similar).
pub(crate) fn global_gcc_features(sess: &Session, diagnostics: bool) -> Vec<String> {
pub(crate) fn global_gcc_features(sess: &Session) -> Vec<String> {
// Features that come earlier are overridden by conflicting features later in the string.
// Typically we'll want more explicit settings to override the implicit ones, so:
//
Expand All @@ -37,27 +37,18 @@ pub(crate) fn global_gcc_features(sess: &Session, diagnostics: bool) -> Vec<Stri
features.extend(sess.target.features.split(',').filter(|v| !v.is_empty()).map(String::from));

// -Ctarget-features
target_features::flag_to_backend_features(
sess,
diagnostics,
|feature| to_gcc_features(sess, feature),
|feature, enable| {
// We run through `to_gcc_features` when
// passing requests down to GCC. This means that all in-language
// features also work on the command line instead of having two
// different names when the GCC name and the Rust name differ.
features.extend(
to_gcc_features(sess, feature)
.iter()
.flat_map(|feat| to_gcc_features(sess, feat).into_iter())
.map(
|feature| {
if !enable { format!("-{}", feature) } else { feature.to_string() }
},
),
);
},
);
target_features::flag_to_backend_features(sess, |feature, enable| {
// We run through `to_gcc_features` when
// passing requests down to GCC. This means that all in-language
// features also work on the command line instead of having two
// different names when the GCC name and the Rust name differ.
features.extend(
to_gcc_features(sess, feature)
.iter()
.flat_map(|feat| to_gcc_features(sess, feat).into_iter())
.map(|feature| if !enable { format!("-{}", feature) } else { feature.to_string() }),
);
});

gcc_features_by_flags(sess, &mut features);

Expand Down
41 changes: 21 additions & 20 deletions compiler/rustc_codegen_gcc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@
* TODO(antoyo): remove the patches.
*/

#![allow(internal_features)]
#![doc(rust_logo)]
#![feature(rustdoc_internals)]
#![feature(rustc_private)]
#![recursion_limit = "256"]
#![warn(rust_2018_idioms)]
Expand Down Expand Up @@ -107,7 +104,7 @@ use rustc_target::spec::{Arch, RelocModel};
use tempfile::TempDir;

use crate::back::lto::ModuleBuffer;
use crate::gcc_util::target_cpu;
use crate::gcc_util::{target_cpu, to_gcc_features};

rustc_fluent_macro::fluent_messages! { "../messages.ftl" }

Expand Down Expand Up @@ -220,7 +217,7 @@ impl CodegenBackend for GccCodegenBackend {
}

fn provide(&self, providers: &mut Providers) {
providers.global_backend_features = |tcx, ()| gcc_util::global_gcc_features(tcx.sess, true)
providers.global_backend_features = |tcx, ()| gcc_util::global_gcc_features(tcx.sess)
}

fn codegen_crate(&self, tcx: TyCtxt<'_>) -> Box<dyn Any> {
Expand Down Expand Up @@ -446,21 +443,25 @@ fn to_gcc_opt_level(optlevel: Option<OptLevel>) -> OptimizationLevel {

/// Returns the features that should be set in `cfg(target_feature)`.
fn target_config(sess: &Session, target_info: &LockedTargetInfo) -> TargetConfig {
let (unstable_target_features, target_features) = cfg_target_feature(sess, |feature| {
// TODO: we disable Neon for now since we don't support the LLVM intrinsics for it.
if feature == "neon" {
return false;
}
target_info.cpu_supports(feature)
// cSpell:disable
/*
adx, aes, avx, avx2, avx512bf16, avx512bitalg, avx512bw, avx512cd, avx512dq, avx512er, avx512f, avx512fp16, avx512ifma,
avx512pf, avx512vbmi, avx512vbmi2, avx512vl, avx512vnni, avx512vp2intersect, avx512vpopcntdq,
bmi1, bmi2, cmpxchg16b, ermsb, f16c, fma, fxsr, gfni, lzcnt, movbe, pclmulqdq, popcnt, rdrand, rdseed, rtm,
sha, sse, sse2, sse3, sse4.1, sse4.2, sse4a, ssse3, tbm, vaes, vpclmulqdq, xsave, xsavec, xsaveopt, xsaves
*/
// cSpell:enable
});
let (unstable_target_features, target_features) = cfg_target_feature(
sess,
|feature| to_gcc_features(sess, feature),
|feature| {
// TODO: we disable Neon for now since we don't support the LLVM intrinsics for it.
if feature == "neon" {
return false;
}
target_info.cpu_supports(feature)
// cSpell:disable
/*
adx, aes, avx, avx2, avx512bf16, avx512bitalg, avx512bw, avx512cd, avx512dq, avx512er, avx512f, avx512fp16, avx512ifma,
avx512pf, avx512vbmi, avx512vbmi2, avx512vl, avx512vnni, avx512vp2intersect, avx512vpopcntdq,
bmi1, bmi2, cmpxchg16b, ermsb, f16c, fma, fxsr, gfni, lzcnt, movbe, pclmulqdq, popcnt, rdrand, rdseed, rtm,
sha, sse, sse2, sse3, sse4.1, sse4.2, sse4a, ssse3, tbm, vaes, vpclmulqdq, xsave, xsavec, xsaveopt, xsaves
*/
// cSpell:enable
},
);

let has_reliable_f16 = target_info.supports_target_dependent_type(CType::Float16);
let has_reliable_f128 = target_info.supports_target_dependent_type(CType::Float128);
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_llvm/src/back/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ pub(crate) fn create_informational_target_machine(
let config = TargetMachineFactoryConfig { split_dwarf_file: None, output_obj_file: None };
// Can't use query system here quite yet because this function is invoked before the query
// system/tcx is set up.
let features = llvm_util::global_llvm_features(sess, false, only_base_features);
let features = llvm_util::global_llvm_features(sess, only_base_features);
target_machine_factory(sess, config::OptLevel::No, &features)(config)
.unwrap_or_else(|err| llvm_err(sess.dcx(), err))
}
Expand Down
6 changes: 1 addition & 5 deletions compiler/rustc_codegen_llvm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,13 @@
//! This API is completely unstable and subject to change.

// tidy-alphabetical-start
#![allow(internal_features)]
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
#![doc(rust_logo)]
#![feature(assert_matches)]
#![feature(extern_types)]
#![feature(file_buffered)]
#![feature(if_let_guard)]
#![feature(impl_trait_in_assoc_type)]
#![feature(iter_intersperse)]
#![feature(macro_derive)]
#![feature(rustdoc_internals)]
#![feature(slice_as_array)]
#![feature(trim_prefix_suffix)]
#![feature(try_blocks)]
Expand Down Expand Up @@ -248,7 +244,7 @@ impl CodegenBackend for LlvmCodegenBackend {

fn provide(&self, providers: &mut Providers) {
providers.global_backend_features =
|tcx, ()| llvm_util::global_llvm_features(tcx.sess, true, false)
|tcx, ()| llvm_util::global_llvm_features(tcx.sess, false)
}

fn print(&self, req: &PrintRequest, out: &mut String, sess: &Session) {
Expand Down
Loading
Loading