Skip to content

Rollup of 21 pull requests #145034

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 107 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
c6a97d3
emit `StorageLive` and schedule `StorageDead` for `let`-`else` after …
dianne Jun 25, 2025
5a5027a
Move float non determinism helpers to math.rs
LorrensP-2158466 Jul 7, 2025
4653b7a
Stabilize const `TypeId::of`
oli-obk Jul 18, 2025
ed50029
ci: Switch to nightly rustfmt
tgross35 Jul 21, 2025
f391acb
Implement nondet behaviour and change/add tests.
LorrensP-2158466 Jul 7, 2025
08bca4d
ci: Add native PowerPC64LE and s390x jobs
tgross35 Jul 23, 2025
fcc7824
ci: Update to the latest ubuntu:25.04 Docker images
tgross35 Jul 24, 2025
95c4263
symcheck: Switch the `object` dependency from git to crates.io
tgross35 Jul 24, 2025
83aea65
ci: Use a mirror for musl
tgross35 Jul 24, 2025
5c4abe9
ci: Upgrade ubuntu:25.04 for the PowerPC64LE test
tgross35 Jul 24, 2025
43c3e1b
Enable tests that were skipped on PowerPC
tgross35 Jul 24, 2025
b168793
Enable tests that were skipped on aarch64
tgross35 Jul 24, 2025
0b6c1d3
Enable skipped `f32` and `f64` multiplication tests
tgross35 Jul 24, 2025
9dad77f
Use `x86_no_sse` configuration in more places
tgross35 Jul 24, 2025
ef608f1
Introduce `target_spec_enum` macro to avoid duplication
Noratrieb Jul 26, 2025
4743158
libm: Update for new warn-by-default clippy lints
tgross35 Jul 26, 2025
c061e73
Avoid inlining `floor` into `rem_pio2`
quaternic Jul 27, 2025
9c683d3
Implement `floor` and `ceil` in assembly on `i586`
folkertdev Jul 27, 2025
16cb37c
Remove `no-asm` gating when there is no alternative implementation
tgross35 Jul 25, 2025
54f6ab7
Switch to using a GH app for authenticating sync PRs
Kobzol Jul 29, 2025
54a4f86
cleanup: Trim trailing whitespace
tgross35 Jul 29, 2025
97c35d3
ci: Simplify tests for verbatim paths
tgross35 Jul 29, 2025
987a49b
bootstrap: extract `cc` query into a new function
mati865 Jul 29, 2025
9cfe5f6
bootstrap: split runtime DLL part out of `make_win_dist`
mati865 Jul 29, 2025
ab8a2e1
ci: Switch to strongly typed directives
tgross35 Jul 30, 2025
eafafc4
ci: Don't print output twice in `ci-util`
tgross35 Jul 30, 2025
c045c9b
ci: Commonize the way `PrInfo` is loaded from env
tgross35 Jul 30, 2025
4ebfdf7
ci: Add a way to run `libm` tests that would otherwise be skipped
tgross35 Jul 30, 2025
3cbd088
ci: Set pipefail before running ci-util
tgross35 Jul 30, 2025
ecf6d3c
Simplify the configuration for no-panic
tgross35 Jul 30, 2025
b3f369d
Address some rustc inconsistency issues
zeroomega Jul 17, 2025
f95edbe
move gcc config parsing to parse_inner
Shourya742 Jul 30, 2025
3f9bf57
move dist to parse_inner
Shourya742 Jul 30, 2025
924912c
move target parsing to parse_inner
Shourya742 Jul 30, 2025
89219ff
move install to parse_inner
Shourya742 Jul 30, 2025
3248ff1
move llvm parsing to parse_inner
Shourya742 Jul 30, 2025
ddd2a54
move rust config to parse_inner
Shourya742 Jul 30, 2025
ae05591
Force initializing ExecutionContext with verbosity and fail_fast mode
Shourya742 Jul 30, 2025
82756fd
Extract TOML config loading and src directory computation into separa…
Shourya742 Jul 30, 2025
f89ea08
Split TOML postprocessing into a separate function
Shourya742 Jul 30, 2025
cfc40de
Override some build TOML values by flags
Shourya742 Jul 30, 2025
8652d96
Fix logging of config skip values
Shourya742 Jul 30, 2025
58a38cd
Fix verbosity setting
Shourya742 Jul 30, 2025
222dfcc
add install default implementation
Shourya742 Aug 1, 2025
bbe7c08
add gcc and dist default implementation
Shourya742 Aug 1, 2025
38ddefa
add llvm default implementation
Shourya742 Aug 1, 2025
8b80cb0
add rust default implementation
Shourya742 Aug 1, 2025
d3d3b10
make llvm toml fields follow a specific naming convention
Shourya742 Aug 1, 2025
c008a4b
make gcc toml fields follow a specific naming convention
Shourya742 Aug 1, 2025
4d2a2c2
make dist toml fields follow a specific naming convention
Shourya742 Aug 1, 2025
ad98550
make install toml fields follow a specific naming convention
Shourya742 Aug 1, 2025
2c96132
make build toml fields follow a specific naming convention
Shourya742 Aug 1, 2025
a75326b
move build config to the top of parse method
Shourya742 Aug 1, 2025
39d9cf7
move install config to the top of parse method
Shourya742 Aug 1, 2025
120d93e
move rust config to the top of parse method
Shourya742 Aug 1, 2025
f74f1a0
move llvm config to the top of parse method
Shourya742 Aug 1, 2025
7f20ad8
move dist and gcc config to the top of parse method
Shourya742 Aug 1, 2025
1dfa421
Add --print target-spec-json-schema
Noratrieb Jul 26, 2025
d2cfe48
remove feature gate
Kivooeo Aug 4, 2025
b7f5392
remove begin prefix
Kivooeo Aug 4, 2025
91e606b
Tweak auto trait errors
estebank Feb 28, 2025
d2e3ea9
windows-gnullvm: include `libunwind.dll` in dist
mati865 Jul 29, 2025
36383dd
[win][arm64ec] Fix msvc-wholearchive for Arm64EC
dpaoliello Aug 5, 2025
33cb419
Mark all deprecation lints in name resolution as deny-by-default and …
petrochenkov Jul 14, 2025
3b50253
compiler-builtins: plumb LSE support for aarch64 on linux
pmur Aug 4, 2025
6936bb9
Dynamically enable LSE for aarch64 rust provided intrinsics
pmur Jul 31, 2025
fbc700f
configure: Use `CARGO_CFG_*_{F16,F128}` rather than invoking rustc
tgross35 Aug 5, 2025
962836d
remove redundant _toml suffix and other misc changes
Shourya742 Aug 4, 2025
9ccc9f1
replace version placeholder
BoxyUwU Aug 4, 2025
2108631
bump stage0
BoxyUwU Aug 6, 2025
351e4bd
handle bootstrap cfgs
BoxyUwU Aug 6, 2025
6e7b9d5
Introduce ModernIdent type to unify macro 2.0 hygiene handling
xizheyin Aug 6, 2025
2472d19
Include allocator module in LLVM_passes timer
bjorn3 Aug 6, 2025
ee38bc0
Remove unused field from ModuleConfig
bjorn3 Aug 6, 2025
6fbea4f
Remove bitcode_llvm_cmdline
bjorn3 Aug 6, 2025
71add2f
Change stdlib float tests to account for miri nondet floats.
LorrensP-2158466 Jul 13, 2025
7bc3462
tidy
BoxyUwU Aug 6, 2025
270c1a4
Revert "Embed GDB pretty printers in rlibs and dylibs"
bjorn3 Aug 6, 2025
e02cc40
Revert "Preserve the .debug_gdb_scripts section"
bjorn3 Aug 6, 2025
4ff22dd
Move some TypeVisitable/TypeFoldable impls to rustc_type_ir
flodiebold Nov 10, 2024
856e381
don't schedule unnecessary drops when lowering or-patterns
dianne Jul 9, 2025
ea1eca5
base drop order on the first sub-branch
dianne Jul 9, 2025
b7de539
lower bindings in the order they're written
dianne Jul 10, 2025
f7ad406
Port `#[should_panic]` to the new attribute parsing infrastructure
JonathanBrouwer Jul 11, 2025
4281e05
Changes to the tests for the `#[should_panic]` port
JonathanBrouwer Jul 11, 2025
a8f6528
Add a missing UpcastFrom impl in rustc_type_ir
flodiebold Nov 10, 2024
40747d5
Rollup merge of #137831 - estebank:auto-trait-err, r=compiler-errors
Zalathar Aug 7, 2025
24018a6
Rollup merge of #143028 - dianne:let-else-storage, r=oli-obk,traviscross
Zalathar Aug 7, 2025
1e0dd6f
Rollup merge of #143764 - dianne:primary-binding-drop-order, r=Nadrie…
Zalathar Aug 7, 2025
d8c6a20
Rollup merge of #143808 - JonathanBrouwer:should_panic_parser, r=jdon…
Zalathar Aug 7, 2025
134a6a5
Rollup merge of #143906 - LorrensP-2158466:miri-float-nondet-foreign-…
Zalathar Aug 7, 2025
ece8d99
Rollup merge of #143929 - petrochenkov:depresolve, r=lcnr
Zalathar Aug 7, 2025
17674d8
Rollup merge of #144133 - oli-obk:stabilize-const-type-id, r=lcnr
Zalathar Aug 7, 2025
07a378f
Rollup merge of #144439 - xizheyin:symbol-rs, r=petrochenkov
Zalathar Aug 7, 2025
50a130a
Rollup merge of #144473 - zeroomega:rustc_inconsistency, r=Mark-Simul…
Zalathar Aug 7, 2025
9913605
Rollup merge of #144498 - Noratrieb:rustc-json-schema, r=jieyouxu
Zalathar Aug 7, 2025
8e14bb7
Rollup merge of #144659 - mati865:gnullvm-vendor-libunwind, r=Kobzol
Zalathar Aug 7, 2025
d3fe765
Rollup merge of #144705 - pmur:murp/aarch64-lse, r=Amanieu
Zalathar Aug 7, 2025
73376eb
Rollup merge of #144807 - Shourya742:2025-07-30-streamline-config, r=…
Zalathar Aug 7, 2025
eaba2c7
Rollup merge of #144900 - Kivooeo:unsigned_signed_diff-stabilize, r=d…
Zalathar Aug 7, 2025
89df8fa
Rollup merge of #144903 - Kivooeo:panic_handler-is-not-begin, r=m-ou-se
Zalathar Aug 7, 2025
9dbf035
Rollup merge of #144931 - dpaoliello:msvc-wholearchive, r=jieyouxu
Zalathar Aug 7, 2025
f943da6
Rollup merge of #144974 - tgross35:update-builtins, r=tgross35
Zalathar Aug 7, 2025
ea47c11
Rollup merge of #144997 - BoxyUwU:bootstrap_bump, r=Mark-Simulacrum
Zalathar Aug 7, 2025
dad85cf
Rollup merge of #145004 - bjorn3:remove_unused_fields, r=WaffleLapkin
Zalathar Aug 7, 2025
63ca855
Rollup merge of #145009 - jackh726:ra-next-solver-changes, r=compiler…
Zalathar Aug 7, 2025
79e429a
Rollup merge of #145014 - bjorn3:revert_preserve_debug_gdb_scripts, r…
Zalathar Aug 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
63 changes: 63 additions & 0 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1203,6 +1203,12 @@ version = "1.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8975ffdaa0ef3661bfe02dbdcc06c9f829dfafe6a3c474de366a8d5e44276921"

[[package]]
name = "dyn-clone"
version = "1.0.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1c7a8fb8a9fbf66c1f703fe16184d10ca0ee9d23be5b4436400408ba54a95005"

[[package]]
name = "either"
version = "1.15.0"
Expand Down Expand Up @@ -3196,6 +3202,26 @@ dependencies = [
"thiserror 2.0.12",
]

[[package]]
name = "ref-cast"
version = "1.0.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4a0ae411dbe946a674d89546582cea4ba2bb8defac896622d6496f14c23ba5cf"
dependencies = [
"ref-cast-impl",
]

[[package]]
name = "ref-cast-impl"
version = "1.0.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1165225c21bff1f3bbce98f5a1f889949bc902d3575308cc7b0de30b4f6d27c7"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.104",
]

[[package]]
name = "regex"
version = "1.11.1"
Expand Down Expand Up @@ -4650,6 +4676,7 @@ dependencies = [
"rustc_macros",
"rustc_serialize",
"rustc_span",
"schemars",
"serde",
"serde_derive",
"serde_json",
Expand Down Expand Up @@ -4964,6 +4991,31 @@ dependencies = [
"windows-sys 0.59.0",
]

[[package]]
name = "schemars"
version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "82d20c4491bc164fa2f6c5d44565947a52ad80b9505d8e36f8d54c27c739fcd0"
dependencies = [
"dyn-clone",
"ref-cast",
"schemars_derive",
"serde",
"serde_json",
]

[[package]]
name = "schemars_derive"
version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "33d020396d1d138dc19f1165df7545479dcd58d93810dc5d646a16e55abefa80"
dependencies = [
"proc-macro2",
"quote",
"serde_derive_internals",
"syn 2.0.104",
]

[[package]]
name = "scoped-tls"
version = "1.0.1"
Expand Down Expand Up @@ -5038,6 +5090,17 @@ dependencies = [
"syn 2.0.104",
]

[[package]]
name = "serde_derive_internals"
version = "0.29.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.104",
]

[[package]]
name = "serde_json"
version = "1.0.142"
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_ast_passes/messages.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ ast_passes_auto_generic = auto traits cannot have generic parameters
ast_passes_auto_items = auto traits cannot have associated items
.label = {ast_passes_auto_items}
.suggestion = remove these associated items
.suggestion = remove the associated items
ast_passes_auto_super_lifetime = auto traits cannot have super traits or lifetime bounds
.label = {ast_passes_auto_super_lifetime}
Expand Down
16 changes: 10 additions & 6 deletions compiler/rustc_ast_passes/src/ast_validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -699,19 +699,23 @@ impl<'a> AstValidator<'a> {
}
}

fn deny_super_traits(&self, bounds: &GenericBounds, ident_span: Span) {
fn deny_super_traits(&self, bounds: &GenericBounds, ident: Span) {
if let [.., last] = &bounds[..] {
let span = ident_span.shrink_to_hi().to(last.span());
self.dcx().emit_err(errors::AutoTraitBounds { span, ident: ident_span });
let span = bounds.iter().map(|b| b.span()).collect();
let removal = ident.shrink_to_hi().to(last.span());
self.dcx().emit_err(errors::AutoTraitBounds { span, removal, ident });
}
}

fn deny_where_clause(&self, where_clause: &WhereClause, ident_span: Span) {
fn deny_where_clause(&self, where_clause: &WhereClause, ident: Span) {
if !where_clause.predicates.is_empty() {
// FIXME: The current diagnostic is misleading since it only talks about
// super trait and lifetime bounds while we should just say “bounds”.
self.dcx()
.emit_err(errors::AutoTraitBounds { span: where_clause.span, ident: ident_span });
self.dcx().emit_err(errors::AutoTraitBounds {
span: vec![where_clause.span],
removal: where_clause.span,
ident,
});
}
}

Expand Down
9 changes: 5 additions & 4 deletions compiler/rustc_ast_passes/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ pub(crate) struct ModuleNonAscii {
#[diag(ast_passes_auto_generic, code = E0567)]
pub(crate) struct AutoTraitGeneric {
#[primary_span]
#[suggestion(code = "", applicability = "machine-applicable")]
#[suggestion(code = "", applicability = "machine-applicable", style = "tool-only")]
pub span: Span,
#[label]
pub ident: Span,
Expand All @@ -354,8 +354,9 @@ pub(crate) struct AutoTraitGeneric {
#[diag(ast_passes_auto_super_lifetime, code = E0568)]
pub(crate) struct AutoTraitBounds {
#[primary_span]
#[suggestion(code = "", applicability = "machine-applicable")]
pub span: Span,
pub span: Vec<Span>,
#[suggestion(code = "", applicability = "machine-applicable", style = "tool-only")]
pub removal: Span,
#[label]
pub ident: Span,
}
Expand All @@ -365,7 +366,7 @@ pub(crate) struct AutoTraitBounds {
pub(crate) struct AutoTraitItems {
#[primary_span]
pub spans: Vec<Span>,
#[suggestion(code = "", applicability = "machine-applicable")]
#[suggestion(code = "", applicability = "machine-applicable", style = "tool-only")]
pub total: Span,
#[label]
pub ident: Span,
Expand Down
52 changes: 52 additions & 0 deletions compiler/rustc_attr_parsing/src/attributes/test_attrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,55 @@ impl<S: Stage> SingleAttributeParser<S> for IgnoreParser {
})
}
}

pub(crate) struct ShouldPanicParser;

impl<S: Stage> SingleAttributeParser<S> for ShouldPanicParser {
const PATH: &[Symbol] = &[sym::should_panic];
const ATTRIBUTE_ORDER: AttributeOrder = AttributeOrder::KeepOutermost;
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::WarnButFutureError;
const TEMPLATE: AttributeTemplate =
template!(Word, List: r#"expected = "reason""#, NameValueStr: "reason");

fn convert(cx: &mut AcceptContext<'_, '_, S>, args: &ArgParser<'_>) -> Option<AttributeKind> {
Some(AttributeKind::ShouldPanic {
span: cx.attr_span,
reason: match args {
ArgParser::NoArgs => None,
ArgParser::NameValue(name_value) => {
let Some(str_value) = name_value.value_as_str() else {
cx.expected_string_literal(
name_value.value_span,
Some(name_value.value_as_lit()),
);
return None;
};
Some(str_value)
}
ArgParser::List(list) => {
let Some(single) = list.single() else {
cx.expected_single_argument(list.span);
return None;
};
let Some(single) = single.meta_item() else {
cx.expected_name_value(single.span(), Some(sym::expected));
return None;
};
if !single.path().word_is(sym::expected) {
cx.expected_specific_argument_strings(list.span, vec!["expected"]);
return None;
}
let Some(nv) = single.args().name_value() else {
cx.expected_name_value(single.span(), Some(sym::expected));
return None;
};
let Some(expected) = nv.value_as_str() else {
cx.expected_string_literal(nv.value_span, Some(nv.value_as_lit()));
return None;
};
Some(expected)
}
},
})
}
}
3 changes: 2 additions & 1 deletion compiler/rustc_attr_parsing/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ use crate::attributes::semantics::MayDangleParser;
use crate::attributes::stability::{
BodyStabilityParser, ConstStabilityIndirectParser, ConstStabilityParser, StabilityParser,
};
use crate::attributes::test_attrs::IgnoreParser;
use crate::attributes::test_attrs::{IgnoreParser, ShouldPanicParser};
use crate::attributes::traits::{
AllowIncoherentImplParser, CoherenceIsCoreParser, CoinductiveParser, ConstTraitParser,
DenyExplicitImplParser, DoNotImplementViaObjectParser, FundamentalParser, MarkerParser,
Expand Down Expand Up @@ -174,6 +174,7 @@ attribute_parsers!(
Single<RustcLayoutScalarValidRangeEnd>,
Single<RustcLayoutScalarValidRangeStart>,
Single<RustcObjectLifetimeDefaultParser>,
Single<ShouldPanicParser>,
Single<SkipDuringMethodDispatchParser>,
Single<TransparencyParser>,
Single<WithoutArgs<AllowIncoherentImplParser>>,
Expand Down
51 changes: 17 additions & 34 deletions compiler/rustc_builtin_macros/src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@ use std::assert_matches::assert_matches;
use std::iter;

use rustc_ast::ptr::P;
use rustc_ast::{self as ast, GenericParamKind, attr, join_path_idents};
use rustc_ast::{self as ast, GenericParamKind, HasNodeId, attr, join_path_idents};
use rustc_ast_pretty::pprust;
use rustc_attr_parsing::AttributeParser;
use rustc_errors::{Applicability, Diag, Level};
use rustc_expand::base::*;
use rustc_hir::Attribute;
use rustc_hir::attrs::AttributeKind;
use rustc_span::{ErrorGuaranteed, FileNameDisplayPreference, Ident, Span, Symbol, sym};
use thin_vec::{ThinVec, thin_vec};
use tracing::debug;
Expand Down Expand Up @@ -473,39 +476,19 @@ fn should_ignore_message(i: &ast::Item) -> Option<Symbol> {
}

fn should_panic(cx: &ExtCtxt<'_>, i: &ast::Item) -> ShouldPanic {
match attr::find_by_name(&i.attrs, sym::should_panic) {
Some(attr) => {
match attr.meta_item_list() {
// Handle #[should_panic(expected = "foo")]
Some(list) => {
let msg = list
.iter()
.find(|mi| mi.has_name(sym::expected))
.and_then(|mi| mi.meta_item())
.and_then(|mi| mi.value_str());
if list.len() != 1 || msg.is_none() {
cx.dcx()
.struct_span_warn(
attr.span,
"argument must be of the form: \
`expected = \"error message\"`",
)
.with_note(
"errors in this attribute were erroneously \
allowed and will become a hard error in a \
future release",
)
.emit();
ShouldPanic::Yes(None)
} else {
ShouldPanic::Yes(msg)
}
}
// Handle #[should_panic] and #[should_panic = "expected"]
None => ShouldPanic::Yes(attr.value_str()),
}
}
None => ShouldPanic::No,
if let Some(Attribute::Parsed(AttributeKind::ShouldPanic { reason, .. })) =
AttributeParser::parse_limited(
cx.sess,
&i.attrs,
sym::should_panic,
i.span,
i.node_id(),
None,
)
{
ShouldPanic::Yes(reason)
} else {
ShouldPanic::No
}
}

Expand Down
3 changes: 1 addition & 2 deletions compiler/rustc_codegen_gcc/src/debuginfo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,7 @@ impl<'gcc, 'tcx> DebugInfoCodegenMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
// TODO(antoyo): implement.
}

fn debuginfo_finalize(&mut self) {
// TODO: emit section `.debug_gdb_scripts`.
fn debuginfo_finalize(&self) {
self.context.set_debug_info(true)
}

Expand Down
Loading
Loading