1
Fork 0
Commit graph

3168 commits

Author SHA1 Message Date
klensy
724a5a430b bump thorin to drop duped deps 2025-03-24 19:38:16 +03:00
bors
90f5eab952 Auto merge of #115747 - Zoxc:query-hashes, r=oli-obk
Optimize hash map operations in the query system

This optimizes hash map operations in the query system by explicitly passing hashes and using more optimal operations. `find_or_find_insert_slot` in particular saves a hash table lookup over `entry`. It's not yet available in a safe API, but will be in https://github.com/rust-lang/hashbrown/pull/466.

<table><tr><td rowspan="2">Benchmark</td><td colspan="1"><b>Before</b></th><td colspan="2"><b>After</b></th></tr><tr><td align="right">Time</td><td align="right">Time</td><td align="right">%</th></tr><tr><td>🟣 <b>clap</b>:check</td><td align="right">1.6189s</td><td align="right">1.6129s</td><td align="right"> -0.37%</td></tr><tr><td>🟣 <b>hyper</b>:check</td><td align="right">0.2353s</td><td align="right">0.2337s</td><td align="right"> -0.67%</td></tr><tr><td>🟣 <b>regex</b>:check</td><td align="right">0.9344s</td><td align="right">0.9289s</td><td align="right"> -0.59%</td></tr><tr><td>🟣 <b>syn</b>:check</td><td align="right">1.4693s</td><td align="right">1.4652s</td><td align="right"> -0.28%</td></tr><tr><td>🟣 <b>syntex_syntax</b>:check</td><td align="right">5.6606s</td><td align="right">5.6439s</td><td align="right"> -0.30%</td></tr><tr><td>Total</td><td align="right">9.9185s</td><td align="right">9.8846s</td><td align="right"> -0.34%</td></tr><tr><td>Summary</td><td align="right">1.0000s</td><td align="right">0.9956s</td><td align="right"> -0.44%</td></tr></table>

r? `@cjgillot`
2025-03-24 11:40:33 +00:00
Matthias Krüger
a4c0173d12
Rollup merge of #138763 - aDotInTheVoid:two-years-later, r=GuillaumeGomez
jsondocck: Replace `jsonpath_lib` with `jsonpath-rust`

The current jsonpath implementation we use isn't spec-compliant, and is buggy. See https://github.com/freestrings/jsonpath/issues/91

To solve it, it's replaced with https://github.com/besok/jsonpath-rust. This is spec-compiant, and doesn't have a really awkward bug we need to always dance around.

Unfortunately, this requires rewriting almost every test, as the behaviour of `[?(```@`,``` which is *extremely* common was changed. (But the new behaviour makes way more sense, and isn't buggy with tripply nested selectors)

Unblocks #110406. Makes #100515 much easier as we don't need to explain the broken JSONPath implementation

Best reviewed commit-by-commit. The first does the replacement. The next two rewrite the test-suite mechanically. The last rewrites the test-suite by hand.

r? ```@GuillaumeGomez```
2025-03-22 11:59:19 +01:00
John Kåre Alsaker
93bfe39ba5 Use hashbrown from crates.io 2025-03-21 07:54:35 +01:00
John Kåre Alsaker
fcd3349d14 Optimize hash map operations in the query system 2025-03-21 07:51:20 +01:00
Alona Enraght-Moony
a0918b7f5f jsondocck: Replace jsonpath_lib with jsonpath-rust 2025-03-21 00:48:09 +00:00
Philipp Krones
58142e99ae
Update Cargo.lock 2025-03-20 22:35:05 +01:00
Nicholas Nethercote
8121958fda Use -Wunused_crate_dependencies for compiler crates.
It's very useful. There are some false positives involving integration
tests in `rustc_pattern_analysis` and `rustc_serialize`. There is also a
false positive involving `rustc_driver_impl`'s
`rustc_randomized_layouts` feature. And I removed a `rustc_span` mention
in a doc comment in `rustc_log` because it wasn't integral to the
comment but caused a dev-dependency.
2025-03-20 08:59:43 +11:00
Ralf Jung
20d04d8a40 Revert "Rollup merge of #136355 - GuillaumeGomez:proc-macro_add_value_retrieval_methods, r=Amanieu"
This reverts commit 08dfbf49e3, reversing
changes made to 10bcdad7df.
2025-03-18 13:28:56 +01:00
Jacob Pratt
08dfbf49e3
Rollup merge of #136355 - GuillaumeGomez:proc-macro_add_value_retrieval_methods, r=Amanieu
Add `*_value` methods to proc_macro lib

This is the implementation of https://github.com/rust-lang/libs-team/issues/459.

It allows to get the actual value (unescaped) of the different string literals.

Part of https://github.com/rust-lang/rust/issues/136652.

r? libs-api
2025-03-17 05:47:48 -04:00
bors
227690a258 Auto merge of #137011 - LuuuXXX:promote-ohos-with-host-tools, r=Amanieu
Promote ohos targets to tier2 with host tools.

### What does this PR try to resolve?

Try to promote the following [[Tier 2 without Host Tools](https://doc.rust-lang.org/rustc/platform-support.html#tier-2-without-host-tools)](https://doc.rust-lang.org/rustc/platform-support.html#tier-2-without-host-tools) targets to [[Tier 2 with Host Tools](https://doc.rust-lang.org/rustc/platform-support.html#tier-2-with-host-tools)](https://doc.rust-lang.org/rustc/platform-support.html#tier-2-with-host-tools):

- `aarch64-unknown-linux-ohos`
- `armv7-unknown-linux-ohos`
- `x86_64-unknown-linux-ohos`

### More Information?

see MCP: https://github.com/rust-lang/compiler-team/issues/811

### Blockage to be solved?

- [x] Submit an MCP
- [x] Submit code of promote ohos targets
- [x] Resolve related dependencies (`measureme`)

The modified code of the measureme has been merged (see https://github.com/rust-lang/measureme/pull/238). [done]
The new version will was released (https://github.com/rust-lang/measureme/pull/240). [done]
2025-03-16 18:42:18 +00:00
许杰友 Jieyou Xu (Joe)
e42f33970c
Rollup merge of #138465 - klensy:linkchecker-b, r=Mark-Simulacrum
linkchecker: bump html5ever

Bumping html5ever to 0.28 required small refactoring, see https://github.com/servo/html5ever/pull/548
2025-03-16 09:40:08 +08:00
Michael Goulet
b88f85a410 Stop relying on rustc_type_ir in non-type-system crates 2025-03-15 06:42:48 +00:00
Josh Stone
abed12a132 Add src/tools/x to the main workspace
The original reason to exclude it was so it could run before submodules
were initialized. However, those have all been converted to subtrees
now, so the entire workspace is always ready to go.
2025-03-13 12:18:32 -07:00
klensy
7b4b4b19e9 bump html5ever to 0.29 with deps 2025-03-13 19:59:53 +03:00
klensy
b9e00b32e3 bump html5ever to 0.28
see https://github.com/servo/html5ever/pull/548
2025-03-13 19:53:40 +03:00
Matthias Krüger
3b1776dc29
Rollup merge of #126856 - onur-ozkan:remove-rls, r=clubby789
remove deprecated tool `rls`

This tool has been deprecated for two years and now it only gives warning without doing anything useful.

Zulip discussion: https://rust-lang.zulipchat.com/#narrow/stream/241545-t-release/topic/excluding.20rls.20from.20the.20release

try-job: x86_64-gnu-distcheck
2025-03-13 10:58:13 +01:00
Matthias Krüger
4ffbc32f17
Rollup merge of #137701 - cuviper:sharded-hashtable, r=fmease
Convert `ShardedHashMap` to use `hashbrown::HashTable`

The `hash_raw_entry` feature (#56167) has finished fcp-close, so the compiler
should stop using it to allow its removal. Several `Sharded` maps were
using raw entries to avoid re-hashing between shard and map lookup, and
we can do that with `hashbrown::HashTable` instead.
2025-03-12 17:59:07 +01:00
onur-ozkan
56d0b160f8 remove rls source from the repository
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-03-12 09:13:59 +03:00
bors
6650252439 Auto merge of #128440 - oli-obk:defines, r=lcnr
Add `#[define_opaques]` attribute and require it for all type-alias-impl-trait sites that register a hidden type

Instead of relying on the signature of items to decide whether they are constraining an opaque type, the opaque types that the item constrains must be explicitly listed.

A previous version of this PR used an actual attribute, but had to keep the resolved `DefId`s in a side table.

Now we just lower to fields in the AST that have no surface syntax, instead a builtin attribute macro fills in those fields where applicable.

Note that for convenience referencing opaque types in associated types from associated methods on the same impl will not require an attribute. If that causes problems `#[defines()]` can be used to overwrite the default of searching for opaques in the signature.

One wart of this design is that closures and static items do not have generics. So since I stored the opaques in the generics of functions, consts and methods, I would need to add a custom field to closures and statics to track this information. During a T-types discussion we decided to just not do this for now.

fixes #131298
2025-03-11 18:13:31 +00:00
Oli Scherer
cb4751d4b8 Implement #[define_opaque] attribute for functions. 2025-03-11 12:05:02 +00:00
Josh Stone
3b0c2585c8 Convert ShardedHashMap to use hashbrown::HashTable
The `hash_raw_entry` feature has finished fcp-close, so the compiler
should stop using it to allow its removal. Several `Sharded` maps were
using raw entries to avoid re-hashing between shard and map lookup, and
we can do that with `hashbrown::HashTable` instead.
2025-03-10 17:08:30 -07:00
Chris Denton
1c7aaf95e1
Update rand to 0.9.0 2025-03-10 01:21:57 +00:00
Matthias Krüger
d88752a4b5
Rollup merge of #138160 - jdonszelmann:move-find-attr2, r=oli-obk
depend more on attr_data_structures and move find_attr! there

r?  ``@oli-obk``

This should be an easy one. It just moves some imports around. This is necessary for other changes that I'm working on not to have import cycles. However, it's an easy one to just merge on its own.
2025-03-09 10:34:52 +01:00
Matthias Krüger
cdd97bae84
Rollup merge of #137885 - klensy:tidy-triagebot, r=jieyouxu
tidy: add triagebot checks

Validates triagebot.toml to have existing paths:

`[mentions."*"]` sections, i.e.
```toml
[mentions."compiler/rustc_const_eval/src/"]
```
or
```toml
[assign.owners]
"/.github/workflows" = ["infra-ci"]
```
or

```toml
trigger_files = [
 "src/librustdoc/html/static/js/search.js",
 "tests/rustdoc-js",
 "tests/rustdoc-js-std",
 ]
```
Looked at #137876 and implemented check.
2025-03-09 10:34:48 +01:00
Jana Dönszelmann
4203e9c56d
depend more on attr_data_structures and move find_attr! there 2025-03-07 18:05:42 +01:00
许杰友 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
klensy
8edf528eb4 tidy: add check to verify paths in triagebot.toml 2025-03-05 12:30:03 +03:00
LuuuXXX
4dab55bcaa Revert "add fix for full tools and sanitizer"
This reverts commit 6efacfb7a5.
2025-03-04 17:38:06 +08:00
LuuuXXX
6efacfb7a5 add fix for full tools and sanitizer 2025-03-04 17:25:54 +08:00
LuuuXXX
7279acf202 use measureme-12.0.1 2025-03-04 17:13:46 +08:00
LuuuXXX
6324b39873 promote ohos targets to tier to with host tools 2025-03-04 17:13:46 +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