Commit graph

315725 commits

Author SHA1 Message Date
Jonathan Brouwer
322be0cdee Remove the 4 failing tests from rustdoc-gui
(cherry picked from commit bce8c00e2f)
2026-02-06 08:34:18 -08:00
Guillaume Gomez
34f6f4827d Move remaining doc attribute parsing errors to warnings
(cherry picked from commit c910511cab)
2026-02-05 11:44:34 -08:00
Guillaume Gomez
d8ac42edd1 Make more doc attribute parsing error into future warnings
(cherry picked from commit 6d713489d0)
2026-02-05 11:38:02 -08:00
Guillaume Gomez
9126c7a0b7 Emit a future error warning for duplicate doc attribute
(cherry picked from commit 7dbbab63e2)
2026-02-05 11:36:45 -08:00
Trevor Gross
dcea3c7ea3 Revert "Enable outline-atomics by default on AArch64 Windows platforms"
This reverts commit 1ed1b6e267.

(cherry picked from commit 9fb68d60ef)
2026-02-05 11:36:35 -08:00
Trevor Gross
4afad17828 Revert "Enable outline-atomics by default on AArch64 Android"
This reverts commit c455903978.

(cherry picked from commit 1173034b7b)
2026-02-05 11:36:35 -08:00
Trevor Gross
b5e2de23c2 Revert "Enable outline-atomics by default on AArch64 Fuchsia"
This reverts commit 21525f862d.

(cherry picked from commit a9da102e20)
2026-02-05 11:36:35 -08:00
Trevor Gross
610c87797c Revert "Enable outline-atomics by default on AArch64 OpenBSD"
This reverts commit 66c150c1fa.

(cherry picked from commit 63e16520a2)
2026-02-05 11:36:35 -08:00
Trevor Gross
e9a79f3f76 Revert "Enable outline-atomics by default on AArch64 FreeBSD"
This reverts commit 383053e016.

(cherry picked from commit 54f88be3cd)
2026-02-05 11:36:35 -08:00
mu001999
c226970869 Parse ident with allowing recovery when trying to recover in diagnosing
(cherry picked from commit 3713512217)
2026-02-05 11:36:26 -08:00
Josh Stone
b90149755a Replace stdarch version placeholders with 1.94 2026-02-05 11:30:41 -08:00
bors
23a44d3c70 Auto merge of #151605 - Mark-Simulacrum:beta-next, r=Mark-Simulacrum
[beta] Switch to released 1.93 artifacts

Last part of 1.93 release.

https://forge.rust-lang.org/release/process.html#beta-stage0-update-friday

r? @Mark-Simulacrum
2026-01-25 06:38:02 +00:00
Mark Rousskov
8065524b58 Switch to released 1.93 artifacts 2026-01-24 13:47:14 -05:00
bors
9b1f8ff42d Auto merge of #151370 - Mark-Simulacrum:beta-next, r=Mark-Simulacrum
[beta] prepare 1.94 beta

https://forge.rust-lang.org/release/process.html#beta-pr

r? @Mark-Simulacrum
2026-01-19 19:45:12 +00:00
Mark Rousskov
9118d50436 Set channel to beta 2026-01-19 09:27:26 -05:00
Mark Rousskov
5d1cb2526b Replace version placeholders with 1.94 2026-01-19 09:26:42 -05:00
bors
cd7ad97987 Auto merge of #151190 - estebank:const-default-hashmap, r=oli-obk
Add `const Default` impls for `HashSet` and `HashMap` with custom `Hasher`

Follow up to rust-lang/rust#134628. Tracking issue rust-lang/rust#143894.

r? @fmease

cc @fee1-dead @oli-obk

This doesn't allow for `const H: HashSet<()> = Default::default();`, but would allow for it to work with a custom hasher, which would enable the `Fx*` family to work.
2026-01-17 21:13:35 +00:00
bors
fe98ddcfcf Auto merge of #151232 - fmease:rustdoc-dont-eval-assoc-consts, r=yotamofek
rustdoc: Stop unconditionally evaluating the initializer of associated consts

See the descriptions of the added tests for details.

Fixes rust-lang/rust#131625.
Fixes [after beta-1.93 backport] rust-lang/rust#149635.
Fixes rust-lang/rust#150312.

Supersedes rust-lang/rust#150629 IINM.

CC @cuviper (https://github.com/rust-lang/rust/issues/149635#issuecomment-3761125727)
r? @GuillaumeGomez or @yotamofek (rust-lang/rust#150629)
2026-01-17 16:15:18 +00:00
León Orell Valerian Liehr
ac8e8505b7
rustdoc: Stop unconditionally evaluating the initializer of associated consts 2026-01-17 12:12:36 +01:00
bors
9f6cd6defb Auto merge of #151085 - Keith-Cancel:mgca2, r=BoxyUwU
Fix ICE: When Trying to check visibility of a #[type_const], check RHS instead.

This PR fixes https://github.com/rust-lang/rust/issues/150956 for min_const_generic_args https://github.com/rust-lang/rust/issues/132980. 

The first part of this PR checks in `reachable.rs` if we have a type const use `visit_const_item_rhs(init);` instead of calling `const_eval_poly_to_alloc()`

The second part is I noticed that if `const_eval_poly_to_alloc()` returns a `ErrorHandled::TooGeneric` then switches to `visit_const_item_rhs()`. So further up `const_eval_poly_to_alloc()` call order it eventual gets to `eval_in_interpreter()`. So I added a debug_assert in `eval_in_interpreter()` if we happen to try and run CTFE on a `type_const`.

The other bit is just a test case, and some duplicated code I noticed.

While the PR does get rid of the ICE for a type_const with `pub` visibility. If I try using the const though it will ICE with the following:
```
error: internal compiler error: /home/keith/GitHub/rust_kc/compiler/rustc_const_eval/src/check_consts/qualifs.rs:355:13: expected ConstKind::Param or ConstKind::Value here, found UnevaluatedConst { def: DefId(20:4 ~ colorkit[c783]::TYPE_CONST), args: [] }


thread 'rustc' (819687) panicked at /home/keith/GitHub/rust_kc/compiler/rustc_const_eval/src/check_consts/qualifs.rs:355:13:
```

I suspect it is a similar issue to inherent associated consts. Since if I apply the same fix I had here:
https://github.com/rust-lang/rust/pull/150799#discussion_r2676504639

I then can use the const  internally and in external crates without any issues.
Although, did not include that fix since if it is a similar issue it would need to be addressed elsewhere.

r? @BoxyUwU 
@rustbot label +F-associated_const_equality +F-min_generic_const_args
2026-01-17 09:45:42 +00:00
bors
844f13103a Auto merge of #151228 - cyrgani:less-feature, r=jhpratt
remove multiple unhelpful `reason = "..."` values from `#[unstable(...)]` invocations

The vast majority of `#[unstable()]` attributes already has no explicit reason specified. This PR removes the `reason = "..."` value for the following unhelpful or meaningless reasons: 
* "recently added"
* "new API"
* "recently redesigned"
* "unstable"

An example of how the message looks with and without a reason:

```rust
fn main() {
    Vec::<()>::into_parts;
    Vec::<()>::const_make_global;
}
```

```
error[E0658]: use of unstable library feature `box_vec_non_null`: new API
 --> src/main.rs:2:5
  |
2 |     Vec::<()>::into_parts;
  |     ^^^^^^^^^^^^^^^^^^^^^
  |
  = note: see issue #130364 <https://github.com/rust-lang/rust/issues/130364> for more information
  = help: add `#![feature(box_vec_non_null)]` to the crate attributes to enable
  = note: this compiler was built on 2026-01-15; consider upgrading it if it is out of date

error[E0658]: use of unstable library feature `const_heap`
 --> src/main.rs:3:5
  |
3 |     Vec::<()>::const_make_global;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: see issue #79597 <https://github.com/rust-lang/rust/issues/79597> for more information
  = help: add `#![feature(const_heap)]` to the crate attributes to enable
  = note: this compiler was built on 2026-01-15; consider upgrading it if it is out of date
```

Most of the remaining reasons after this are something similar to "this is an implementation detail for XYZ" or "this is not public". If this PR is approved, I'll look into those next. 

The PR also removes the `fd_read` feature gate. It only consists of one attribute applied to an implementation inside a module that is already private and unstable and should not be needed.
2026-01-17 06:27:42 +00:00
Keith-Cancel
4c93efae2b Fix ICE: When Trying to check visibility of a #[type_const], check RHS instead.
We want to evaluate the rhs of a type_const.

Also added an early return/guard in eval_in_interpreter which is used in functions like `eval_to_allocation_raw_provider`

Lastly add a debug assert to `thir_body()` if we have gotten there with a type_const something as gone wrong.

Get rid of a call to is_type_const() and instead use a match arm.

Change this is_type_const() check to a debug_assert!()

Change to use an if else statment instead.

Update type_const-pub.rs

Fix formatting.

Noticed that this is the same check as is_type_const() centralize it.

Add test case for pub type_const.
2026-01-16 20:30:58 -08:00
bors
defdb83d4b Auto merge of #151234 - Zalathar:rollup-mtOIaDC, r=Zalathar
Rollup of 5 pull requests

Successful merges:

 - rust-lang/rust#151092 (Generate macro expansion for rust compiler crates docs)
 - rust-lang/rust#151120 (Fix deprecated attribute intra-doc link not resolved in the right location on reexported item)
 - rust-lang/rust#151207 (Preliminary match/capture test cleanup for PR 150681)
 - rust-lang/rust#151221 (Reorganizing `tests/ui/issues` 5 tests [1/N])
 - rust-lang/rust#151222 (feat: Support references in reflection type info)

r? @ghost
2026-01-17 03:10:02 +00:00
Stuart Cook
2956932345
Rollup merge of #151222 - reflect-references, r=oli-obk
feat: Support references in reflection type info

Tracking issue: https://github.com/rust-lang/rust/issues/146922 `#![feature(type_info)]`

Based on rust-lang/rust#151119 implementation for pointers for consistency

r? oli-obk
2026-01-17 11:47:20 +11:00
Stuart Cook
f0d961a398
Rollup merge of #151221 - reorganize-ui-tests, r=Kivooeo
Reorganizing `tests/ui/issues` 5 tests [1/N]

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

r? Kivooeo
2026-01-17 11:47:19 +11:00
Stuart Cook
bd909dd5c3
Rollup merge of #151207 - always-discriminate-prelim, r=Zalathar
Preliminary match/capture test cleanup for PR 150681

Review for rust-lang/rust#150681 requested that this cleanup gets extracted to a separate PR.

r? @Zalathar
2026-01-17 11:47:19 +11:00
Stuart Cook
176bf87df0
Rollup merge of #151120 - ice-deprecated-note-on-reexport, r=lolbinarycat
Fix deprecated attribute intra-doc link not resolved in the right location on reexported item

Fixes https://github.com/rust-lang/rust/issues/151028.
Follow-up of https://github.com/rust-lang/rust/pull/150721.

So when we resolve an intra-doc link, its current context (the module from which we resolve in short) is very important. However, when we use an intra-doc link in a `#[deprecated]` attribute on a reexported item, we were using the context of the reexported item and not of the `use` itself. Meaning that if you have an intra-doc link `std::mem::drop` on an item from another crate (let's say `core`), then the import will simply fail since there is no `std` dependency.

Now comes the not so funny fix: at this point, we don't know anymore where the attribute came from (ie, from the reexport or from the reexported item) since we already merged the attribute at this point. The solution I found to go around this problem is to check if the item span contains the attribute, and if not, then we use the `inline_stmt_id` as context instead of the item's ID. I'm not super happy and I'm sure we'll find corner cases in the future (like with macros), however there are a few things that mitigate this fix:
1. The only way to generate an attribute with a macro with its item while having different spans is by using proc-macros. In that case, we can always default to the `inline_stmt_id` as context and be fine, but I guess we'll see when get there.
2. It only concerns reexports, so the area of the problem is quite restricted.

Hopefully this explanation made sense. :)

cc @folkertdev
r? @lolbinarycat
2026-01-17 11:47:18 +11:00
Stuart Cook
3157d50d5b
Rollup merge of #151092 - generate-macro-expansion-compiler-crates-docs, r=jieyouxu
Generate macro expansion for rust compiler crates docs

Re-enable https://github.com/rust-lang/rust/pull/150022, which was disabled in https://github.com/rust-lang/rust/pull/149831 because some fixes hadn't been merged then.

r? @jieyouxu
2026-01-17 11:47:18 +11:00
Jamie Hill-Daniel
c7031e93c5 feat: Support references in reflection type info 2026-01-17 00:25:29 +00:00
bors
1a9f1686b2 Auto merge of #151225 - weihanglo:update-cargo, r=weihanglo
Update cargo submodule

15 commits in 8c133afcd5e0d69932fe11f5907683723f8d361d..85eff7c80277b57f78b11e28d14154ab12fcf643
2026-01-09 03:50:15 +0000 to 2026-01-15 16:18:08 +0000
- fix(lockfile): switch to `resolver.lockfile-path` config (rust-lang/cargo#16510)
- Moved build-script bins to `deps` directory (rust-lang/cargo#16515)
- Invalidate the whole build cache when `-Zno-embed-metadata` changes (rust-lang/cargo#16513)
- Do not create examples dir in build dir with new layout (rust-lang/cargo#16514)
- fix(git): avoid partial oid got zero padded (rust-lang/cargo#16511)
- Optimize cargo locate-project --workspace (rust-lang/cargo#16423)
- chore: Update typos (rust-lang/cargo#16507)
- refactor(git): remove unnecessary serialization (rust-lang/cargo#16505)
- fix(build-std): std link metadata propagate to user (rust-lang/cargo#16496)
- Improve error message for missing dependencies (rust-lang/cargo#16500)
- fix: preserve `dep_name` for build script metadata  (rust-lang/cargo#16494)
- refactor(toml): clarify `to_dependency` for config patch (rust-lang/cargo#16492)
- Add `--id` flag to `cargo report timings` and `cargo report rebuilds` (rust-lang/cargo#16490)
- Display lockfile path in very verbose mode when blocking (rust-lang/cargo#16491)
- fix(info): resolve underscore vs hyphen mismatch in schema lookup (rust-lang/cargo#16455)

r? ghost
2026-01-16 23:50:37 +00:00
Weihang Lo
500c94f945
Update cargo submodule 2026-01-16 15:45:53 -05:00
bors
f6a07efc81 Auto merge of #151224 - matthiaskrgr:rollup-SLK4owB, r=matthiaskrgr
Rollup of 4 pull requests

Successful merges:

 - rust-lang/rust#151196 (Ship LLVM (`rust-dev`) in fast try builds again)
 - rust-lang/rust#151198 (Add an additional help note to the ambiguity lint error)
 - rust-lang/rust#151215 (Add missing closing brackets to THIR output.)
 - rust-lang/rust#151218 (compiletest: Add `AuxCrate` struct with docs.)

r? @ghost
2026-01-16 20:33:57 +00:00
Matthias Krüger
2c2b62260b
Rollup merge of #151218 - crate-struct, r=clubby789
compiletest: Add `AuxCrate` struct with docs.

To make the code clearer.
2026-01-16 21:04:32 +01:00
Matthias Krüger
cfa8f97999
Rollup merge of #151215 - thir-mismatched-brackets-and-field-names, r=bjorn3
Add missing closing brackets to THIR output.

Closing brackets were missing on AdtDef, the field_types list in FruInfo, and InlineAsmExpr, breaking folding in some editors; Fields were incorrectly (?) indexed in the list for functional update syntax, showing the (implicit, irrelevant) iteration index instead of the field index; also spurious colon after Pat.
2026-01-16 21:04:32 +01:00
Matthias Krüger
64f318e6f2
Rollup merge of #151198 - ambiguity_fix_help, r=petrochenkov
Add an additional help note to the ambiguity lint error

This PR adds an additional help note to the ambiguity lint error output to ask users updating their dependencies. This hopefully helps with cases like rust-lang/rust#149845 where newer crate versions are fixed.

r? @petrochenkov
2026-01-16 21:04:32 +01:00
Matthias Krüger
eb5b70a8b4
Rollup merge of #151196 - try-builds-llvm, r=jieyouxu
Ship LLVM (`rust-dev`) in fast try builds again

https://github.com/rust-lang/rust/pull/142963 stopped shipping `rust-dev` in fast try builds, which was not actually correct, because if a PR modifies the LLVM submodule, we should provide the prebuilt LLVM for rustc-perf even in a (fast) try build. So why didn't we find out about this earlier? Well, because soon before that PR landed, we started using new bors for try builds, which actually broke bootstrap's git change detection logic, because new bors used a different e-mail address for merge commits.

So the two bugs kind of masked each other out. Recently, we fixed the e-mail address and git change detection with new bors, since it's now also used for auto builds, but that in turn broke fast try builds that modify LLVM (https://github.com/rust-lang/rust/pull/150722#issuecomment-3756545084), because rustc-perf saw that LLVM was modified in the try build, and it (correctly!) tried to download `rust-dev` for the given try build commit, but that was (incorrectly!) missing on CI, due to being skipped.

This PR restored building the `rust-dev` component in fast try builds. In theory, we could use the same git detection logic that bootstrap uses and only do this if LLVM is actually modified in the given commit, but I'd rather do the correct thing here, than introduce additional opportunities for the git detection to desync.
2026-01-16 21:04:31 +01:00
tuturuu
b323651ded
move struct_pattern_on_tuple_enum to ui/pattern 2026-01-16 20:55:37 +01:00
Martin Nordholts
4530e26f4e compiletest: Add AuxCrate struct with docs.
To make the code clearer.
2026-01-16 18:41:37 +01:00
tuturuu
9d1a1ae298
add tests metadata, regenerate stderr 2026-01-16 18:17:35 +01:00
tuturuu
bad82f22a9
move tests 2026-01-16 18:17:35 +01:00
bors
503745e917 Auto merge of #151210 - matthiaskrgr:rollup-JwDAUuv, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - rust-lang/rust#145354 (Cache derive proc macro expansion with incremental query)
 - rust-lang/rust#151123 (Support primitives in type info reflection)
 - rust-lang/rust#151178 (simplify words initialization using Rc::new_zeroed)
 - rust-lang/rust#151187 (Use `default_field_values` more in `Resolver`)
 - rust-lang/rust#151197 (remove lcnr from compiler review rotation)
 - rust-lang/rust#151203 (Revert `QueryStackFrame` split)

r? @ghost
2026-01-16 16:44:08 +00:00
Esteban Küber
5f58acba52 Add const Default impls for HashSet and HashMap with custom Hasher 2026-01-16 16:32:26 +00:00
Alex Celeste
1f691f7dbd Add missing closing brackets to THIR output.
Closing brackets were missing on AdtDef, the field_types list in FruInfo, and InlineAsmExpr, breaking folding in some editors;
Fields were incorrectly (?) indexed in the list for functional update syntax, showing the (implicit, irrelevant) iteration index instead of the field index;
also spurious colon after Pat.
2026-01-16 14:44:58 +00:00
cyrgani
035bcfa46d remove reason = "unstable" from #[unstable(...)] 2026-01-16 13:54:40 +00:00
Jakub Beránek
41daada3bb
Ship LLVM (rust-dev) in fast try builds again 2026-01-16 14:49:33 +01:00
cyrgani
8cb5da3aad remove reason = "recently redesigned" from #[unstable(...)] 2026-01-16 13:35:40 +00:00
cyrgani
69da4016aa remove reason = "new API" from #[unstable(...)] 2026-01-16 13:34:34 +00:00
cyrgani
f13b1549ce remove reason = "recently added" from #[unstable(...)] 2026-01-16 13:32:24 +00:00
cyrgani
e45e4a7cc6 delete weird fd_read feature 2026-01-16 13:31:38 +00:00
bors
b08c11df4b Auto merge of #151162 - GuillaumeGomez:cleanup-attr-parsing, r=JonathanBrouwer
Clean up `rustc_attr_parsing`

Follow-up of rust-lang/rust#150934.

It removes the `Option<>` wrapping for `SharedContext::target` field and completely removed the `target_id` field. Considering this type contains a closure and never updates its `target_id` field, there is no need to keep it around, it can be used directly in the lint emitter.

r? @JonathanBrouwer
2026-01-16 13:03:57 +00:00