Skip to content

Commit

Permalink
Auto merge of rust-lang#137347 - workingjubilee:rollup-8l6sr60, r=<try>
Browse files Browse the repository at this point in the history
Rollup of 12 pull requests

Successful merges:

 - rust-lang#128080 (Specify scope in `out_of_scope_macro_calls` lint)
 - rust-lang#135354 ([Debuginfo] Add MSVC Synthetic and Summary providers to LLDB)
 - rust-lang#135630 (add more `s390x` target features)
 - rust-lang#136089 (Reduce `Box::default` stack copies in debug mode)
 - rust-lang#136148 (Optionally add type names to `TypeId`s.)
 - rust-lang#137192 (Remove obsolete Windows ThinLTO+TLS workaround)
 - rust-lang#137204 (Clarify MIR dialects and phases)
 - rust-lang#137299 (Simplify `Postorder` customization.)
 - rust-lang#137302 (Use a probe to avoid registering stray region obligations when re-checking drops in MIR typeck)
 - rust-lang#137305 (Tweaks in and around `rustc_middle`)
 - rust-lang#137313 (Some codegen_llvm cleanups)
 - rust-lang#137333 (Use `edition = "2024"` in the compiler (redux))

r? `@ghost`
`@rustbot` modify labels: rollup

try-job: test-various
try-job: x86_64-msvc-1
try-job: x86_64-msvc-2
try-job: i686-msvc-1
try-job: i686-msvc-2
try-job: i686-mingw-1
try-job: i686-mingw-2
try-job: i686-mingw-3
try-job: x86_64-gnu-nopt
  • Loading branch information
bors committed Feb 20, 2025
2 parents f04bbc6 + a64c4e5 commit 252d70e
Show file tree
Hide file tree
Showing 198 changed files with 1,225 additions and 628 deletions.
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
Expand Down
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
Expand Down
18 changes: 9 additions & 9 deletions compiler/rustc_abi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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) {
Expand Down Expand Up @@ -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)
Expand Down
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
Expand Down
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
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_ast/src/visit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down
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
Expand Down
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
Expand Down
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
Expand Down
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
Expand Down
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
Expand Down
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
Expand Down
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
Expand Down
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
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_borrowck/src/diagnostics/explain_borrow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_borrowck/src/diagnostics/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_borrowck/src/diagnostics/region_name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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, .. }),
..
}) => {
Expand Down Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_borrowck/src/polonius/dump.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ fn emit_polonius_mir<'tcx>(
regioncx,
closure_region_requirements,
borrow_set,
pass_where.clone(),
pass_where,
out,
)?;

Expand Down
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
Expand Up @@ -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() {
Expand All @@ -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 }
}
}
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_borrowck/src/universal_regions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down
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]
Expand Down
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
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_llvm/src/back/lto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
Loading

0 comments on commit 252d70e

Please sign in to comment.