Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
accf713
Refactor box downcasting methods
maxdexh Oct 15, 2026
73d8ca8
Add `let_underscore_drop_guard` lint.
theemathas Oct 16, 2026
e4a18a6
Provide more context when an expected type was a type parameter
estebank Jul 29, 2026
b1476a0
Only point at param with default type
estebank Oct 5, 2026
b1cf8bd
Tweak message
estebank Oct 5, 2026
bd34b4d
Provide trait and impl context when an assoc item doesn't agree with …
estebank Oct 5, 2026
7518566
Streamline output by moving span label of type parameter default to "…
estebank Oct 5, 2026
b6b1d7a
fix test
estebank Oct 5, 2026
b9b3dba
Fix rebase
estebank Oct 20, 2026
2885a32
Excercise all new diagnostic changes in existing tests
estebank Oct 25, 2026
7f7c0b3
Improve mem::take wording
goldpanth3r Oct 28, 2026
9fe3d9e
Make incorrect struct literal syntax suggestion verbose
estebank Oct 28, 2026
4cab988
Do not incorrectly suggest changing tuple struct to local binding
estebank Oct 28, 2026
67300e3
Mostly restore apple jobs
JonathanBrouwer Oct 31, 2026
5f83957
ci: increase free disk space on macos-26 jobs
ubiratansoares Oct 29, 2026
fca1932
ci: add minor improvements to scripts
ubiratansoares Oct 29, 2026
009ca55
ci: restore macos-26 jobs
ubiratansoares Oct 29, 2026
44acbcf
ci: output df stats before and after clean-up
ubiratansoares Oct 30, 2026
547b0bb
ci: free disk space also on macos-15
ubiratansoares Oct 30, 2026
2a91b50
Add TypeScript type for `window.ALL_CRATES`.
kpreid Mar 7, 2025
bc22034
Replace `AbiAlign` with `Align` in `pointer_align{,_in}`
beetrees Nov 1, 2026
df86f6e
Replace `AbiAlign` with `Align` in `Integer::align`
beetrees Nov 1, 2026
0eff598
Replace `AbiAlign` with `Align` in `Float::align`
beetrees Nov 1, 2026
c30cee0
Replace `AbiAlign` with `Align` in `{Primitive,Scalar}::default_align`
beetrees Nov 1, 2026
6d0b049
Replace `AbiAlign` with `Align` in `Layout::align`
beetrees Nov 1, 2026
8851c93
Add unstable rustdoc option `--crate-list-heading`.
kpreid Mar 7, 2025
9ec7923
Fix typo in test description
tiif Nov 1, 2026
79ecc0d
Bless mir-opt tests again, again
Jules-Bertholet Nov 1, 2026
220acce
Revert "use adt_async_drop_tys for nested ADTs in needs_async_drop"
maxdexh Nov 1, 2026
78496e5
Add regression test for issue 165263
maxdexh Nov 1, 2026
3b0fcf6
Remove the `-2` jobs
JonathanBrouwer Nov 1, 2026
33b5a0d
Fix allocator flag
JonathanBrouwer Nov 1, 2026
3cbd10b
specialize vec extend_with
Paladynee Oct 4, 2026
9e520f4
Fix FCW issue template labels
theemathas Nov 1, 2026
cfa604d
Rollup merge of #165251 - JonathanBrouwer:undo-apple-remove, r=jieyouxu
JonathanBrouwer Nov 1, 2026
1d0e561
Rollup merge of #138143 - kpreid:crate-sidebar, r=notriddle
JonathanBrouwer Nov 1, 2026
0d88384
Rollup merge of #163757 - Paladynee:lib/spec-vec-extend-with, r=Mark-…
JonathanBrouwer Nov 1, 2026
aab8940
Rollup merge of #164414 - theemathas:let_underscore_drop_guard, r=pet…
JonathanBrouwer Nov 1, 2026
5025173
Rollup merge of #160180 - estebank:issue-67991, r=tiif
JonathanBrouwer Nov 1, 2026
b16c5bb
Rollup merge of #164359 - maxdexh:refactor-downcast, r=joboet
JonathanBrouwer Nov 1, 2026
3744817
Rollup merge of #165086 - goldpanth3r:fix-mem-take-docs-165065, r=joboet
JonathanBrouwer Nov 1, 2026
60e7ca3
Rollup merge of #165088 - estebank:issue-66067, r=petrochenkov
JonathanBrouwer Nov 1, 2026
1b84f10
Rollup merge of #165262 - beetrees:replace-abi-align-mostly, r=workin…
JonathanBrouwer Nov 1, 2026
e42364d
Rollup merge of #165265 - Jules-Bertholet:fix-mir-opt-again-again, r=…
JonathanBrouwer Nov 1, 2026
79a4455
Rollup merge of #165266 - maxdexh:issue-165263, r=oli-obk
JonathanBrouwer Nov 1, 2026
c2a64e9
Rollup merge of #165276 - theemathas:fcw-issue-template-labels, r=Kiv…
JonathanBrouwer Nov 1, 2026
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 .github/ISSUE_TEMPLATE/tracking_issue_future.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Future Incompatibility Tracking Issue
about: A tracking issue for a future-incompatible lint
title: Tracking Issue for future-incompatibility lint XXX
labels: C-tracking-issue C-future-incompatibility T-compiler A-lints
labels: C-tracking-issue, C-future-incompatibility, T-compiler, A-lints
---
<!--
Thank you for creating a future-incompatible tracking issue! 📜 These issues
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,10 @@ jobs:
with:
fetch-depth: 2

# Free up disk space on Linux by removing preinstalled components that
# we do not need. We do this to enable some of the less resource
# intensive jobs to run on free runners, which however also have
# less disk space.
# Free up disk space on Linux or macOS by removing preinstalled components that
# we do not need.
- name: free up disk space
run: src/ci/scripts/free-disk-space-linux.sh
run: src/ci/scripts/free-disk-space.sh
if: matrix.free_disk

# If we don't need to free up disk space then just report how much space we have
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_abi/src/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> {
}
// Vectors require at least element alignment, else disable the opt
BackendRepr::SimdVector { element, count: _ }
if element.default_align(dl).abi > align =>
if element.default_align(dl) > align =>
{
BackendRepr::Memory { sized: true }
}
Expand Down Expand Up @@ -810,7 +810,7 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> {
// the alignment of the union. (This value is used both for
// determining the alignment of the overall enum, and the
// determining the alignment of the payload after the tag.)
let mut prefix_align = min_ity.align(dl).abi;
let mut prefix_align = min_ity.align(dl);
if repr.c() {
for fields in variants {
for field in fields {
Expand Down
8 changes: 4 additions & 4 deletions compiler/rustc_abi/src/layout/simple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,18 +83,18 @@ impl<FieldIdx: Idx, VariantIdx: Idx> LayoutData<FieldIdx, VariantIdx> {
largest_niche,
uninhabited: false,
size,
align,
align: AbiAlign::new(align),
max_repr_align: None,
unadjusted_abi_align: align.abi,
unadjusted_abi_align: align,
repr_c: false,
randomization_seed: Hash64::new(randomization_seed),
}
}

pub fn scalar_pair<C: HasDataLayout>(cx: &C, a: Scalar, b: Scalar) -> Self {
let dl = cx.data_layout();
let b_align = b.default_align(dl).abi;
let align = a.default_align(dl).abi.max(b_align).max(dl.aggregate_align);
let b_align = b.default_align(dl);
let align = a.default_align(dl).max(b_align).max(dl.aggregate_align);
let b_offset = a.size(dl).align_to(b_align);
let size = (b_offset + b.size(dl)).align_to(align);

Expand Down
8 changes: 4 additions & 4 deletions compiler/rustc_abi/src/layout/ty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ use rustc_macros::StableHash;

use crate::layout::{FieldIdx, VariantIdx};
use crate::{
AbiAlign, Align, BackendRepr, FieldsShape, Float, HasDataLayout, LayoutData, Niche, Numeric,
PointeeInfo, Primitive, Size, Variants,
Align, BackendRepr, FieldsShape, Float, HasDataLayout, LayoutData, Niche, Numeric, PointeeInfo,
Primitive, Size, Variants,
};

// Explicitly import `Float` to avoid ambiguity with `Primitive::Float`.
Expand Down Expand Up @@ -48,8 +48,8 @@ impl<'a> Layout<'a> {
self.0.0.largest_niche
}

pub fn align(self) -> AbiAlign {
self.0.0.align
pub fn align(self) -> Align {
self.0.0.align.abi
}

pub fn size(self) -> Size {
Expand Down
34 changes: 17 additions & 17 deletions compiler/rustc_abi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -781,20 +781,20 @@ impl TargetDataLayout {

/// Get the pointer alignment in the default data address space.
#[inline]
pub fn pointer_align(&self) -> AbiAlign {
AbiAlign::new(self.default_address_space_pointer_spec.pointer_align)
pub fn pointer_align(&self) -> Align {
self.default_address_space_pointer_spec.pointer_align
}

/// Get the pointer alignment in a specific address space.
#[inline]
pub fn pointer_align_in(&self, c: AddressSpace) -> AbiAlign {
AbiAlign::new(if c == self.default_address_space {
pub fn pointer_align_in(&self, c: AddressSpace) -> Align {
if c == self.default_address_space {
self.default_address_space_pointer_spec.pointer_align
} else if let Some(e) = self.address_space_info.iter().find(|(a, _)| a == &c) {
e.1.pointer_align
} else {
panic!("Use of unknown address space {c:?}");
})
}
}
}

Expand Down Expand Up @@ -1312,17 +1312,17 @@ impl Integer {
}
}

pub fn align<C: HasDataLayout>(self, cx: &C) -> AbiAlign {
pub fn align<C: HasDataLayout>(self, cx: &C) -> Align {
use Integer::*;
let dl = cx.data_layout();

AbiAlign::new(match self {
match self {
I8 => dl.i8_align,
I16 => dl.i16_align,
I32 => dl.i32_align,
I64 => dl.i64_align,
I128 => dl.i128_align,
})
}
}

/// Returns the largest signed value that can be represented by this Integer.
Expand Down Expand Up @@ -1383,7 +1383,7 @@ impl Integer {
let dl = cx.data_layout();

[I8, I16, I32, I64, I128].into_iter().find(|&candidate| {
wanted == candidate.align(dl).abi && wanted.bytes() == candidate.size().bytes()
wanted == candidate.align(dl) && wanted.bytes() == candidate.size().bytes()
})
}

Expand All @@ -1394,7 +1394,7 @@ impl Integer {

// FIXME(eddyb) maybe include I128 in the future, when it works everywhere.
for candidate in [I64, I32, I16] {
if wanted >= candidate.align(dl).abi && wanted.bytes() >= candidate.size().bytes() {
if wanted >= candidate.align(dl) && wanted.bytes() >= candidate.size().bytes() {
return candidate;
}
}
Expand Down Expand Up @@ -1448,17 +1448,17 @@ impl Float {
}
}

pub fn align<C: HasDataLayout>(self, cx: &C) -> AbiAlign {
pub fn align<C: HasDataLayout>(self, cx: &C) -> Align {
use Float::*;
let dl = cx.data_layout();

AbiAlign::new(match self {
match self {
F16 | F16B => dl.f16_align,
F32 => dl.f32_align,
F64 => dl.f64_align,
F128 => dl.f128_align,
PpcF128 => dl.f128_align,
})
}
}

pub fn ty_str(self) -> &'static str {
Expand Down Expand Up @@ -1567,7 +1567,7 @@ impl Primitive {
///
/// This is the type alignment for the corresponding built-in.
/// In other contexts it might have different alignment.
pub fn default_align<C: HasDataLayout>(self, cx: &C) -> AbiAlign {
pub fn default_align<C: HasDataLayout>(self, cx: &C) -> Align {
use Primitive::*;
let dl = cx.data_layout();

Expand Down Expand Up @@ -1644,7 +1644,7 @@ impl Scalar {
///
/// This is the type alignment for the corresponding built-in.
/// This is *not* necessarily the correct alignment for a type that has this `BackendRepr::Scalar`!
pub fn default_align(self, cx: &impl HasDataLayout) -> AbiAlign {
pub fn default_align(self, cx: &impl HasDataLayout) -> Align {
self.primitive().default_align(cx)
}

Expand Down Expand Up @@ -1957,9 +1957,9 @@ impl BackendRepr {
/// not calculating something from the `Scalar`s.
pub fn scalar_platform_align<C: HasDataLayout>(&self, cx: &C) -> Option<Align> {
match *self {
BackendRepr::Scalar(s) => Some(s.default_align(cx).abi),
BackendRepr::Scalar(s) => Some(s.default_align(cx)),
BackendRepr::ScalarPair { a: s1, b: s2, b_offset: _ } => {
Some(s1.default_align(cx).max(s2.default_align(cx)).abi)
Some(s1.default_align(cx).max(s2.default_align(cx)))
}
// The align of a Vector can vary in surprising ways
BackendRepr::SimdVector { .. }
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_cranelift/src/abi/pass_mode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ impl<'tcx> ArgAbiExt<'tcx> for ArgAbi<'tcx, Ty<'tcx>> {
);
if mode == IndirectMode::OnStack {
// Abi requires aligning struct size to pointer size
let size = self.layout.size.align_to(tcx.data_layout.pointer_align().abi);
let size = self.layout.size.align_to(tcx.data_layout.pointer_align());
let size = u32::try_from(size.bytes()).unwrap();
smallvec![apply_attrs_to_abi_param(
AbiParam::special(pointer_ty(tcx), ArgumentPurpose::StructArgument(size),),
Expand Down
8 changes: 4 additions & 4 deletions compiler/rustc_codegen_llvm/src/consts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@ impl<'ll> CodegenCx<'ll, '_> {
let g = self.define_global(&sym, llty).unwrap_or_else(|| {
bug!("symbol `{}` is already defined", sym);
});
set_global_alignment(self, g, self.tcx.data_layout.pointer_align().abi);
set_global_alignment(self, g, self.tcx.data_layout.pointer_align());
llvm::set_initializer(g, llval);
llvm::set_linkage(g, llvm::Linkage::PrivateLinkage);
llvm::set_section(g, c"__OBJC,__cls_refs,literal_pointers,no_dead_strip");
Expand All @@ -778,7 +778,7 @@ impl<'ll> CodegenCx<'ll, '_> {
let g = self.define_global(&sym, llty).unwrap_or_else(|| {
bug!("symbol `{}` is already defined", sym);
});
set_global_alignment(self, g, self.tcx.data_layout.pointer_align().abi);
set_global_alignment(self, g, self.tcx.data_layout.pointer_align());
llvm::set_initializer(g, llval);
llvm::set_linkage(g, llvm::Linkage::InternalLinkage);
llvm::set_section(g, c"__DATA,__objc_classrefs,regular,no_dead_strip");
Expand Down Expand Up @@ -841,7 +841,7 @@ impl<'ll> CodegenCx<'ll, '_> {
let selref_g = self.define_global(&selref_sym, selref_llty).unwrap_or_else(|| {
bug!("symbol `{}` is already defined", selref_sym);
});
set_global_alignment(self, selref_g, self.tcx.data_layout.pointer_align().abi);
set_global_alignment(self, selref_g, self.tcx.data_layout.pointer_align());
llvm::set_initializer(selref_g, selref_llval);
llvm::set_externally_initialized(selref_g, true);
llvm::set_linkage(
Expand Down Expand Up @@ -897,7 +897,7 @@ impl<'ll> CodegenCx<'ll, '_> {
let g = self.define_global(&sym, llty).unwrap_or_else(|| {
bug!("symbol `{}` is already defined", sym);
});
set_global_alignment(self, g, self.tcx.data_layout.pointer_align().abi);
set_global_alignment(self, g, self.tcx.data_layout.pointer_align());
llvm::set_initializer(g, llval);
llvm::set_linkage(g, llvm::Linkage::PrivateLinkage);
llvm::set_section(g, c"__OBJC,__module_info,regular,no_dead_strip");
Expand Down
8 changes: 3 additions & 5 deletions compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ fn build_pointer_or_reference_di_node<'ll, 'tcx>(
None => {
// This is a thin pointer. Create a regular pointer type and give it the correct name.
assert_eq!(
(pointer_size, pointer_align.abi),
(pointer_size, pointer_align),
cx.size_and_align_of(ptr_type),
"ptr_type={ptr_type}, pointee_type={pointee_type}",
);
Expand All @@ -189,7 +189,7 @@ fn build_pointer_or_reference_di_node<'ll, 'tcx>(
cx,
pointee_type_di_node,
pointer_size,
pointer_align.abi,
pointer_align,
&ptr_type_debuginfo_name,
);

Expand Down Expand Up @@ -326,9 +326,7 @@ fn build_subroutine_type_di_node<'ll, 'tcx>(
let name = compute_debuginfo_type_name(cx.tcx, fn_ty, false);
let (size, align) = match fn_ty.kind() {
ty::FnDef(..) => (Size::ZERO, Align::ONE),
ty::FnPtr(..) => {
(cx.tcx.data_layout.pointer_size(), cx.tcx.data_layout.pointer_align().abi)
}
ty::FnPtr(..) => (cx.tcx.data_layout.pointer_size(), cx.tcx.data_layout.pointer_align()),
_ => unreachable!(),
};
let di_node = create_pointer_type(cx, fn_di_node, size, align, &name);
Expand Down
6 changes: 3 additions & 3 deletions compiler/rustc_codegen_llvm/src/intrinsic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -596,8 +596,8 @@ impl<'ll, 'tcx> IntrinsicCallBuilderMethods<'tcx> for Builder<'_, 'll, 'tcx> {
self.const_bool(true)
} else if use_integer_compare {
let integer_ty = self.type_ix(layout.size().bits());
let a_val = self.load(integer_ty, a, layout.align().abi);
let b_val = self.load(integer_ty, b, layout.align().abi);
let a_val = self.load(integer_ty, a, layout.align());
let b_val = self.load(integer_ty, b, layout.align());
self.icmp(IntPredicate::IntEQ, a_val, b_val)
} else {
let n = self.const_usize(layout.size().bytes());
Expand Down Expand Up @@ -1398,7 +1398,7 @@ fn codegen_msvc_try<'ll, 'tcx>(
//
// More information can be found in libstd's seh.rs implementation.
let ptr_size = bx.tcx().data_layout.pointer_size();
let ptr_align = bx.tcx().data_layout.pointer_align().abi;
let ptr_align = bx.tcx().data_layout.pointer_align();
let slot = bx.alloca(ptr_size, ptr_align);
let try_func_ty = bx.type_func(&[bx.type_ptr()], bx.type_void());
bx.invoke(
Expand Down
Loading
Loading