Commit graph

308340 commits

Author SHA1 Message Date
Stuart Cook
ff86a7db83
Rollup merge of #147309 - alexcrichton:wasm-unwinding-docs, r=jieyouxu
Add documentation about unwinding to wasm targets

This commit adds some documentation about the state of `-Cpanic=unwind` for the following wasm targets:

* `wasm32-unknown-unknown`
* `wasm32-wasip1`
* `wasm32-wasip2`
* `wasm32v1-none`

Notably it's possible to use `-Cpanic=unwind` with `-Zbuild-std` and it's also mentioned that there are no concrete proposals at this time to adding a new set of targets which support unwinding. My hunch is that in a few years' time it would make sense to enable it by default on these targets (except for `wasm32v1-none`) but that's a problem for future folks to debate. For now this is an attempt to document the status quo.
2025-10-05 15:35:02 +11:00
Stuart Cook
59982f9a29
Rollup merge of #147288 - Zalathar:directive, r=jieyouxu
compiletest: Make `DirectiveLine` responsible for name/value splitting

- Follow-up to rust-lang/rust#147170.

---

Now that all of the directive-parsing functions have access to a `DirectiveLine`, we can move all of the ad-hoc name/value splitting code into `DirectiveLine` itself, making directive parsing simpler and more consistent.

The first commit is just moving code into a submodule, so the actual changes can be seen in the subsequent commits.

r? jieyouxu
2025-10-05 15:35:02 +11:00
Manuel Drehwald
a175921d5e update libEnzyme file name, and add missing strict-aliasing flag 2025-10-04 23:52:33 -04:00
yukang
34ad919858 Remove extra space for missing associated type term 2025-10-05 11:11:47 +08:00
Zalathar
33c99a0468 Use new DirectiveLine features in directive parsing 2025-10-05 10:47:21 +11:00
Zalathar
6783e9465b Allow easy extraction of name/value from a DirectiveLine 2025-10-05 10:47:21 +11:00
Zalathar
757d98ce2b Move DirectiveLine into its own submodule 2025-10-05 10:47:19 +11:00
Tshepang Mbambo
5a38eb1ba8 a consistency fix
Others in the file skip the module name
2025-10-05 00:00:16 +02:00
bors
227ac7c3cd Auto merge of #147293 - nnethercote:avoid-dep_dep_node, r=saethlin
Avoid getting `dep_dep_node` unnecessarily.

It's gotten on a hot path but only for use within `debug!`.

r? `@saethlin`
2025-10-04 21:23:46 +00:00
Ben Kimock
b5fb01d67d Improve the advice given by panic_immediate_abort 2025-10-04 15:53:00 -04:00
Ada Alakbarova
b249f13423
feat: also detect non-consts 2025-10-04 21:46:39 +02:00
Ada Alakbarova
4423e05f25
fix: print actual consts when shifting by them
this is kind of a side-effect of the next commit
2025-10-04 21:40:43 +02:00
Ada Alakbarova
c9ee445abd
extract the constant codepath
switch around `*_amount` and `*_expr` -- otherwise the order gets
confusing now because of both of them being `Expr`s
2025-10-04 21:40:43 +02:00
Ada Alakbarova
8e3315f292
misc: extend let-chain 2025-10-04 21:35:01 +02:00
Cameron Steffen
f0eea4cc4f LifetimeSyntax little things 2025-10-04 13:41:49 -05:00
Cameron Steffen
ba5a42b48b LifetimeSyntax tweak data structure 2025-10-04 13:41:49 -05:00
Cameron Steffen
c915c989f6 Eagerly evaluate lifetime syntax category 2025-10-04 13:41:49 -05:00
Cameron Steffen
775b893b5c Use ty reference 2025-10-04 13:40:44 -05:00
Cameron Steffen
0ea65e0bcd Break out some parsing cold functions
This recovers some instruction count regressions after changing most Pat
parsing functions return a non-boxed Pat. It seems to be beneficial to
break out a #[cold] parsing recovery function when the function includes
more parsing, presumably because this requires more stack space and/or
mem copies when LLVM optimizes the wrong path.
2025-10-04 13:21:37 -05:00
Kivooeo
67bc030833 change flt back to ftl 2025-10-04 18:18:58 +00:00
Samuel Tardieu
d289009eea
Const eval changes (#15773)
First commit treats all constants containing a macro call as non-local
and renames `eval_simple` to be a little clearer.

Second commit removes `CoreConstant` and treats most of them as though
they were local. A couple of the constants like `usize::MAX` are treated
as non-local as different targets may have different values.
`const_is_empty` will now ignore non-local constants since there's no
guarantee that they are the same across all targets/features/versions.

The third commit just changes some `eval` calls to `eval_local`. Most of
these were style lints which shouldn't be assuming the value of a
constant won't ever change.

changelog: none
2025-10-04 18:16:35 +00:00
Chayim Refael Friedman
b2dd71918b
Merge pull request #20794 from itsjunetime/dedup_dedup
Deduplicate sort+dedup calls
2025-10-04 18:11:26 +00:00
bors
2cb4e7dce8 Auto merge of #147340 - matthiaskrgr:rollup-icymmsc, r=matthiaskrgr
Rollup of 10 pull requests

Successful merges:

 - rust-lang/rust#142670 (Document fully-qualified syntax in `as`' keyword doc)
 - rust-lang/rust#145685 (add CloneFromCell and Cell::get_cloned)
 - rust-lang/rust#146330 (Bump unicode_data and printables to version 17.0.0)
 - rust-lang/rust#146451 (Fix atan2 inaccuracy in documentation)
 - rust-lang/rust#146479 (add mem::conjure_zst)
 - rust-lang/rust#147117 (interpret `#[used]` as `#[used(compiler)]` on illumos)
 - rust-lang/rust#147190 (std: `sys::net` cleanups)
 - rust-lang/rust#147251 (Do not assert that a change in global cache only happens when concurrent)
 - rust-lang/rust#147280 (Return to needs-llvm-components being info-only)
 - rust-lang/rust#147315 (bless autodiff batching test)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-10-04 18:08:24 +00:00
itsjunetime
c7d00075d9
Deduplicate sort+dedup calls 2025-10-04 13:00:09 -05:00
Cameron Steffen
703584604a Remove boxes from ast TyPat lists 2025-10-04 12:39:58 -05:00
Cameron Steffen
c44500b4a1 Remove boxes from ast Pat lists 2025-10-04 12:39:58 -05:00
Chayim Refael Friedman
6ce82d488d
Merge pull request #20777 from itsjunetime/no_panic_analysis_stats
Fix panic when using analysis-stats
2025-10-04 17:39:23 +00:00
itsjunetime
82e2c67452
Move salsa attach to end before call to run_ide_things 2025-10-04 12:30:15 -05:00
Camille Gillot
94b2c303aa Use traversal::postorder. 2025-10-04 17:02:08 +00:00
Camille Gillot
1ac5d4c278 Create resume block later. 2025-10-04 16:59:04 +00:00
Camille Gillot
cf341eac19 Refactor remove_noop_landing_pads in two loops. 2025-10-04 16:59:04 +00:00
David Barsky
3350c27d91 internal: bump salsa to 0.24 2025-10-04 09:47:26 -07:00
Camille GILLOT
3d96e54656 Use a VnIndex in Address projection. 2025-10-04 16:36:52 +00:00
Camille GILLOT
11802781f7 Make Value Copy by arena-allocating vectors. 2025-10-04 16:36:52 +00:00
Matthias Krüger
a84359c5a7
Rollup merge of #147315 - ZuseZ4:fix-ad-batching-test, r=jieyouxu
bless autodiff batching test

This pr blesses a broken test and unblocks running rust in the Enzyme CI: https://github.com/EnzymeAD/Enzyme/pull/2430
Enzyme is the plugin used by our std::autodiff and (future) std::batching modules, both of which are not build by default.
In the near future we also hope to enable std::autodiff in the Rust CI.

This test is the only one to combine two features, automatic differentiation and batching/vectorization. This combination is even more experimental than either feature on its own. I have a wip branch in which I enable more vectorization/batching and as part of that I'll think more about how to write those tests in a robust way (and likely change the interface). Until that lands, I don't care too much about what specific IR we generate here; it's just nice to track changes.

r? compiler
2025-10-04 17:11:13 +02:00
Matthias Krüger
6c24eeeb62
Rollup merge of #147280 - workingjubilee:you-can-put-your-gcc-in-my-llvm-components, r=Kobzol
Return to needs-llvm-components being info-only

Partially revert a535042e80

Even with non-LLVM codegen backends, we want to allow for annotations that express dependencies to LLVM-specific parts of the test suite. This includes `//@ needs-llvm-components`, which just allows checking that LLVM is built with relevant target support before the test is run. It does not assert the test cannot work with another codegen backend.
2025-10-04 17:11:12 +02:00
Matthias Krüger
dade9fe04b
Rollup merge of #147251 - jackh726:global-cache-non-concurrent-change, r=lcnr
Do not assert that a change in global cache only happens when concurrent

Fixes rust-lang/trait-system-refactor-initiative#234

I think it should just be safe to remove this assert (rather than delaying a bug). If the previous and current result are the same, I wouldn't expect issues.

r? lcnr
2025-10-04 17:11:12 +02:00
Matthias Krüger
c389e2ed9e
Rollup merge of #147190 - joboet:sys-net-cleanup, r=hkBst,tgross35
std: `sys::net` cleanups

This PR contains three improvements to the socket-based networking implementation (aa1263e768 is just to add the now missing `unsafe`). Best reviewed commit-by-commit.
2025-10-04 17:11:11 +02:00
Matthias Krüger
3f7b8c5198
Rollup merge of #147117 - iximeow:ixi/illumos-used-attr, r=Noratrieb
interpret `#[used]` as `#[used(compiler)]` on illumos

helps rust-lang/rust#146169 not be as painful: fixes the illumos regression in rust-lang/rust#140872, but `#[used(linker)]` is still erroneous on illumos generally.

illumos' `ld` does not support a flag like either SHF_GNU_RETAIN or SHF_SUNW_NODISCARD, so there is no way to communicate `#[used(linker)]` for that target. Setting `USED_LINKER` to try results in LLVM setting SHF_SUNW_NODISCARD for Solaris-like targets, which is an unknown section header flag for illumos `ld` and prevents sections from being merged that otherwise would.

As a motivating example, the `inventory` crate produces `#[used]` items to merge into `.init_array`. Because those items have an unknown section header flag they are not merged with the default `.init_array` with `frame_dummy`, and end up never executed.

Downgrading `#[used]` to `#[used(compiler)]` on illumos keeps so-attributed items as preserved as they had been before https://github.com/rust-lang/rust/pull/140872. As was the case before that change, because rustc passes `-z ignore` to illumos `ld`, it's possible that `used` sections are GC'd at link time. https://github.com/rust-lang/rust/issues/146169 describes this unfortunate circumstance.

----

as it turns out, `tests/ui/attributes/used_with_archive.rs` had broken on `x86_64-unknown-illumos`, and this patch fixes it. the trials and tribulations of tier 2 :(

r? ````@Noratrieb```` probably?
2025-10-04 17:11:11 +02:00
Matthias Krüger
18388b8420
Rollup merge of #146479 - Qelxiros:mem_conjure_zst, r=scottmcm,tgross35
add mem::conjure_zst

Tracking issue: rust-lang/rust#95383
2025-10-04 17:11:10 +02:00
Matthias Krüger
baea20ba44
Rollup merge of #146451 - DimitriiTrater:atan2_correctness_docs, r=tgross35
Fix atan2 inaccuracy in documentation

Fixes rust-lang/rust#136275
2025-10-04 17:11:09 +02:00
Matthias Krüger
dbc1e82f25
Rollup merge of #146330 - Marcondiro:unicode-17, r=Manishearth
Bump unicode_data and printables to version 17.0.0

Unicode 17 ~~is not stable yet (release planned for 2025-09-09).~~ [has been released!](https://www.unicode.org/versions/Unicode17.0.0/)

Update Unicode data and printables to [Unicode 17](https://www.unicode.org/versions/Unicode17.0.0/)
2025-10-04 17:11:09 +02:00
Matthias Krüger
47bd38c2f1
Rollup merge of #145685 - Qelxiros:cell_get_cloned, r=programmerjake,tgross35
add CloneFromCell and Cell::get_cloned

Tracking issue: rust-lang/rust#145329
2025-10-04 17:11:08 +02:00
Matthias Krüger
f837cfe5ac
Rollup merge of #142670 - fpdotmonkey:doc/as-fully-qualified-syntax, r=ibraheemdev,fmease
Document fully-qualified syntax in `as`' keyword doc
2025-10-04 17:11:08 +02:00
bors
99ca0ae87b Auto merge of #147338 - weihanglo:update-cargo, r=weihanglo
Update cargo submodule

3 commits in 2394ea6cea8b26d717aa67eb1663a2dbf2d26078..801d9b4981dd07e3aecdca1ab86834c13615737e
2025-10-03 14:13:01 +0000 to 2025-10-04 13:30:15 +0000
- chore: Disabled `reserved_windows_name` test temporaily (rust-lang/cargo#16048)
- Add panic=immediate-abort support to Cargo (rust-lang/cargo#16041)
- Accessing each build script's `OUT_DIR` (rust-lang/cargo#15891)
2025-10-04 14:57:32 +00:00
Jason Newcomb
47b0f903a3 Use eval_local in more places. 2025-10-04 10:41:35 -04:00
Jason Newcomb
3d351c839d Const eval changes:
* Remove `CoreConstant`.
* Treat most constants from core as though they were inlined.
* Don't evaluate `is_empty` for named constants.
2025-10-04 10:41:35 -04:00
Weihang Lo
b4578775b4
Update cargo submodule 2025-10-04 10:22:41 -04:00
Ada Alakbarova
2688f601dd
Make fmt::Write a diagnostic item 2025-10-04 16:07:06 +02:00
Ada Alakbarova
434fe184e6
fix(zero_repeat_side_effects): don't suggest unsuggestable types 2025-10-04 15:57:05 +02:00