Commit Graph

169660 Commits

Author SHA1 Message Date
bors 48622726c4 Auto merge of #150289 - rami3l:dist/rustc-docs-dist-path, r=jieyouxu
fix(bootstrap/dist)!: change dist path for `rustc-docs` to avoid clashing

Closes rust-lang/rust#75833, part of https://github.com/rust-lang/rustup/issues/3717:

> I'd like to know if we can assign another folder name to `rustc-docs`?
> [...]
> [`@ThePuzzlemaker](https://github.com/ThePuzzlemaker)'s` `share/doc/rust/html/nightly-rustc` does look a bit weird to me (`nightly-rustc` has nothing to do with the current `rustc`, i.e. the Rustc Book, but they somehow appear similar just looking at the names).
>
> I personally would like to see something like `share/doc/rust/html/rustc-docs` or `share/doc/rust/html/rustc-api` for this component.
_https://github.com/rust-lang/rust/issues/75833#issuecomment-2002503223_

The TLDR is that currently the "rustc book"'s path clashes with "rustc APIs" (i.e. `rustc-docs`), so we change the path of the latter to make it distributable via rustup.

I'm new to `bootstrap` so please feel free to point out any inconsistencies or any extra work I'll need to do to fully land this somewhat breaking change.
2025-12-31 22:00:15 +00:00
Jonathan Brouwer 8dc15d2424 Rollup merge of #150543 - lnicola:sync-from-ra, r=lnicola
`rust-analyzer` subtree update

Subtree update of `rust-analyzer` to https://github.com/rust-lang/rust-analyzer/commit/76d44ffb3f86b87771b2bb5e808d42992c1ad745.

Created using https://github.com/rust-lang/josh-sync.

r? `@ghost`
2025-12-31 17:32:06 +01:00
Jonathan Brouwer 15c467ba0c Rollup merge of #150530 - Zalathar:string-deref-patterns, r=jackh726
Remove `feature(string_deref_patterns)`

The older `string_deref_patterns` feature has been superseded by the newer and more general `deref_patterns` feature. Removing string-deref-patterns allows us to get rid of a few tricky special cases in match lowering, which are different from the special cases used by deref-patterns.

The handful of existing tests for `string_deref_patterns` have been migrated to use `deref_patterns` instead. Current nightly users of the older feature should hopefully be able to migrate to the newer feature without too much trouble.

Note that `deref_patterns` is currently marked as an “incomplete” feature, because it doesn't have an accepted RFC. But `string_deref_patterns` doesn't appear to have ever had an accepted RFC either, so arguably it should have been marked incomplete too.

---
- Tracking issue for both features: https://github.com/rust-lang/rust/issues/87121
- Original implementation: https://github.com/rust-lang/rust/pull/98914
- [Zulip thread: Can we remove `#![feature(string_deref_patterns)]`?](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Can.20we.20remove.20.60.23!.5Bfeature.28string_deref_patterns.29.5D.60.3F/with/565787352)
2025-12-31 17:32:06 +01:00
Chayim Refael Friedman 6d0f23cbdc Merge pull request #21375 from A4-Tacks/impl-trait-target-and-dyn-hint
Fix incorrect dyn hint in `impl Trait for`
2025-12-31 08:30:52 +00:00
A4-Tacks c19e9ecdd9 Fix incorrect dyn hint in impl Trait for
Example
---
```rust
trait T {}
impl T for {}
```

**Before this PR**

```rust
trait T {}
impl T for {}
  // ^ dyn
```

**After this PR**

```rust
trait T {}
impl T for {}
```
2025-12-31 16:18:33 +08:00
Lukas Wirth 5bb8d5d1e3 Merge pull request #21370 from ChayimFriedman2/macro-brace-style
feat: Add #[rust_analyzer::macro_style()] attribute to control macro completion brace style
2025-12-31 07:39:54 +00:00
bors 629b092f8f Auto merge of #150525 - weihanglo:update-cargo, r=weihanglo
Update cargo submodule

9 commits in 94c368ad2b9db0f0da5bdd8421cea13786ce4412..b54051b1505281ec7a45a250140a0ff25d33f319
2025-12-26 19:39:15 +0000 to 2025-12-30 20:35:52 +0000
- fix(log): add `dependencies` field to `UnitRegistered` (rust-lang/cargo#16448)
- Implement fine grain locking for `build-dir` (rust-lang/cargo#16155)
- feat(resolver): List features when no close match (rust-lang/cargo#16445)
- feat(report): new command `cargo report sessions` (rust-lang/cargo#16428)
- feat (patch): Display where the patch was defined in patch-related error messages (rust-lang/cargo#16407)
- test(build-rs): Reduce from 'build' to 'check' where possible (rust-lang/cargo#16444)
- feat(toml): TOML 1.1 parse support (rust-lang/cargo#16415)
- feat(report): support --manifest-path in `cargo report timings` (rust-lang/cargo#16441)
- fix(vendor): recursively filter git files in subdirectories (rust-lang/cargo#16439)

r? ghost
2025-12-31 06:49:05 +00:00
Jefffrey 935e3cbb86 fix: don't fire non_camel_case_types lint for structs/enums marked with repr(C) 2025-12-31 15:29:51 +09:00
Zalathar ef8d943ecd Remove feature(string_deref_patterns) 2025-12-31 14:21:38 +11:00
Weihang Lo 62d19109c8 Update cargo submodule 2025-12-30 17:05:59 -05:00
Chayim Refael Friedman df998811ce Adapt macros in rust-analyzer to new attribute
`match_ast!` cannot be ported because of a weird compiler bug: https://github.com/rust-lang/rust/issues/150518.
2025-12-30 22:44:23 +02:00
Chayim Refael Friedman 975aa0dc8a Add #[rust_analyzer::macro_style()] attribute to control macro completion brace style 2025-12-30 22:44:18 +02:00
Chayim Refael Friedman 9508cd1cb7 Compress token trees for best memory usage 2025-12-30 12:56:56 +02:00
Lukas Wirth 3d9856d950 Merge pull request #21367 from ChayimFriedman2/upvars
fix: Have an `upvars_mentioned()` query that only computes what upvars a closure captures
2025-12-30 09:00:13 +00:00
qb42 841091b846 Remove extra columns from promoted targets 2025-12-30 06:44:28 +00:00
qb42 e330a3fab1 Make empty columns consistent 2025-12-30 06:26:01 +00:00
qb42 8cc5dc374b Add missing columns to demoted targets 2025-12-30 06:13:43 +00:00
Jonathan Brouwer 18b3b66c01 Rollup merge of #150490 - Kobzol:gcc-bug-url, r=antoyo
Specify bug URL when building GCC

r? `@antoyo`
2025-12-30 02:07:08 +01:00
Jonathan Brouwer 1953001256 Rollup merge of #150489 - Kobzol:gcc-no-debuginfo, r=antoyo
Disable debuginfo when building GCC

To reduce size of libgccjit.so from ~400 MiB to ~50 MiB.

r? `@antoyo`
2025-12-30 02:07:08 +01:00
Jonathan Brouwer 71c248a2e1 Rollup merge of #150396 - GuillaumeGomez:fix-line-numbers-hidden, r=lolbinarycat
[rustdoc] If line number setting is disabled, do not make line numbers take space

While working on https://github.com/rust-lang/rust/pull/150395, I realized that when enabled then disabled the "show line numbers" setting, instead of looking like initially:

<img width="904" height="148" alt="Screenshot From 2025-12-26 16-51-44" src="https://github.com/user-attachments/assets/a24df2f2-61be-4db5-b60f-519b35425fd2" />

The "space" taken by line numbers was still there:

<img width="904" height="148" alt="Screenshot From 2025-12-26 16-51-41" src="https://github.com/user-attachments/assets/b44af75d-52a4-4401-98e4-602b16bf6b9b" />

This PR fixes it.

First commit cleans up the `utils.goml` file a bit, I think I'll do more cleanup because switching the settings without reloading the page should make GUI tests a bit faster.

r? `@yotamofek`
2025-12-30 02:07:07 +01:00
bors 56f24e00c6 Auto merge of #150488 - JonathanBrouwer:rollup-9ugn7py, r=JonathanBrouwer
Rollup of 2 pull requests

Successful merges:

 - rust-lang/rust#150394 (Accommodate LLVM PassPlugin rename)
 - rust-lang/rust#150483 (miri subtree update)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-12-29 18:50:18 +00:00
Chayim Refael Friedman edae1517f8 Merge pull request #21308 from dfireBird/runnable-subcommand-config
feat: implement configuration to change sub command for test, bench and doctest
2025-12-29 17:20:29 +00:00
Chayim Refael Friedman 192bbd1d4b Have an upvars_mentioned() query that only computes what upvars a closure captures
It's required for coercion, where we now use it, as well as for other things.
2025-12-29 19:16:07 +02:00
Jakub Beránek 0cc8608493 Specify bug URL when building GCC 2025-12-29 18:06:48 +01:00
dfireBird 7069629ee9 chore: add test_name placeholder in config 2025-12-29 22:32:20 +05:30
Chayim Refael Friedman cd2c209a1c Fix Clippy 2025-12-29 18:58:25 +02:00
Jakub Beránek 1313e958c8 Disable debuginfo when building GCC 2025-12-29 17:49:45 +01:00
Jonathan Brouwer 2c89d1c2a0 Rollup merge of #150483 - RalfJung:miri, r=RalfJung
miri subtree update

Subtree update of `miri` to https://github.com/rust-lang/miri/commit/70e245140004b97a23737d3585ecb1bc57dcd61d.

Created using https://github.com/rust-lang/josh-sync.

r? `@ghost`
2025-12-29 17:17:57 +01:00
bors 8cd58dd99d Auto merge of #148332 - jyn514:cargo-deny-warnings, r=Kobzol
bootstrap: Use cargo's `build.warnings=deny` rather than -Dwarnings

This has two major advantages. First, it makes us less dependent on the rustc shim, which is nice but not super important. More importantly, it gives us much nicer caching properties.

Previously, `x build --warnings warn && x build --warnings deny` would rebuild all of bootstrap, and if there were any warnings emitted on the last build of the compiler, they would *not* fail the build, because cargo would cache the output rather than rerunning the shim.

After this change, bootstrap rebuilds instantly, and cargo knows that it should fail the build but *without* invalidating the cache.

<details><summary>An example of rebuilding bootstrap after a switch from warn->deny:</summary>

```
INFO: Downloading and building bootstrap before processing --help command.
      See src/bootstrap/README.md for help with common commands.
Building bootstrap
   Compiling bootstrap v0.0.0 (/Users/jyn/src/ferrocene3/src/bootstrap)
warning: unused variable: `x`
    --> src/bootstrap/src/core/builder/mod.rs:1792:13
     |
1792 |         let x: ();
     |             ^
     |
     = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default
help: if this is intentional, prefix it with an underscore
     |
1792 |         let _x: ();
     |             +
help: you might have meant to pattern match on the similarly named constant `_`
     |
1792 -         let x: ();
1792 +         let utils::render_tests::_: ();
     |

warning: `bootstrap` (lib) generated 1 warning (run `cargo fix --lib -p bootstrap` to apply 1 suggestion)
    Finished `dev` profile [unoptimized] target(s) in 5.14s
error: warnings are denied by `build.warnings` configuration
failed to run: /Users/jyn/src/ferrocene3/build/aarch64-apple-darwin/stage0/bin/cargo build --jobs=default --manifest-path /Users/jyn/src/ferrocene3/src/bootstrap/Cargo.toml -Zroot-dir=/Users/jyn/src/ferrocene3 -Zwarnings
```

</details>

building the compiler from scratch with `deny`: https://gist.github.com/jyn514/493ed26c2aa6f61bf47c21e75efa2175

<details><summary>and rebuilding the compiler after switching from deny->warn (note that it reuses the whole cache, there are no invalidations):</summary>

```
$ x c compiler
Building bootstrap
    Finished `dev` profile [unoptimized] target(s) in 0.15s
Checking stage1 compiler artifacts{rustc-main, rustc_abi, rustc_arena, rustc_ast, rustc_ast_ir, rustc_ast_lowering, rustc_ast_passes, rustc_ast_pretty, rustc_attr_parsing, rustc_baked_icu_data, rustc_borrowck, rustc_builtin_macros, rustc_codegen_llvm, rustc_codegen_ssa, rustc_const_eval, rustc_data_structures, rustc_driver, rustc_driver_impl, rustc_error_codes, rustc_error_messages, rustc_errors, rustc_expand, rustc_feature, rustc_fluent_macro, rustc_fs_util, rustc_graphviz, rustc_hashes, rustc_hir, rustc_hir_analysis, rustc_hir_id, rustc_hir_pretty, rustc_hir_typeck, rustc_incremental, rustc_index, rustc_index_macros, rustc_infer, rustc_interface, rustc_lexer, rustc_lint, rustc_lint_defs, rustc_llvm, rustc_log, rustc_macros, rustc_metadata, rustc_middle, rustc_mir_build, rustc_mir_dataflow, rustc_mir_transform, rustc_monomorphize, rustc_next_trait_solver, rustc_parse, rustc_parse_format, rustc_passes, rustc_pattern_analysis, rustc_privacy, rustc_proc_macro, rustc_public, rustc_public_bridge, rustc_query_impl, rustc_query_system, rustc_resolve, rustc_sanitizers, rustc_serialize, rustc_session, rustc_span, rustc_symbol_mangling, rustc_target, rustc_thread_pool, rustc_trait_selection, rustc_traits, rustc_transmute, rustc_ty_utils, rustc_type_ir, rustc_type_ir_macros, rustc_windows_rc} (stage0 -> stage1, aarch64-apple-darwin)
warning: function `foo` is never used
  --> compiler/rustc_hashes/src/lib.rs:16:4
   |
16 | fn foo() {}
   |    ^^^
   |
   = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default

warning: `rustc_hashes` (lib) generated 1 warning
    Finished `release` profile [optimized + debuginfo] target(s) in 0.53s
Build completed successfully in 0:00:08
```

</details>

thanks to `@epage` for the help finding this!

r? bootstrap
2025-12-29 15:29:00 +00:00
dfireBird bb4d75f123 fix clippy errors 2025-12-29 20:25:25 +05:30
dfireBird b0ff5733bb feat: implement configuration to change subcommand for test and bench 2025-12-29 20:09:47 +05:30
Ralf Jung d1c8e9342c Merge pull request #4796 from RalfJung/data-race-ice
fix ICE for particular data race situations
2025-12-29 12:23:47 +00:00
Matthias Krüger fc8230ffd9 Rollup merge of #150458 - RalfJung:miri-doctests, r=bjorn3
fix running stdlib doctests in Miri in CI

r? `@bjorn3`
2025-12-29 12:59:11 +01:00
Matthias Krüger 19907e67d7 Rollup merge of #150427 - ZuseZ4:offload-testinfra, r=jieyouxu
add has_offload/needs-offload to the test infra

unblocks: https://github.com/rust-lang/rust/pull/150426

Mostly copied from https://github.com/rust-lang/rust/pull/131044
lmk if some of these changes should land separately?

r? jieyouxu
2025-12-29 12:59:10 +01:00
Matthias Krüger f67b02087d Rollup merge of #150108 - ZuseZ4:offload-build-rework, r=Kobzol
Offload: Build offload as a single Step

r? `@Kobzol`

Since it looks like we'll postpone enabling offload in CI for a bit, I factored out these improvements which we want independently. I locally tested both build options successfully, the in-tree-clang build, as well as the build where we provide a path to an external clang.
2025-12-29 12:59:09 +01:00
Ralf Jung a6c2e50e82 fix ICE for particular data race situations 2025-12-29 12:58:15 +01:00
Manuel Drehwald 6e0b610049 document the needs-enzyme flag 2025-12-29 02:48:36 -08:00
Manuel Drehwald 7ee7d446bf add has_offload/needs-offload to the test infra 2025-12-29 02:47:53 -08:00
Lukas Wirth 00f80b4355 Merge pull request #21362 from ChayimFriedman2/compress-spans-v2
internal: Preparations for span compression
2025-12-29 08:30:19 +00:00
bors 112a274275 Auto merge of #150348 - GuillaumeGomez:update-askama, r=kobzol,jieyouxu
Update askama version to `0.15`

New release comes with lots of improvements like improved compile-time. More information here: https://github.com/askama-rs/askama/releases/tag/v0.15.0

r? `@yotamofek`
2025-12-29 05:34:33 +00:00
The Miri Cronjob Bot 00af23f7aa Merge ref '7fefa09b90ca' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: 7fefa09b90
Filtered ref: 22e92bfe253dbac1f2e9f2501509aa94af530cb1
Upstream diff: https://github.com/rust-lang/rust/compare/23d01cd2412583491621ab1ca4f1b01e37d11e39...7fefa09b90ca57b8a0e0e4717d672d38a0ae58b5

This merge was created using https://github.com/rust-lang/josh-sync.
2025-12-29 05:12:45 +00:00
The Miri Cronjob Bot 2d35541eb5 Prepare for merging from rust-lang/rust
This updates the rust-version file to 7fefa09b90.
2025-12-29 05:04:35 +00:00
Chayim Refael Friedman 175e297e58 Make tt::Literal use one Symbol for the text and the suffix
That shrinks it, which is useless now (it's not the dominant factor), but will become important when we'll implement span compression.
2025-12-29 05:05:47 +02:00
Chayim Refael Friedman 49b6f677a5 Separate the public tt API from how they're stored
And don't provide any insight into the actual storage (no references, no "cheat" methods like `flat_tokens()`), as we're going to rewrite it to be more memory efficient.
2025-12-29 04:14:12 +02:00
Jonathan Brouwer ef835a83ee Rollup merge of #149667 - Shinonn23:fix-ice-constblock-148138, r=dianne
Fix ICE by rejecting const blocks in patterns during AST lowering (closes #148138)

This PR fixes the ICE reported in rust-lang/rust#148138.

The root cause is that `const` blocks aren’t allowed in pattern position, but the AST lowering logic still attempted to create `PatExprKind::ConstBlock`, allowing invalid HIR to reach type checking and trigger a `span_bug!`.

Following the discussion in the issue, this patch removes the `ConstBlock` lowering path from `lower_expr_within_pat`. Any `ExprKind::ConstBlock` inside a pattern is now handled consistently with other invalid pattern expressions.

A new UI test is included to ensure the compiler reports a proper error and to prevent regressions.

Closes rust-lang/rust#148138.
2025-12-28 22:52:31 +01:00
Jonathan Brouwer 30618bb89c Rollup merge of #148321 - Marcondiro:master, r=Mark-Simulacrum
parser/lexer: bump to Unicode 17, use faster unicode-ident

Hello,

Bump the unicode version used by lexer/parser to 17.0.0 by updating:
- `unicode-normalization` to 0.1.25
- `unicode-properties` to 0.1.4
- `unicode-width` to 0.2.2

and by replacing `unicode-xid` with `unicode-ident` which is also 6 times faster.
I think it might be worth to run the benchmarks to double check.
(`unicode-ident` is already in `src/tools/tidy/src/deps.rs`)

Thanks!
2025-12-28 22:52:29 +01:00
Guillaume Gomez 45592688cf Update askama version to 0.15 in generate-copyright 2025-12-28 20:49:17 +01:00
Guillaume Gomez 5c1df0d0fa Update askama version to 0.15 in citool 2025-12-28 20:47:23 +01:00
Guillaume Gomez ac5a9d8815 Update askama version to 0.15 in librustdoc 2025-12-28 20:45:28 +01:00
Jonathan Brouwer 2ecaa1df2d Rollup merge of #150460 - RalfJung:miri-manually-drop, r=dtolnay
fix ManuallyDrop::into_inner aliasing (Miri) issues

Fixes https://github.com/rust-lang/miri/issues/4793

r? `@WaffleLapkin`
2025-12-28 18:16:11 +01:00