1
Fork 0
Commit graph

3134 commits

Author SHA1 Message Date
许杰友 Jieyou Xu (Joe)
d47e5a371b Temporarily depend on os_pipe in run-make-support and re-export it
For `broken-pipe-no-ice` until std `anonymous_pipe` stabilizes.
2025-03-07 19:08:11 +08:00
bors
351686bcfd Auto merge of #137752 - flip1995:clippy-subtree-update, r=Manishearth
Clippy subtree update

? `@Manishearth`

Cargo.lock change because of Clippy version bump and rustc_tool_utils new release.

Fixes #137640

Would be nice, if we could this merged before nightly is being build, so that this ICE is fixed tomorrow.
2025-03-01 22:22:06 +00:00
Matthias Krüger
b6c1b635f7
Rollup merge of #137776 - nnethercote:rustc_transmute-cleanups, r=jswrenn
Some `rustc_transmute` cleanups

A number of small things that can be removed.

r? ``@jswrenn``
2025-03-01 11:34:01 +01:00
Philipp Krones
7bfea66652
Update Cargo.lock 2025-02-28 23:28:53 +01:00
许杰友 Jieyou Xu (Joe)
e3f42aa59f compiler: bump cc to 1.2.16 to fix x86 Windows jobs on newest Windows SDK
See <https://github.com/rust-lang/rust/issues/137733>.
2025-02-28 21:10:21 +08:00
Nicholas Nethercote
43e017fd01 Remove rustc_transmute's dependence on rustc_macros. 2025-02-28 17:31:18 +11:00
Nicholas Nethercote
5f58985f5d Remove rustc_transmute's dependence on rustc_infer.
`TransmuteTypeEnv` only needs a `TyCtxt`, not an `InferCtxt`.
2025-02-28 16:34:41 +11:00
Michael Goulet
864cca80b0 Print out destructor 2025-02-26 19:03:29 +00:00
Jana Dönszelmann
95b52d51ea
pretty print hir attributes 2025-02-24 14:31:19 +01:00
Jana Dönszelmann
7e0f5b5016
Introduce new-style attribute parsers for several attributes
note: compiler compiles but librustdoc and clippy don't
2025-02-24 14:31:17 +01:00
Jana Dönszelmann
dbd3b7928e
Introduce new parsing infrastructure and types for parsed attributes
fixup docs in parser
2025-02-24 14:26:06 +01:00
bors
f43e549b88 Auto merge of #137285 - yotamofek:pr/rustdoc/pulldown-escaping, r=GuillaumeGomez
librustdoc: Use `pulldown-cmark-escape` for HTML escaping

Implementation of `@notriddle` 's [suggestion](https://github.com/rust-lang/rust/pull/137274#issuecomment-2669001585).
Somewhat related to #137274 , but the two PRs should be complementary.

Local perf results look like a nice improvement! (so would love a perf run on the CI)
2025-02-24 07:11:04 +00:00
Ben Kimock
fd451dc057 Use StableHasher + Hash64 for dep_tracking_hash 2025-02-21 21:36:58 -05:00
bjorn3
7b74920388 Stacker now handles miri using a noop impl itself 2025-02-21 13:54:45 +00:00
Matthias Krüger
80e861c142
Rollup merge of #137262 - compiler-errors:ast-ir-begone, r=lcnr
Make fewer crates depend on `rustc_ast_ir`

I think it simplifies the crate graph and also exposes people less to confusion if downstream crates don't interact with `rustc_ast_ir` directly and instead just use its functionality reexported through more familiar paths.

r? oli-obk since you introduced ast-ir
2025-02-20 00:55:13 +01:00
Yotam Ofek
489f5c19d4 librustdoc: Use pulldown-cmark-escape for HTML escaping 2025-02-19 18:42:02 +00:00
Michael Goulet
b78c626a95 Make fewer crates depend on rustc_ast_ir 2025-02-19 07:06:54 +00:00
Matthias Krüger
d0c1e1c0e8
Rollup merge of #137177 - GuillaumeGomez:update-minifier, r=notriddle
Update `minifier-rs` version to `0.3.5`

Encountered a bug around handling of `*` which blocked me for something I'm working on.

Also includes multiple fixes from ```@notriddle.```

r? ```@notriddle```
2025-02-19 01:30:11 +01:00
Eric Huss
2773456f5f Move error_index_generator to the rustbook workspace
I had forgotten that error_index_generator is using mdbook. This moves
it to be part of the rustbook workspace so that it can share the
dependency with rustbook.
2025-02-17 10:58:15 -08:00
Guillaume Gomez
30c7956aed Update minifier-rs version to 0.3.5 2025-02-17 17:10:07 +01:00
Matthias Krüger
fab38375bc
Rollup merge of #137095 - saethlin:use-hash64-for-hashes, r=workingjubilee
Replace some u64 hashes with Hash64

I introduced the Hash64 and Hash128 types in https://github.com/rust-lang/rust/pull/110083, essentially as a mechanism to prevent hashes from landing in our leb128 encoding paths. If you just have a u64 or u128 field in a struct then derive Encodable/Decodable, that number gets leb128 encoding. So if you need to store a hash or some other value which behaves very close to a hash, don't store it as a u64.

This reverts part of https://github.com/rust-lang/rust/pull/117603, which turned an encoded Hash64 into a u64.

Based on https://github.com/rust-lang/rust/pull/110083, I don't expect this to be perf-sensitive on its own, though I expect that it may help stabilize some of the small rmeta size fluctuations we currently see in perf reports.
2025-02-17 06:38:14 +01:00
Ben Kimock
4cf21866e8 Move hashes from rustc_data_structure to rustc_hashes so they can be shared with rust-analyzer 2025-02-16 16:18:30 -05:00
Chris Denton
26eeac1a1e
Windows: Update generated bindings to 0.59 2025-02-13 10:32:59 +00:00
Jubilee Young
038c183d5f compiler: remove rustc_target reexport of rustc_abi::HashStableContext
The last public reexport of rustc_abi in rustc_target is finally gone.
2025-02-11 18:55:48 -08:00
bors
92bedea1c5 Auto merge of #136605 - lsunsi:update-rustc-hash, r=lqd
chore: update rustc-hash 2.1.0 to 2.1.1

This PR updates the rustc-hash crate to include a palliative fix for #135477.
The discussion for this can be found in the issue and on https://github.com/rust-lang/rustc-hash/pull/55.

This PR is the output of running `cargo +nightly update rustc-hash@2.1.0`. I ran all tests locally and they all seem to pass, with the exception of `tests/ui/process/nofile-limit.rs` which always fails on my setup.

`@steffahn` `@orlp` and `@Noratrieb` all have full context on this, I'm opening the pull request trying to be helpful. I'm not sure if anything else needs to be done, like documentation I'm not aware of or running any special CIs but if I can do anything else please let me know!
2025-02-11 21:05:32 +00:00
Matthias Krüger
38f4c1f49a
Rollup merge of #136603 - workingjubilee:move-abi-versioning-into-ast, r=compiler-errors
compiler: gate `extern "{abi}"` in ast_lowering

I don't believe low-level crates like `rustc_abi` should have to know or care about higher-level concerns like whether the ABI string is stable for users. These implementation details can be made less open to public inspection. This way the code that governs stability is near the code that enforces stability, and compiled together.

It also abstracts away certain error messages instead of constantly repeating them.

A few error messages are simply deleted outright, instead of made uniform, because they are either too dated to be useful or redundant with other diagnostic improvements we could make. These can be pursued in followups: my first concern was making sure there wasn't unnecessary diagnostics-related code in `rustc_abi`, which is not well-positioned to understand what kind of errors are going to be generated based on how it is used.

r? ``@ghost``
2025-02-11 02:53:44 +01:00
Jubilee
26ca716f79
Rollup merge of #136707 - clubby789:cmake-bisect, r=jieyouxu
Bump `cc` to v1.2.13 for the compiler workspace
2025-02-10 00:51:54 -08:00
Jubilee
ae732f3f65
Rollup merge of #136201 - davidv1992:eliminate-field-offset-alt, r=Mark-Simulacrum
Removed dependency on the field-offset crate, alternate approach

This is an alternate approach to reach the same goals as #136003. As it touches the core of the query system, this too probably should be evaluated for performance.

r? ``@Mark-Simulacrum``
2025-02-10 00:51:50 -08:00
clubby789
09f57b2e5c Bump cc to v1.2.13 for the compiler workspace 2025-02-10 00:06:31 -08:00
Jubilee Young
54ff6e0ad5 compiler: remove rustc_target::spec::abi reexports 2025-02-09 20:45:47 -08:00
Jubilee Young
90c50f0164 compiler: start using rustc_ast_lowering in rustc_passes 2025-02-09 20:45:47 -08:00
Jubilee Young
3f50076fb3 compiler: gate extern "{abi}" in ast_lowering
By moving this stability check into AST lowering, we effectively make
it impossible to accidentally miss, as it must happen to generate HIR.
Also, we put the ABI-stability code next to code that actually uses it!
This allows code that wants to reason about backend ABI implementations
to stop worrying about high-level concerns like syntax stability,
while still leaving it as the authority on what ABIs actually exist.

It also makes it easy to refactor things to have more consistent errors.
For now, we only apply this to generalize the existing messages a bit.
2025-02-09 20:36:59 -08:00
Matthias Krüger
370c8afa10
Rollup merge of #136694 - GuillaumeGomez:update-minifier, r=notriddle
Update minifier version to `0.3.4`

It fixes a bug where a whitespace would get removed in `a [attribute]` (you're not forced to add a tag before an attribute selector).

r? ````@notriddle````
2025-02-09 19:44:51 +01:00
bors
a26e97be88 Auto merge of #136754 - Urgau:rollup-qlkhjqr, r=Urgau
Rollup of 5 pull requests

Successful merges:

 - #134679 (Windows: remove readonly files)
 - #136213 (Allow Rust to use a number of libc filesystem calls)
 - #136530 (Implement `x perf` directly in bootstrap)
 - #136601 (Detect (non-raw) borrows of null ZST pointers in CheckNull)
 - #136659 (Pick the max DWARF version when LTO'ing modules with different versions )

r? `@ghost`
`@rustbot` modify labels: rollup
2025-02-09 12:54:26 +00:00
Urgau
d024cef057
Rollup merge of #136530 - Kobzol:x-perf, r=onur-ozkan
Implement `x perf` directly in bootstrap

Discussed [here](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Turning.20.60x.20perf.60.20into.20a.20first.20class.20command).

Implementing the command directly in bootstrap let's us correctly build the compiler toolchain based on input arguments (such as include rustdoc in the toolchain [only] when needed), and it also makes the CLI interface nicer.

r? ``@onur-ozkan``
2025-02-09 00:37:27 +01:00
Jubilee Young
221416deea compiler: use rustc_abi in rustc_ast_* 2025-02-07 21:52:37 -08:00
Guillaume Gomez
a3a9c28ba1 Update minifier version to 0.3.4 2025-02-07 21:29:52 +01:00
Jubilee Young
1f37b9a643 compiler: remove rustc_target::abi entirely 2025-02-07 11:23:12 -08:00
bors
79f82ad5e8 Auto merge of #136585 - gvozdvmozgu:memchr-eat-until-lexer, r=lcnr
implement `eat_until` leveraging memchr in lexer
2025-02-06 14:19:30 +00:00
Lucas Sunsi Abreu
62c2f65ccd
chore: update rustc-hash 2.1.0 to 2.1.1 2025-02-05 17:13:02 -03:00
David Venhoek
62bbaa8091 Removed dependency on the field-offset crate. 2025-02-05 17:56:06 +01:00
gvozdvmozgu
9f469eb600 implement eat_until leveraging memchr in lexer 2025-02-05 07:03:53 -08:00
Jakub Beránek
c73ed895c7 Remove the rustc-perf-wrapper tool 2025-02-05 15:33:40 +01:00
bors
820bfffc25 Auto merge of #136094 - davidv1992:upgrade-elsa, r=oli-obk
Upgrade elsa to the newest version.

This was locked to 1.7.1 because of an error in the elsa release process that has since been fixed. Upgrading has the advantage that the elsa code runs properly in miri, at least with tree borrows.

This was spawned from https://github.com/rust-lang/rust/issues/135870#issuecomment-2612470540
2025-02-05 10:15:02 +00:00
Jacob Pratt
648fd0e3ef
Rollup merge of #135844 - yaahc:tidy-feature-status-dump, r=jieyouxu
Add new tool for dumping feature status based on tidy

sequel to https://github.com/rust-lang/rust/pull/133514

meaning ...

supercedes https://github.com/rust-lang/rust/pull/133351

part of https://github.com/rust-lang/rust/issues/129485

r? `@jieyouxu`
cc `@estebank`
2025-02-04 05:36:51 -05:00
Ralf Jung
df9a3f2647 update lockfile 2025-02-02 21:23:11 +01:00
Jacob Pratt
c19c4b91f5
Rollup merge of #133429 - EnzymeAD:autodiff-middle, r=oli-obk
Autodiff Upstreaming - rustc_codegen_ssa, rustc_middle

This PR should not be merged until the rustc_codegen_llvm part is merged.
I will also alter it a little based on what get's shaved off from the cg_llvm PR,
and address some of the feedback I received in the other PR (including cleanups).

I am putting it already up to
1) Discuss with `@jieyouxu` if there is more work needed to add tests to this and
2) Pray that there is someone reviewing who can tell me why some of my autodiff invocations get lost.

Re 1: My test require fat-lto. I also modify the compilation pipeline. So if there are any other llvm-ir tests in the same compilation unit then I will likely break them. Luckily there are two groups who currently have the same fat-lto requirement for their GPU code which I have for my autodiff code and both groups have some plans to enable support for thin-lto. Once either that work pans out, I'll copy it over for this feature. I will also work on not changing the optimization pipeline for functions not differentiated, but that will require some thoughts and engineering, so I think it would be good to be able to run the autodiff tests isolated from the rest for now. Can you guide me here please?
For context, here are some of my tests in the samples folder: https://github.com/EnzymeAD/rustbook

Re 2: This is a pretty serious issue, since it effectively prevents publishing libraries making use of autodiff: https://github.com/EnzymeAD/rust/issues/173. For some reason my dummy code persists till the end, so the code which calls autodiff, deletes the dummy, and inserts the code to compute the derivative never gets executed. To me it looks like the rustc_autodiff attribute just get's dropped, but I don't know WHY? Any help would be super appreciated, as rustc queries look a bit voodoo to me.

Tracking:

- https://github.com/rust-lang/rust/issues/124509

r? `@jieyouxu`
2025-01-31 00:26:30 -05:00
Manuel Drehwald
1f30517d40 upstream rustc_codegen_ssa/rustc_middle changes for enzyme/autodiff 2025-01-29 21:31:13 -05:00
David Venhoek
1b8a792b96 Upgrade elsa to the newest version. 2025-01-29 21:51:28 +01:00
Josh Stone
314238f92e Flip the rustc-rayon/indexmap dependency order
[`rustc-rayon v0.5.1`](https://github.com/rust-lang/rustc-rayon/pull/14)
added `indexmap` implementations that will allow `indexmap` to drop its
own "internal-only" implementations.

(This is separate from `indexmap`'s implementation for normal `rayon`.)
2025-01-27 10:14:37 -08:00