Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
1acfdbb
Make `ValTree` recurse through `ty::Const`
BoxyUwU Nov 19, 2025
50ef284
Fix tools
BoxyUwU Nov 19, 2025
4e375db
Merge commit '6f3f6bdacb75571a87f08e0920d9c191b3d65ded' into sync_cg_…
bjorn3 Dec 23, 2025
fcdea4d
Auto merge of #149114 - BoxyUwU:mgca_adt_exprs, r=lcnr
bors Dec 23, 2025
6da1048
Fix some divergences with the cg_clif subtree
bjorn3 Dec 24, 2025
b908e2e
Sync from rust fcd630976c460c819c4bbcaf107d0c94501205d8
bjorn3 Jan 2, 2026
9c369a4
Rustup to rustc 1.94.0-nightly (fcd630976 2026-01-01)
bjorn3 Jan 2, 2026
0cba97b
Finish transition from `semitransparent` to `semiopaque` for `rustc_m…
Enselic Jan 1, 2026
b86553f
Stabilize `alloc_layout_extra`
GrigorenkoPV Nov 9, 2025
c1569cc
Lower extern "rust-cold" to default calling convention
bjorn3 Jan 11, 2026
4d0b725
Add a gdb helper for jit backtraces
bjorn3 Jan 11, 2026
a03e769
Improve standard library source remapping
bjorn3 Jan 11, 2026
c713538
x86: support passing `u128`/`i128` to inline assembly
folkertdev Jan 13, 2026
94d5977
Sync from rust 2850ca8295bc253186b291314ddc239632755475
bjorn3 Jan 14, 2026
0b05e69
Rustup to rustc 1.94.0-nightly (2850ca829 2026-01-13)
bjorn3 Jan 14, 2026
e4e41b7
Use -Zno-embed-metadata for the codegen backend and sysroot
bjorn3 Jan 14, 2026
4d4fb27
Pass -Zbinary-dep-depinfo when testing rustc tests
bjorn3 Jan 17, 2026
fd97bb6
Rustup to rustc 1.94.0-nightly (f6a07efc8 2026-01-16)
bjorn3 Jan 17, 2026
ef9002c
add `simd_splat` intrinsic
folkertdev Jan 18, 2026
9949a53
Remove all allows for `diagnostic_outside_of_impl` and `untranslatabl…
JonathanBrouwer Jan 9, 2026
0b71ff6
`c_variadic`: use `Clone` instead of LLVM `va_copy`
folkertdev Dec 27, 2025
63c439f
Rollup merge of #150436 - va-list-copy, r=workingjubilee,RalfJung
jhpratt Jan 21, 2026
d43ca00
Sync from rust 5c49c4f7c8393c861b849441d27f5d40e0f1e33b
bjorn3 Jan 21, 2026
7b8c532
Rustup to rustc 1.95.0-nightly (5c49c4f7c 2026-01-20)
bjorn3 Jan 21, 2026
fe61cd6
Support debuginfo for assoc const bindings
fmease Jan 20, 2026
41b7226
Fix CI disk space issue for abi-cafe tests (#1625)
pantha704 Jan 24, 2026
11d0889
abi: add a rust-preserve-none calling convention
nagisa Jan 13, 2026
04db0fb
Rollup merge of #151346 - folkertdev:simd-splat, r=workingjubilee
matthiaskrgr Jan 24, 2026
156bce9
Auto merge of #151065 - nagisa:add-preserve-none-abi, r=petrochenkov
bors Jan 25, 2026
3a3e5f5
Sync from rust 873d4682c7d285540b8f28bfe637006cef8918a6
bjorn3 Jan 26, 2026
82fc4ec
Rustup to rustc 1.95.0-nightly (873d4682c 2026-01-25)
bjorn3 Jan 26, 2026
2859fde
Fix rustc test suite
bjorn3 Jan 26, 2026
c73f662
Rustup to rustc 1.95.0-nightly (474276961 2026-01-26)
bjorn3 Jan 27, 2026
20e7d31
Re-enable a couple of rustc tests
bjorn3 Jan 27, 2026
cf9e94c
Move some rustc test disables around
bjorn3 Jan 27, 2026
0ad8260
Update a couple of dependencies
bjorn3 Jan 27, 2026
a257fb9
Fix ICE in transmutability error reporting when type aliases are norm…
zedddie Jan 25, 2026
b871f6c
Fix running rustc tests in CI
bjorn3 Feb 3, 2026
3318d22
Convert to inline diagnostics in all codegen backends
bjorn3 Feb 4, 2026
47b2f23
Update to Cranelift 0.128
bjorn3 Feb 3, 2026
99147c1
Use cg_ssa's produce_final_output_artifacts in cg_clif
bjorn3 Feb 11, 2026
81cb2a9
Remove unused features in compiler
mu001999 Feb 7, 2026
94db326
Remove unnecessary closure.
nnethercote Feb 13, 2026
33e6037
Sync from rust 47611e16044c68ef27bac31c35fda2ba1dc20b73
bjorn3 Feb 13, 2026
47f2bf6
Rustup to rustc 1.95.0-nightly (47611e160 2026-02-12)
bjorn3 Feb 13, 2026
0b47779
Fix rustc test suite
bjorn3 Feb 13, 2026
15831dd
move `escape_symbol_name` to `cg_ssa`
usamoi Feb 13, 2026
b9ce2e4
Rollup merge of #152469 - mu001999-contrib:cleanup/unused-features, r…
JonathanBrouwer Feb 13, 2026
0eca6c0
Rollup merge of #152573 - usamoi:escape-2, r=bjorn3
jhpratt Feb 14, 2026
1e367f9
tests: rustc_public: Check const allocation for all variables (1 of 1…
Enselic Feb 14, 2026
5868ac6
unify and deduplicate floats
xonx4l Oct 28, 2025
b28ebc8
clif: Only set has_reliable_f128_math with glibc
tgross35 Jan 31, 2026
66d6f55
Sync from rust 873b4beb0cc726493b94c8ef21f68795c04fbbc1
bjorn3 Feb 16, 2026
417cc11
Rustup to rustc 1.95.0-nightly (873b4beb0 2026-02-15)
bjorn3 Feb 16, 2026
e028e78
Re-enable fixed rustc test
bjorn3 Feb 16, 2026
c259c40
compiletest: normalize stderr before SVG rendering
scrabsha Feb 14, 2026
db5ed68
add write_box_via_move intrinsic and use it for vec!
RalfJung Oct 26, 2025
cb30787
Auto merge of #148190 - RalfJung:box_new, r=RalfJung
bors Feb 16, 2026
66c85df
actions: bump rustsec/audit-check to v2 (#1627)
xtqqczze Feb 16, 2026
d54a023
[cg_clif]: Fix codegen of f128 to i128 casts
okaneco Feb 12, 2026
46c90c5
Rollup merge of #152512 - okaneco:exact_integer, r=tgross35
Zalathar Feb 17, 2026
cef9cfe
Sync from rust 3c9faa0d037b9eecda4a440cc482ff7f960fb8a5
bjorn3 Feb 17, 2026
7964c1b
Rustup to rustc 1.95.0-nightly (3c9faa0d0 2026-02-16)
bjorn3 Feb 17, 2026
224eef6
Fix rustc test suite
bjorn3 Feb 17, 2026
6d0aca4
Simplify bootstrap patches
bjorn3 Feb 17, 2026
4deff63
std::r#try! - avoid link to nightly docs
DanielEScherzer Feb 17, 2026
1f8a48a
Remove some clones in deriving
camsteffen Feb 18, 2026
7585786
Add a mir-opt test for alignment check generation
scottmcm Feb 15, 2026
39edaca
Fix incorrect target
Zelzahn Feb 18, 2026
fb94e58
Fix an ICE while checking param env shadowing on an erroneous trait impl
ShoyuVanilla Feb 18, 2026
92e60a3
Do no add -no-pie on Windows
mati865 Feb 18, 2026
e62bc63
Stop using rustc_layout_scalar_valid_range_* in rustc
oli-obk Feb 13, 2026
d5574c5
modify around --ci flag in bootstrap
Shunpoco Feb 17, 2026
173d38e
Sync from rust 8387095803f21a256a9a772ac1f9b41ed4d5aa0a
bjorn3 Feb 18, 2026
abdb98a
Rustup to rustc 1.95.0-nightly (838709580 2026-02-17)
bjorn3 Feb 18, 2026
87ba622
Merge commit 'abdb98ad4b47117ee3be17b1e43fab34f18f5805' into sync_cg_…
bjorn3 Feb 18, 2026
fb63550
Fix broken merge
bjorn3 Feb 18, 2026
14b7c82
Format jit-helper.py
bjorn3 Feb 18, 2026
7287be9
Implement reflection support for function pointer types and add tests
Feb 18, 2026
76e4bc5
Rollup merge of #152799 - bjorn3:sync_cg_clif-2026-02-18, r=bjorn3
JonathanBrouwer Feb 18, 2026
d8a4706
Rollup merge of #152569 - oli-obk:rustc_layout_scalar_valid_range_end…
JonathanBrouwer Feb 18, 2026
0bbe377
Rollup merge of #151059 - folkertdev:x86-u128-reg, r=Amanieu
JonathanBrouwer Feb 18, 2026
2be6c31
Rollup merge of #152734 - Shunpoco:cleanup-bootstrap-ci, r=Kobzol
JonathanBrouwer Feb 18, 2026
ca36365
Rollup merge of #151703 - zedddie:fix-151462-ice, r=jdonszelmann
JonathanBrouwer Feb 18, 2026
66bbec0
Rollup merge of #152173 - 9SonSteroids:fn_ptr_type_info, r=oli-obk
JonathanBrouwer Feb 18, 2026
cb2f49c
Rollup merge of #152564 - nnethercote:rm-closure-gcx, r=adwinwhite
JonathanBrouwer Feb 18, 2026
3cb8617
Rollup merge of #152628 - Enselic:ptr-const-allocation, r=jieyouxu
JonathanBrouwer Feb 18, 2026
e5d0106
Rollup merge of #152658 - scrabsha:normalize-before-svg, r=jieyouxu
JonathanBrouwer Feb 18, 2026
0d3e441
Rollup merge of #152766 - DanielEScherzer:patch-1, r=joboet
JonathanBrouwer Feb 18, 2026
c626a97
Rollup merge of #152780 - camsteffen:less-clone, r=Kivooeo
JonathanBrouwer Feb 18, 2026
036b0f5
Rollup merge of #152787 - scottmcm:alignment-checks-test, r=jieyouxu
JonathanBrouwer Feb 18, 2026
b62c6d0
Rollup merge of #152790 - Zelzahn:patch-1, r=jieyouxu
JonathanBrouwer Feb 18, 2026
33aea4c
Rollup merge of #152792 - ShoyuVanilla:issue-152663, r=petrochenkov
JonathanBrouwer Feb 18, 2026
deb4fd0
Rollup merge of #152793 - mati865:disable-no-pie-on-windows, r=petroc…
JonathanBrouwer Feb 18, 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
4 changes: 2 additions & 2 deletions compiler/rustc_abi/src/layout/ty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ rustc_index::newtype_index! {
/// `b` is `FieldIdx(1)` in `VariantIdx(0)`,
/// `d` is `FieldIdx(1)` in `VariantIdx(1)`, and
/// `f` is `FieldIdx(1)` in `VariantIdx(0)`.
#[derive(HashStable_Generic)]
#[stable_hash_generic]
#[encodable]
#[orderable]
pub struct FieldIdx {}
Expand All @@ -57,7 +57,7 @@ rustc_index::newtype_index! {
///
/// `struct`s, `tuples`, and `unions`s are considered to have a single variant
/// with variant index zero, aka [`FIRST_VARIANT`].
#[derive(HashStable_Generic)]
#[stable_hash_generic]
#[encodable]
#[orderable]
pub struct VariantIdx {
Expand Down
8 changes: 4 additions & 4 deletions compiler/rustc_builtin_macros/src/deriving/default.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ fn default_struct_substructure(
cx: &ExtCtxt<'_>,
trait_span: Span,
substr: &Substructure<'_>,
summary: &StaticFields,
summary: &StaticFields<'_>,
) -> BlockOrExpr {
let expr = match summary {
Unnamed(_, IsTuple::No) => cx.expr_ident(trait_span, substr.type_ident),
Expand All @@ -78,16 +78,16 @@ fn default_struct_substructure(
Named(fields) => {
let default_fields = fields
.iter()
.map(|(ident, span, default_val)| {
.map(|&(ident, span, default_val)| {
let value = match default_val {
// We use `Default::default()`.
None => default_call(cx, *span),
None => default_call(cx, span),
// We use the field default const expression.
Some(val) => {
cx.expr(val.value.span, ast::ExprKind::ConstBlock(val.clone()))
}
};
cx.field_imm(*span, *ident, value)
cx.field_imm(span, ident, value)
})
.collect();
cx.expr_struct_ident(trait_span, substr.type_ident, default_fields)
Expand Down
31 changes: 16 additions & 15 deletions compiler/rustc_builtin_macros/src/deriving/generic/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -303,11 +303,11 @@ pub(crate) enum IsTuple {
}

/// Fields for a static method
pub(crate) enum StaticFields {
pub(crate) enum StaticFields<'a> {
/// Tuple and unit structs/enum variants like this.
Unnamed(Vec<Span>, IsTuple),
/// Normal structs/struct variants.
Named(Vec<(Ident, Span, Option<AnonConst>)>),
Named(Vec<(Ident, Span, Option<&'a AnonConst>)>),
}

/// A summary of the possible sets of fields.
Expand All @@ -331,7 +331,7 @@ pub(crate) enum SubstructureFields<'a> {
EnumDiscr(FieldInfo, Option<Box<Expr>>),

/// A static method where `Self` is a struct.
StaticStruct(&'a ast::VariantData, StaticFields),
StaticStruct(&'a ast::VariantData, StaticFields<'a>),

/// A static method where `Self` is an enum.
StaticEnum(&'a ast::EnumDef),
Expand Down Expand Up @@ -596,7 +596,7 @@ impl<'a> TraitDef<'a> {
cx: &ExtCtxt<'_>,
type_ident: Ident,
generics: &Generics,
field_tys: Vec<Box<ast::Ty>>,
field_tys: Vec<&ast::Ty>,
methods: Vec<Box<ast::AssocItem>>,
is_packed: bool,
) -> Box<ast::Item> {
Expand Down Expand Up @@ -870,8 +870,7 @@ impl<'a> TraitDef<'a> {
from_scratch: bool,
is_packed: bool,
) -> Box<ast::Item> {
let field_tys: Vec<Box<ast::Ty>> =
struct_def.fields().iter().map(|field| field.ty.clone()).collect();
let field_tys = Vec::from_iter(struct_def.fields().iter().map(|field| &*field.ty));

let methods = self
.methods
Expand Down Expand Up @@ -923,11 +922,13 @@ impl<'a> TraitDef<'a> {
generics: &Generics,
from_scratch: bool,
) -> Box<ast::Item> {
let mut field_tys = Vec::new();

for variant in &enum_def.variants {
field_tys.extend(variant.data.fields().iter().map(|field| field.ty.clone()));
}
let field_tys = Vec::from_iter(
enum_def
.variants
.iter()
.flat_map(|variant| variant.data.fields())
.map(|field| &*field.ty),
);

let methods = self
.methods
Expand Down Expand Up @@ -1160,8 +1161,8 @@ impl<'a> MethodDef<'a> {
fn expand_static_struct_method_body(
&self,
cx: &ExtCtxt<'_>,
trait_: &TraitDef<'_>,
struct_def: &VariantData,
trait_: &TraitDef<'a>,
struct_def: &'a VariantData,
type_ident: Ident,
nonselflike_args: &[Box<Expr>],
) -> BlockOrExpr {
Expand Down Expand Up @@ -1480,13 +1481,13 @@ impl<'a> MethodDef<'a> {

// general helper methods.
impl<'a> TraitDef<'a> {
fn summarise_struct(&self, cx: &ExtCtxt<'_>, struct_def: &VariantData) -> StaticFields {
fn summarise_struct(&self, cx: &ExtCtxt<'_>, struct_def: &'a VariantData) -> StaticFields<'a> {
let mut named_idents = Vec::new();
let mut just_spans = Vec::new();
for field in struct_def.fields() {
let sp = field.span.with_ctxt(self.span.ctxt());
match field.ident {
Some(ident) => named_idents.push((ident, sp, field.default.clone())),
Some(ident) => named_idents.push((ident, sp, field.default.as_ref())),
_ => just_spans.push(sp),
}
}
Expand Down
259 changes: 259 additions & 0 deletions compiler/rustc_codegen_cranelift/.github/scripts/free-disk-space.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,259 @@
#!/bin/bash
# Ported from rust-lang/rust commit d29e4783dff30f9526eeba3929ebfe86c00c9dad in src/ci/scripts/free-disk-space-linux.sh
set -euo pipefail

# Script inspired by https://github.com/jlumbroso/free-disk-space
isX86() {
local arch
arch=$(uname -m)
if [ "$arch" = "x86_64" ]; then
return 0
else
return 1
fi
}

# In aws codebuild, the variable RUNNER_ENVIRONMENT is "self-hosted".
isGitHubRunner() {
# `:-` means "use the value of RUNNER_ENVIRONMENT if it exists, otherwise use an empty string".
if [[ "${RUNNER_ENVIRONMENT:-}" == "github-hosted" ]]; then
return 0
else
return 1
fi
}

# print a line of the specified character
printSeparationLine() {
for ((i = 0; i < 80; i++)); do
printf "%s" "$1"
done
printf "\n"
}

# REF: https://stackoverflow.com/a/450821/408734
getAvailableSpace() {
df -a | awk 'NR > 1 {avail+=$4} END {print avail}'
}

# REF: https://unix.stackexchange.com/a/44087/60849
formatByteCount() {
numfmt --to=iec-i --suffix=B --padding=7 "${1}000"
}

# macro to output saved space
printSavedSpace() {
# Disk space before the operation
local before=${1}
local title=${2:-}

local after
after=$(getAvailableSpace)
local saved=$((after - before))

if [ "$saved" -lt 0 ]; then
echo "::warning::Saved space is negative: $saved. Using '0' as saved space."
saved=0
fi

echo ""
printSeparationLine "*"
if [ -n "${title}" ]; then
echo "=> ${title}: Saved $(formatByteCount "$saved")"
else
echo "=> Saved $(formatByteCount "$saved")"
fi
printSeparationLine "*"
echo ""
}

# macro to print output of df with caption
printDF() {
local caption=${1}

printSeparationLine "="
echo "${caption}"
echo ""
echo "$ df -h"
echo ""
df -h
printSeparationLine "="
}

removeUnusedFilesAndDirs() {
local to_remove=(
"/usr/share/java"
)

if isGitHubRunner; then
to_remove+=(
"/usr/local/aws-sam-cli"
"/usr/local/doc/cmake"
"/usr/local/julia"*
"/usr/local/lib/android"
"/usr/local/share/chromedriver-"*
"/usr/local/share/chromium"
"/usr/local/share/cmake-"*
"/usr/local/share/edge_driver"
"/usr/local/share/emacs"
"/usr/local/share/gecko_driver"
"/usr/local/share/icons"
"/usr/local/share/powershell"
"/usr/local/share/vcpkg"
"/usr/local/share/vim"
"/usr/share/apache-maven-"*
"/usr/share/gradle-"*
"/usr/share/kotlinc"
"/usr/share/miniconda"
"/usr/share/php"
"/usr/share/ri"
"/usr/share/swift"

# binaries
"/usr/local/bin/azcopy"
"/usr/local/bin/bicep"
"/usr/local/bin/ccmake"
"/usr/local/bin/cmake-"*
"/usr/local/bin/cmake"
"/usr/local/bin/cpack"
"/usr/local/bin/ctest"
"/usr/local/bin/helm"
"/usr/local/bin/kind"
"/usr/local/bin/kustomize"
"/usr/local/bin/minikube"
"/usr/local/bin/packer"
"/usr/local/bin/phpunit"
"/usr/local/bin/pulumi-"*
"/usr/local/bin/pulumi"
"/usr/local/bin/stack"

# Haskell runtime
"/usr/local/.ghcup"

# Azure
"/opt/az"
"/usr/share/az_"*
)

if [ -n "${AGENT_TOOLSDIRECTORY:-}" ]; then
# Environment variable set by GitHub Actions
to_remove+=(
"${AGENT_TOOLSDIRECTORY}"
)
else
echo "::warning::AGENT_TOOLSDIRECTORY is not set. Skipping removal."
fi
else
# Remove folders and files present in AWS CodeBuild
to_remove+=(
# binaries
"/usr/local/bin/ecs-cli"
"/usr/local/bin/eksctl"
"/usr/local/bin/kubectl"

"${HOME}/.gradle"
"${HOME}/.dotnet"
"${HOME}/.goenv"
"${HOME}/.phpenv"

)
fi

for element in "${to_remove[@]}"; do
if [ ! -e "$element" ]; then
# The file or directory doesn't exist.
# Maybe it was removed in a newer version of the runner or it's not present in a
# specific architecture (e.g. ARM).
echo "::warning::Directory or file $element does not exist, skipping."
fi
done

# Remove all files and directories at once to save time.
sudo rm -rf "${to_remove[@]}"
}

execAndMeasureSpaceChange() {
local operation=${1} # Function to execute
local title=${2}

local before
before=$(getAvailableSpace)
$operation

printSavedSpace "$before" "$title"
}

# REF: https://github.com/apache/flink/blob/master/tools/azure-pipelines/free_disk_space.sh
cleanPackages() {
local packages=(
'^aspnetcore-.*'
'^dotnet-.*'
'^llvm-.*'
'^mongodb-.*'
'firefox'
'libgl1-mesa-dri'
'mono-devel'
'php.*'
)

if isGitHubRunner; then
packages+=(
azure-cli
)

if isX86; then
packages+=(
'google-chrome-stable'
'google-cloud-cli'
'google-cloud-sdk'
'powershell'
)
fi
else
packages+=(
'google-chrome-stable'
)
fi

WAIT_DPKG_LOCK="-o DPkg::Lock::Timeout=60"
sudo apt-get ${WAIT_DPKG_LOCK} -qq remove -y --fix-missing "${packages[@]}"

sudo apt-get ${WAIT_DPKG_LOCK} autoremove -y \
|| echo "::warning::The command [sudo apt-get autoremove -y] failed"
sudo apt-get ${WAIT_DPKG_LOCK} clean \
|| echo "::warning::The command [sudo apt-get clean] failed"
}

# They aren't present in ubuntu 24 runners.
cleanDocker() {
echo "=> Removing the following docker images:"
sudo docker image ls
echo "=> Removing docker images..."
sudo docker image prune --all --force || true
}

# Remove Swap storage
cleanSwap() {
sudo swapoff -a || true
sudo rm -rf /mnt/swapfile || true
free -h
}

# Display initial disk space stats
AVAILABLE_INITIAL=$(getAvailableSpace)

printDF "BEFORE CLEAN-UP:"
echo ""
execAndMeasureSpaceChange cleanPackages "Unused packages"
execAndMeasureSpaceChange cleanDocker "Docker images"
execAndMeasureSpaceChange cleanSwap "Swap storage"
execAndMeasureSpaceChange removeUnusedFilesAndDirs "Unused files and directories"

# Output saved space statistic
echo ""
printDF "AFTER CLEAN-UP:"

echo ""
echo ""

printSavedSpace "$AVAILABLE_INITIAL" "Total saved"
Loading
Loading