Skip to content

Rollup of 12 pull requests #137347

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 55 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
8b14227
add MSVC tuple providers
Walnut356 Jan 10, 2025
71b6d49
add MSVC slice providers
Walnut356 Jan 10, 2025
c425660
add msvc enum providers
Walnut356 Jan 11, 2025
009994a
organize lldb_commands
Walnut356 Jan 11, 2025
2b8ff75
add MSVC str providers
Walnut356 Jan 11, 2025
4f59533
add alternate inner type lookup for vec/string for missing template args
Walnut356 Jan 11, 2025
f725ad7
more robust tuple summary
Walnut356 Jan 11, 2025
0bf0817
More robust sequence formatter
Walnut356 Jan 11, 2025
a3adcd2
add alternate inner type lookup for hashmap/set when template args mi…
Walnut356 Jan 11, 2025
2be8812
tidy
Walnut356 Jan 11, 2025
e8c5e09
doc comment for get_template_args
Walnut356 Jan 12, 2025
8a5bb28
add more s390x target features
folkertdev Jan 17, 2025
0f12b8c
slots fix
Walnut356 Jan 19, 2025
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
0819c16
Fix import/attribute errors related to `SBTypeStaticField`
Walnut356 Feb 8, 2025
d2ed8cf
Optionally add type names to `TypeId`s.
kpreid Jan 27, 2025
d6f5d34
fix string and tuple struct formatting
Walnut356 Feb 12, 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
f70361d
Rollup merge of #128080 - estebank:out-of-scope-macro, r=petrochenkov
workingjubilee Feb 20, 2025
aebd907
Rollup merge of #135354 - Walnut356:msvc_lldb, r=wesleywiser
workingjubilee Feb 20, 2025
59cb57c
Rollup merge of #135630 - folkertdev:s390x-target-features, r=Amanieu
workingjubilee Feb 20, 2025
82b4d63
Rollup merge of #136089 - jwong101:box-default-debug-stack-usage, r=A…
workingjubilee Feb 20, 2025
e813506
Rollup merge of #136148 - kpreid:type-str, r=joboet
workingjubilee Feb 20, 2025
38f64e3
Rollup merge of #137192 - kornelski:windows-tls-lto, r=ChrisDenton
workingjubilee Feb 20, 2025
566c4d4
Rollup merge of #137204 - nnethercote:clarify-MIR-dialects-and-phases…
workingjubilee Feb 20, 2025
7376c21
Rollup merge of #137299 - nnethercote:simplify-PostOrder-customizatio…
workingjubilee Feb 20, 2025
5643a93
Rollup merge of #137302 - compiler-errors:stray-drop-regions, r=matth…
workingjubilee Feb 20, 2025
faeb221
Rollup merge of #137305 - nnethercote:rustc_middle-2, r=lcnr
workingjubilee Feb 20, 2025
4a32c28
Rollup merge of #137313 - oli-obk:push-ywvuqkxuqyom, r=petrochenkov
workingjubilee Feb 20, 2025
a64c4e5
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
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
Loading