Skip to content

Rollup of 10 pull requests #144245

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 65 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
6e3b9dd
triagebot welcome message for new users
RalfJung Jul 16, 2025
4e8ce1e
Merge pull request #4471 from RalfJung/triagebot-welcome
oli-obk Jul 16, 2025
b390c41
triagebot: tweak welcome message
RalfJung Jul 16, 2025
6728da5
set S-waiting-on labels on new PRs
RalfJung Jul 16, 2025
5946616
Preparing for merge from rustc
Jul 17, 2025
52db0ce
Merge from rustc
Jul 17, 2025
0131e38
Merge pull request #4473 from rust-lang/rustup-2025-07-17
RalfJung Jul 17, 2025
387b603
allow using different cargo binary
nia-e Jul 16, 2025
1205c53
tweak PR process description
RalfJung Jul 17, 2025
05df8aa
Merge pull request #4470 from nia-e/custom-cargo-bin
RalfJung Jul 17, 2025
e30baec
Merge pull request #4472 from RalfJung/triagebot
oli-obk Jul 17, 2025
60f6ad8
Preparing for merge from rustc
Jul 18, 2025
3e3166f
Merge from rustc
Jul 18, 2025
8339590
Merge pull request #4474 from rust-lang/rustup-2025-07-18
RalfJung Jul 18, 2025
24ea3e2
make native-lib support compile-time-optional, and centralize cfg usage
RalfJung Jul 18, 2025
cc6bc7a
RA config: disable default features for faster build script build
RalfJung Jul 18, 2025
aef3d9e
Merge pull request #4475 from RalfJung/native-lib-optional
RalfJung Jul 18, 2025
a438401
move page protection logic inside native_lib
RalfJung Jul 18, 2025
3799cbd
Merge pull request #4476 from RalfJung/page-prot
RalfJung Jul 18, 2025
d1a146b
tests: Skip supported-crate-types test on musl hosts
Gelbpunkt Jul 18, 2025
b2e94bf
Add test demonstrating current beta `#[align]` name resolution regres…
jieyouxu Jul 17, 2025
69b71e4
Mitigate `#[align]` name resolution ambiguity regression with a rename
jieyouxu Jul 17, 2025
3fb1af3
enzyme submodule update
ZuseZ4 Jul 18, 2025
42d6b0d
make more builder functions generic
ZuseZ4 Jun 18, 2025
6340164
add -Zoffload=Enable flag behind -Zunstable-options, to enable gpu (h…
ZuseZ4 Jun 18, 2025
5958ebe
add various wrappers for gpu code generation
ZuseZ4 Jul 2, 2025
4a1a5a4
gpu host code generation
ZuseZ4 Jul 2, 2025
e2ab312
add gpu offload codegen host side test
ZuseZ4 Jul 18, 2025
c068599
add unstable-books doc for offload
ZuseZ4 Jul 18, 2025
2a03750
debug impls for drop elaborators
beepster4096 Jul 18, 2025
b8bcb4d
Preparing for merge from rustc
Jul 19, 2025
e11ea3d
Merge from rustc
Jul 19, 2025
eef454f
Merge pull request #4478 from rust-lang/rustup-2025-07-19
oli-obk Jul 19, 2025
4aa4376
add -Zmiri-no-extra-rounding-error to specifically disable just that …
RalfJung Jul 19, 2025
1f15460
Merge pull request #4480 from RalfJung/no-extra-rounding-error
oli-obk Jul 19, 2025
c1242b7
cargo update
RalfJung Jul 19, 2025
bb79e79
bump colored dep
RalfJung Jul 19, 2025
4bd8088
bump ipc-channel
RalfJung Jul 19, 2025
0b8f558
bump ui_test
RalfJung Jul 19, 2025
f32ec58
bump cargo-metadata
RalfJung Jul 19, 2025
6ce164d
ditch which dependency
RalfJung Jul 19, 2025
6a67a34
move and update test dependencies
RalfJung Jul 19, 2025
627c031
Merge pull request #4482 from RalfJung/deps
RalfJung Jul 19, 2025
bb46b8c
Allow selecting check tool `Mode` based on `Builder`
Kobzol Jul 11, 2025
245d2c9
Implement `check::Compiletest` using the `tool_check_step` macro
Kobzol Jul 11, 2025
fc74c22
Add approval blocking labels for new bors
Kobzol Jul 19, 2025
329fda0
Preparing for merge from rustc
Jul 20, 2025
c317580
Merge from rustc
Jul 20, 2025
c9f9648
Merge pull request #4485 from rust-lang/rustup-2025-07-20
RalfJung Jul 20, 2025
313dff1
Add test.
cjgillot Jul 4, 2025
7da6fd1
Lower extra lifetimes before normal generic params.
cjgillot Jul 4, 2025
6fd83ea
opt-dist: change build_dir field to be an actual build dir
ognevny Jul 20, 2025
3f9be40
fix handling of base address for TypeId allocations
RalfJung Jul 19, 2025
7bf2dd6
update lockfile
RalfJung Jul 20, 2025
e68f5fe
Implement `check::RustAnalyzer` using the `tool_check_step` macro
Kobzol Jul 11, 2025
f6b5c49
Rollup merge of #142097 - ZuseZ4:offload-host1, r=oli-obk
jieyouxu Jul 21, 2025
54a790d
Rollup merge of #143430 - cjgillot:extra-lifetime-swap, r=oli-obk
jieyouxu Jul 21, 2025
a60b938
Rollup merge of #143816 - Kobzol:compiletest-check-macro, r=jieyouxu
jieyouxu Jul 21, 2025
c5956a9
Rollup merge of #144080 - jieyouxu:realign, r=BoxyUwU
jieyouxu Jul 21, 2025
90dc56f
Rollup merge of #144144 - Gelbpunkt:musl-crate-types-test, r=compiler…
jieyouxu Jul 21, 2025
68ebf69
Rollup merge of #144159 - ognevny:opt-dist-build-dir, r=Kobzol
jieyouxu Jul 21, 2025
3003e5d
Rollup merge of #144162 - beepster4096:drop_elaborator_debug_impls, r…
jieyouxu Jul 21, 2025
f8aee6f
Rollup merge of #144176 - Kobzol:bors-labels-blocking, r=oli-obk
jieyouxu Jul 21, 2025
a5d520e
Rollup merge of #144187 - RalfJung:type-id-base-addr, r=oli-obk
jieyouxu Jul 21, 2025
44bf767
Rollup merge of #144229 - RalfJung:miri-sync, r=RalfJung
jieyouxu Jul 21, 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
159 changes: 108 additions & 51 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ dependencies = [
name = "cargo-miri"
version = "0.1.0"
dependencies = [
"cargo_metadata 0.19.2",
"cargo_metadata 0.21.0",
"directories",
"rustc-build-sysroot",
"rustc_tools_util 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
Expand All @@ -402,14 +402,39 @@ dependencies = [
"serde",
]

[[package]]
name = "cargo-platform"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "84982c6c0ae343635a3a4ee6dedef965513735c8b183caa7289fa6e27399ebd4"
dependencies = [
"serde",
]

[[package]]
name = "cargo-util-schemas"
version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7dc1a6f7b5651af85774ae5a34b4e8be397d9cf4bc063b7e6dbd99a841837830"
dependencies = [
"semver",
"serde",
"serde-untagged",
"serde-value",
"thiserror 2.0.12",
"toml 0.8.23",
"unicode-xid",
"url",
]

[[package]]
name = "cargo_metadata"
version = "0.18.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037"
dependencies = [
"camino",
"cargo-platform",
"cargo-platform 0.1.9",
"semver",
"serde",
"serde_json",
Expand All @@ -423,7 +448,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dd5eb614ed4c27c5d706420e4320fbe3216ab31fa1c33cd8246ac36dae4479ba"
dependencies = [
"camino",
"cargo-platform",
"cargo-platform 0.1.9",
"semver",
"serde",
"serde_json",
"thiserror 2.0.12",
]

[[package]]
name = "cargo_metadata"
version = "0.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5cfca2aaa699835ba88faf58a06342a314a950d2b9686165e038286c30316868"
dependencies = [
"camino",
"cargo-platform 0.2.0",
"cargo-util-schemas",
"semver",
"serde",
"serde_json",
Expand Down Expand Up @@ -561,7 +601,7 @@ dependencies = [
"tempfile",
"termize",
"toml 0.7.8",
"ui_test 0.30.2",
"ui_test",
"walkdir",
]

Expand Down Expand Up @@ -703,6 +743,15 @@ dependencies = [
"windows-sys 0.59.0",
]

[[package]]
name = "colored"
version = "3.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fde0e0ec90c9dfb3b4b1a0891a7dcd0e2bffde2f7efed5fe7c9bb00e5bfb915e"
dependencies = [
"windows-sys 0.59.0",
]

[[package]]
name = "comma"
version = "1.0.0"
Expand All @@ -716,7 +765,7 @@ dependencies = [
"anstyle-svg",
"build_helper",
"camino",
"colored",
"colored 2.2.0",
"diff",
"getopts",
"glob",
Expand Down Expand Up @@ -1143,6 +1192,16 @@ version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"

[[package]]
name = "erased-serde"
version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e004d887f51fcb9fef17317a2f3525c887d8aa3f4f50fed920816a688284a5b7"
dependencies = [
"serde",
"typeid",
]

[[package]]
name = "errno"
version = "0.3.13"
Expand Down Expand Up @@ -1831,17 +1890,16 @@ dependencies = [

[[package]]
name = "ipc-channel"
version = "0.19.0"
version = "0.20.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6fb8251fb7bcd9ccd3725ed8deae9fe7db8e586495c9eb5b0c52e6233e5e75ea"
checksum = "5b1c98b70019c830a1fc39cecfe1f60ff99c4122f0a189697c810c90ec545c14"
dependencies = [
"bincode",
"crossbeam-channel",
"fnv",
"lazy_static",
"libc",
"mio",
"rand 0.8.5",
"rand 0.9.1",
"serde",
"tempfile",
"uuid",
Expand Down Expand Up @@ -2240,7 +2298,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c"
dependencies = [
"libc",
"log",
"wasi 0.11.1+wasi-snapshot-preview1",
"windows-sys 0.59.0",
]
Expand All @@ -2263,7 +2320,7 @@ dependencies = [
"capstone",
"chrono",
"chrono-tz",
"colored",
"colored 3.0.0",
"directories",
"getrandom 0.3.3",
"ipc-channel",
Expand All @@ -2280,7 +2337,7 @@ dependencies = [
"smallvec",
"tempfile",
"tikv-jemalloc-sys",
"ui_test 0.29.2",
"ui_test",
]

[[package]]
Expand Down Expand Up @@ -2560,6 +2617,15 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d"

[[package]]
name = "ordered-float"
version = "2.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "68f19d67e5a2795c94e73e0bb1cc1a7edeb2e28efd39e2e1c9b7a40c1108b11c"
dependencies = [
"num-traits",
]

[[package]]
name = "overload"
version = "0.1.1"
Expand Down Expand Up @@ -4845,6 +4911,27 @@ dependencies = [
"serde_derive",
]

[[package]]
name = "serde-untagged"
version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "299d9c19d7d466db4ab10addd5703e4c615dec2a5a16dbbafe191045e87ee66e"
dependencies = [
"erased-serde",
"serde",
"typeid",
]

[[package]]
name = "serde-value"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f3a1a3341211875ef120e117ea7fd5228530ae7e7036a779fdc9117be6b3282c"
dependencies = [
"ordered-float",
"serde",
]

[[package]]
name = "serde_derive"
version = "1.0.219"
Expand Down Expand Up @@ -4942,16 +5029,6 @@ dependencies = [
"windows-sys 0.52.0",
]

[[package]]
name = "spanned"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "86af297923fbcfd107c20a189a6e9c872160df71a7190ae4a7a6c5dce4b2feb6"
dependencies = [
"bstr",
"color-eyre",
]

[[package]]
name = "spanned"
version = "0.4.1"
Expand Down Expand Up @@ -5529,6 +5606,12 @@ dependencies = [
"rustc-hash 2.1.1",
]

[[package]]
name = "typeid"
version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c"

[[package]]
name = "typenum"
version = "1.18.0"
Expand All @@ -5550,32 +5633,6 @@ version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971"

[[package]]
name = "ui_test"
version = "0.29.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1211b1111c752c73b33073d2958072be08825fd97c9ab4d83444da361a06634b"
dependencies = [
"annotate-snippets 0.11.5",
"anyhow",
"bstr",
"cargo-platform",
"cargo_metadata 0.18.1",
"color-eyre",
"colored",
"comma",
"crossbeam-channel",
"indicatif",
"levenshtein",
"prettydiff",
"regex",
"rustc_version",
"rustfix",
"serde",
"serde_json",
"spanned 0.3.0",
]

[[package]]
name = "ui_test"
version = "0.30.2"
Expand All @@ -5585,10 +5642,10 @@ dependencies = [
"annotate-snippets 0.11.5",
"anyhow",
"bstr",
"cargo-platform",
"cargo-platform 0.1.9",
"cargo_metadata 0.18.1",
"color-eyre",
"colored",
"colored 2.2.0",
"comma",
"crossbeam-channel",
"indicatif",
Expand All @@ -5599,7 +5656,7 @@ dependencies = [
"rustfix",
"serde",
"serde_json",
"spanned 0.4.1",
"spanned",
]

[[package]]
Expand Down
29 changes: 18 additions & 11 deletions compiler/rustc_ast_lowering/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -874,25 +874,32 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
/// name resolver owing to lifetime elision; this also populates the resolver's node-id->def-id
/// map, so that later calls to `opt_node_id_to_def_id` that refer to these extra lifetime
/// parameters will be successful.
#[instrument(level = "debug", skip(self))]
#[instrument(level = "debug", skip(self), ret)]
#[inline]
fn lower_lifetime_binder(
&mut self,
binder: NodeId,
generic_params: &[GenericParam],
) -> &'hir [hir::GenericParam<'hir>] {
let mut generic_params: Vec<_> = self
.lower_generic_params_mut(generic_params, hir::GenericParamSource::Binder)
.collect();
// Start by creating params for extra lifetimes params, as this creates the definitions
// that may be referred to by the AST inside `generic_params`.
let extra_lifetimes = self.resolver.extra_lifetime_params(binder);
debug!(?extra_lifetimes);
generic_params.extend(extra_lifetimes.into_iter().filter_map(|(ident, node_id, res)| {
self.lifetime_res_to_generic_param(ident, node_id, res, hir::GenericParamSource::Binder)
}));
let generic_params = self.arena.alloc_from_iter(generic_params);
debug!(?generic_params);

generic_params
let extra_lifetimes: Vec<_> = extra_lifetimes
.into_iter()
.filter_map(|(ident, node_id, res)| {
self.lifetime_res_to_generic_param(
ident,
node_id,
res,
hir::GenericParamSource::Binder,
)
})
.collect();
let arena = self.arena;
let explicit_generic_params =
self.lower_generic_params_mut(generic_params, hir::GenericParamSource::Binder);
arena.alloc_from_iter(explicit_generic_params.chain(extra_lifetimes.into_iter()))
}

fn with_dyn_type_scope<T>(&mut self, in_scope: bool, f: impl FnOnce(&mut Self) -> T) -> T {
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_attr_data_structures/src/attributes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ pub enum CfgEntry {
pub enum AttributeKind {
// tidy-alphabetical-start
/// Represents `#[align(N)]`.
// FIXME(#82232, #143834): temporarily renamed to mitigate `#[align]` nameres ambiguity
Align { align: Align, span: Span },

/// Represents `#[rustc_allow_const_fn_unstable]`.
Expand Down
3 changes: 2 additions & 1 deletion compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@ impl<S: Stage> AttributeParser<S> for NakedParser {
sym::instruction_set,
sym::repr,
sym::rustc_std_internal_symbol,
sym::align,
// FIXME(#82232, #143834): temporarily renamed to mitigate `#[align]` nameres ambiguity
sym::rustc_align,
// obviously compatible with self
sym::naked,
// documentation
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_attr_parsing/src/attributes/repr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ fn parse_alignment(node: &LitKind) -> Result<Align, &'static str> {
pub(crate) struct AlignParser(Option<(Align, Span)>);

impl AlignParser {
const PATH: &'static [Symbol] = &[sym::align];
const PATH: &'static [Symbol] = &[sym::rustc_align];
const TEMPLATE: AttributeTemplate = template!(List: "<alignment in bytes>");

fn parse<'c, S: Stage>(
Expand Down
7 changes: 7 additions & 0 deletions compiler/rustc_codegen_llvm/src/back/lto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,7 @@ pub(crate) fn run_pass_manager(
// We then run the llvm_optimize function a second time, to optimize the code which we generated
// in the enzyme differentiation pass.
let enable_ad = config.autodiff.contains(&config::AutoDiff::Enable);
let enable_gpu = config.offload.contains(&config::Offload::Enable);
let stage = if thin {
write::AutodiffStage::PreAD
} else {
Expand All @@ -668,6 +669,12 @@ pub(crate) fn run_pass_manager(
write::llvm_optimize(cgcx, dcx, module, None, config, opt_level, opt_stage, stage)?;
}

if enable_gpu && !thin {
let cx =
SimpleCx::new(module.module_llvm.llmod(), &module.module_llvm.llcx, cgcx.pointer_size);
crate::builder::gpu_offload::handle_gpu_code(cgcx, &cx);
}

if cfg!(llvm_enzyme) && enable_ad && !thin {
let cx =
SimpleCx::new(module.module_llvm.llmod(), &module.module_llvm.llcx, cgcx.pointer_size);
Expand Down
Loading