Skip to content

Rollup of 10 pull requests #137352

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 38 commits into from
Closed
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
80faf20
add test for Box::default's stack usage in debug mode
jwong101 Jan 26, 2025
9700567
reduce `Box::default` stack copies in debug mode
jwong101 Jan 26, 2025
40ecda6
Remove obsolete MinGW ThinLTO+TLS workaround
kornelski Feb 17, 2025
fe7ed27
Specify scope in `out_of_scope_macro_calls` lint
estebank Jul 23, 2024
c9fbaab
Reflow `MirPhase` comments.
nnethercote Feb 18, 2025
c039533
Improve MIR phase comments.
nnethercote Feb 18, 2025
83a7fb6
Improve how the MIR dialect/phase index is reported.
nnethercote Feb 18, 2025
dc4f948
Move `StatementAsExpression` to where it's actually used.
nnethercote Feb 5, 2025
0895fe2
Remove unused items from `query.rs`.
nnethercote Feb 5, 2025
cae9ebb
Simplify `Postorder` customization.
nnethercote Feb 19, 2025
d4609f8
Use a probe to avoid registering stray region obligations when re-che…
compiler-errors Feb 20, 2025
ea71808
Create safe helper for LLVMSetDLLStorageClass
oli-obk Feb 14, 2025
ce7f58b
Merge two operations that were always performed together
oli-obk Feb 14, 2025
835d434
Reword message
estebank Feb 19, 2025
2e2df66
Upgrade the compiler to edition 2024
compiler-errors Feb 20, 2025
2db18b3
Fix builtin lints
compiler-errors Sep 18, 2024
d5cae77
Fix overcapturing, unsafe extern blocks, and new unsafe ops
compiler-errors Feb 20, 2025
c10f47d
Fix binding mode problems
compiler-errors Feb 20, 2025
c2dba9c
Rename `InternedObligationCauseCode`.
nnethercote Feb 6, 2025
e2e4d0b
Remove an unnecessary re-export.
nnethercote Feb 6, 2025
c301ba5
Fix a typo in a comment.
nnethercote Feb 12, 2025
2f695dc
Remove unused `Body::span_for_ty_context` method.
nnethercote Feb 13, 2025
5d2d11f
Rename `ClearCrossCrate::assert_crate_local`.
nnethercote Feb 13, 2025
c49e2df
Put a `BlockTailInfo` in `BlockFrame::TailExpr`.
nnethercote Feb 13, 2025
e03c809
Remove some unnecessary `FIXME` comments.
nnethercote Feb 13, 2025
0519a58
Make `PassWhere` impl `Copy`.
nnethercote Feb 14, 2025
2edaf68
Clarify a comment.
nnethercote Feb 18, 2025
69c7e1d
add more s390x target features
folkertdev Jan 17, 2025
01ed298
Rollup merge of #128080 - estebank:out-of-scope-macro, r=petrochenkov
workingjubilee Feb 20, 2025
d26ed5a
Rollup merge of #135630 - folkertdev:s390x-target-features, r=Amanieu
workingjubilee Feb 20, 2025
8af2873
Rollup merge of #136089 - jwong101:box-default-debug-stack-usage, r=A…
workingjubilee Feb 20, 2025
272e1e6
Rollup merge of #137192 - kornelski:windows-tls-lto, r=ChrisDenton
workingjubilee Feb 20, 2025
42f4131
Rollup merge of #137204 - nnethercote:clarify-MIR-dialects-and-phases…
workingjubilee Feb 20, 2025
c29bb34
Rollup merge of #137299 - nnethercote:simplify-PostOrder-customizatio…
workingjubilee Feb 20, 2025
b2120ec
Rollup merge of #137302 - compiler-errors:stray-drop-regions, r=matth…
workingjubilee Feb 20, 2025
4972c1d
Rollup merge of #137305 - nnethercote:rustc_middle-2, r=lcnr
workingjubilee Feb 20, 2025
f78a051
Rollup merge of #137313 - oli-obk:push-ywvuqkxuqyom, r=petrochenkov
workingjubilee Feb 20, 2025
a2d17a6
Rollup merge of #137333 - compiler-errors:edition-2024-fresh, r=Nadri…
workingjubilee Feb 20, 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: 1 addition & 1 deletion compiler/rustc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "rustc-main"
version = "0.0.0"
edition = "2021"
edition = "2024"

[dependencies]
# tidy-alphabetical-start
2 changes: 1 addition & 1 deletion compiler/rustc_abi/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "rustc_abi"
version = "0.0.0"
edition = "2021"
edition = "2024"

[dependencies]
# tidy-alphabetical-start
18 changes: 9 additions & 9 deletions compiler/rustc_abi/src/lib.rs
Original file line number Diff line number Diff line change
@@ -329,19 +329,19 @@ impl TargetDataLayout {
[p] if p.starts_with('P') => {
dl.instruction_address_space = parse_address_space(&p[1..], "P")?
}
["a", ref a @ ..] => dl.aggregate_align = parse_align(a, "a")?,
["f16", ref a @ ..] => dl.f16_align = parse_align(a, "f16")?,
["f32", ref a @ ..] => dl.f32_align = parse_align(a, "f32")?,
["f64", ref a @ ..] => dl.f64_align = parse_align(a, "f64")?,
["f128", ref a @ ..] => dl.f128_align = parse_align(a, "f128")?,
["a", a @ ..] => dl.aggregate_align = parse_align(a, "a")?,
["f16", a @ ..] => dl.f16_align = parse_align(a, "f16")?,
["f32", a @ ..] => dl.f32_align = parse_align(a, "f32")?,
["f64", a @ ..] => dl.f64_align = parse_align(a, "f64")?,
["f128", a @ ..] => dl.f128_align = parse_align(a, "f128")?,
// FIXME(erikdesjardins): we should be parsing nonzero address spaces
// this will require replacing TargetDataLayout::{pointer_size,pointer_align}
// with e.g. `fn pointer_size_in(AddressSpace)`
[p @ "p", s, ref a @ ..] | [p @ "p0", s, ref a @ ..] => {
[p @ "p", s, a @ ..] | [p @ "p0", s, a @ ..] => {
dl.pointer_size = parse_size(s, p)?;
dl.pointer_align = parse_align(a, p)?;
}
[s, ref a @ ..] if s.starts_with('i') => {
[s, a @ ..] if s.starts_with('i') => {
let Ok(bits) = s[1..].parse::<u64>() else {
parse_size(&s[1..], "i")?; // For the user error.
continue;
@@ -362,7 +362,7 @@ impl TargetDataLayout {
dl.i128_align = a;
}
}
[s, ref a @ ..] if s.starts_with('v') => {
[s, a @ ..] if s.starts_with('v') => {
let v_size = parse_size(&s[1..], "v")?;
let a = parse_align(a, s)?;
if let Some(v) = dl.vector_align.iter_mut().find(|v| v.0 == v_size) {
@@ -1805,7 +1805,7 @@ where
variants,
max_repr_align,
unadjusted_abi_align,
ref randomization_seed,
randomization_seed,
} = self;
f.debug_struct("Layout")
.field("size", size)
2 changes: 1 addition & 1 deletion compiler/rustc_arena/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "rustc_arena"
version = "0.0.0"
edition = "2021"
edition = "2024"

[dependencies]
# tidy-alphabetical-start
2 changes: 1 addition & 1 deletion compiler/rustc_ast/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "rustc_ast"
version = "0.0.0"
edition = "2021"
edition = "2024"

[dependencies]
# tidy-alphabetical-start
2 changes: 1 addition & 1 deletion compiler/rustc_ast/src/visit.rs
Original file line number Diff line number Diff line change
@@ -597,7 +597,7 @@ pub fn walk_use_tree<'a, V: Visitor<'a>>(
visit_opt!(visitor, visit_ident, rename);
}
UseTreeKind::Glob => {}
UseTreeKind::Nested { ref items, span: _ } => {
UseTreeKind::Nested { items, span: _ } => {
for &(ref nested_tree, nested_id) in items {
try_visit!(visitor.visit_use_tree(nested_tree, nested_id, true));
}
2 changes: 1 addition & 1 deletion compiler/rustc_ast_ir/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "rustc_ast_ir"
version = "0.0.0"
edition = "2021"
edition = "2024"

[dependencies]
# tidy-alphabetical-start
2 changes: 1 addition & 1 deletion compiler/rustc_ast_lowering/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "rustc_ast_lowering"
version = "0.0.0"
edition = "2021"
edition = "2024"

[lib]
doctest = false
2 changes: 1 addition & 1 deletion compiler/rustc_ast_passes/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "rustc_ast_passes"
version = "0.0.0"
edition = "2021"
edition = "2024"

[dependencies]
# tidy-alphabetical-start
2 changes: 1 addition & 1 deletion compiler/rustc_ast_pretty/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "rustc_ast_pretty"
version = "0.0.0"
edition = "2021"
edition = "2024"

[dependencies]
# tidy-alphabetical-start
2 changes: 1 addition & 1 deletion compiler/rustc_attr_data_structures/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "rustc_attr_data_structures"
version = "0.0.0"
edition = "2021"
edition = "2024"

[dependencies]
# tidy-alphabetical-start
2 changes: 1 addition & 1 deletion compiler/rustc_attr_parsing/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "rustc_attr_parsing"
version = "0.0.0"
edition = "2021"
edition = "2024"

[dependencies]
# tidy-alphabetical-start
2 changes: 1 addition & 1 deletion compiler/rustc_baked_icu_data/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "rustc_baked_icu_data"
version = "0.0.0"
edition = "2021"
edition = "2024"

[dependencies]
# tidy-alphabetical-start
2 changes: 1 addition & 1 deletion compiler/rustc_borrowck/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "rustc_borrowck"
version = "0.0.0"
edition = "2021"
edition = "2024"

[dependencies]
# tidy-alphabetical-start
2 changes: 1 addition & 1 deletion compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs
Original file line number Diff line number Diff line change
@@ -2621,7 +2621,7 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
if let hir::Pat { kind: hir::PatKind::Binding(_, hir_id, _ident, _), .. } =
local.pat
&& let Some(init) = local.init
&& let hir::Expr {
&& let &hir::Expr {
kind:
hir::ExprKind::Closure(&hir::Closure {
kind: hir::ClosureKind::Closure,
2 changes: 1 addition & 1 deletion compiler/rustc_borrowck/src/diagnostics/explain_borrow.rs
Original file line number Diff line number Diff line change
@@ -262,7 +262,7 @@ impl<'tcx> BorrowExplanation<'tcx> {
fn visit_expr(&mut self, expr: &'hir hir::Expr<'hir>) {
if let hir::ExprKind::If(cond, _conseq, _alt)
| hir::ExprKind::Loop(
hir::Block {
&hir::Block {
expr:
Some(&hir::Expr {
kind: hir::ExprKind::If(cond, _conseq, _alt),
2 changes: 1 addition & 1 deletion compiler/rustc_borrowck/src/diagnostics/mod.rs
Original file line number Diff line number Diff line change
@@ -1126,7 +1126,7 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
let hir_id = self.infcx.tcx.local_def_id_to_hir_id(def_id);
let expr = &self.infcx.tcx.hir().expect_expr(hir_id).kind;
debug!("closure_span: hir_id={:?} expr={:?}", hir_id, expr);
if let hir::ExprKind::Closure(&hir::Closure { kind, fn_decl_span, .. }) = expr {
if let &hir::ExprKind::Closure(&hir::Closure { kind, fn_decl_span, .. }) = expr {
for (captured_place, place) in
self.infcx.tcx.closure_captures(def_id).iter().zip(places)
{
4 changes: 2 additions & 2 deletions compiler/rustc_borrowck/src/diagnostics/region_name.rs
Original file line number Diff line number Diff line change
@@ -682,7 +682,7 @@ impl<'tcx> MirBorrowckCtxt<'_, '_, 'tcx> {
let mir_hir_id = self.mir_hir_id();

let (return_span, mir_description, hir_ty) = match tcx.hir_node(mir_hir_id) {
hir::Node::Expr(hir::Expr {
hir::Node::Expr(&hir::Expr {
kind: hir::ExprKind::Closure(&hir::Closure { fn_decl, kind, fn_decl_span, .. }),
..
}) => {
@@ -874,7 +874,7 @@ impl<'tcx> MirBorrowckCtxt<'_, '_, 'tcx> {
.name;

let yield_span = match tcx.hir_node(self.mir_hir_id()) {
hir::Node::Expr(hir::Expr {
hir::Node::Expr(&hir::Expr {
kind: hir::ExprKind::Closure(&hir::Closure { fn_decl_span, .. }),
..
}) => tcx.sess.source_map().end_point(fn_decl_span),
2 changes: 1 addition & 1 deletion compiler/rustc_borrowck/src/polonius/dump.rs
Original file line number Diff line number Diff line change
@@ -226,7 +226,7 @@ fn emit_polonius_mir<'tcx>(
regioncx,
closure_region_requirements,
borrow_set,
pass_where.clone(),
pass_where,
out,
)?;

22 changes: 14 additions & 8 deletions compiler/rustc_borrowck/src/type_check/liveness/trace.rs
Original file line number Diff line number Diff line change
@@ -613,9 +613,14 @@ impl<'tcx> LivenessContext<'_, '_, '_, 'tcx> {
// types, so there's no guarantee that it succeeds. We also
// can't rely on the the `ErrorGuaranteed` from `fully_perform` here
// because it comes from delay_span_bug.
let ocx = ObligationCtxt::new_with_diagnostics(&typeck.infcx);
let errors =
match dropck_outlives::compute_dropck_outlives_with_errors(&ocx, op, span) {
//
// Do this inside of a probe because we don't particularly care (or want)
// any region side-effects of this operation in our infcx.
typeck.infcx.probe(|_| {
let ocx = ObligationCtxt::new_with_diagnostics(&typeck.infcx);
let errors = match dropck_outlives::compute_dropck_outlives_with_errors(
&ocx, op, span,
) {
Ok(_) => ocx.select_all_or_error(),
Err(e) => {
if e.is_empty() {
@@ -626,11 +631,12 @@ impl<'tcx> LivenessContext<'_, '_, '_, 'tcx> {
}
};

if !errors.is_empty() {
typeck.infcx.err_ctxt().report_fulfillment_errors(errors);
} else {
span_bug!(span, "Rerunning drop data query produced no error.");
}
if !errors.is_empty() {
typeck.infcx.err_ctxt().report_fulfillment_errors(errors);
} else {
span_bug!(span, "Rerunning drop data query produced no error.");
}
});
DropData { dropck_result: Default::default(), region_constraint_data: None }
}
}
2 changes: 1 addition & 1 deletion compiler/rustc_borrowck/src/universal_regions.rs
Original file line number Diff line number Diff line change
@@ -308,7 +308,7 @@ impl<'tcx> UniversalRegions<'tcx> {

/// Returns an iterator over all the RegionVids corresponding to
/// universally quantified free regions.
pub(crate) fn universal_regions_iter(&self) -> impl Iterator<Item = RegionVid> {
pub(crate) fn universal_regions_iter(&self) -> impl Iterator<Item = RegionVid> + use<> {
(FIRST_GLOBAL_INDEX..self.num_universals).map(RegionVid::from_usize)
}

2 changes: 1 addition & 1 deletion compiler/rustc_builtin_macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "rustc_builtin_macros"
version = "0.0.0"
edition = "2021"
edition = "2024"


[lints.rust]
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_llvm/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "rustc_codegen_llvm"
version = "0.0.0"
edition = "2021"
edition = "2024"

[lib]
test = false
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_llvm/src/back/lto.rs
Original file line number Diff line number Diff line change
@@ -362,8 +362,8 @@ fn fat_lto(
ptr as *const *const libc::c_char,
symbols_below_threshold.len() as libc::size_t,
);
save_temp_bitcode(cgcx, &module, "lto.after-restriction");
}
save_temp_bitcode(cgcx, &module, "lto.after-restriction");
}

Ok(LtoModuleCodegen::Fat(module))
Loading
Loading