Commit graph

316924 commits

Author SHA1 Message Date
Jubilee Young
2b0cce040d Ignore all debuginfo tests for LLDB that we do not run in CI
We only run LLDB 1500 in CI. Any test with a min-lldb-version above that
is currently ignored. It's not clear any of these tests actually work
with that LLDB version, and they definitely don't work on LLDB ~2100.
So, ignore them until we fix debuginfo testing.
2026-02-02 18:13:43 -08:00
bors
f60a0f1bcc Auto merge of #151820 - petrochenkov:packhyg3, r=nnethercote
resolve: Use `IdentKey` in `resolve_ident_in_scope_set`

Follow up to https://github.com/rust-lang/rust/pull/151550, implements https://github.com/rust-lang/rust/pull/151550#issuecomment-3792971456.

r? @nnethercote
2026-02-02 08:25:12 +00:00
bors
a60d12cbcc Auto merge of #151971 - Zalathar:rollup-KwKpKLY, r=Zalathar
Rollup of 11 pull requests

Successful merges:

 - rust-lang/rust#151756 (Avoid miri error in `slice::sort` under Stacked Borrows)
 - rust-lang/rust#147400 (TryFrom<integer> for bool)
 - rust-lang/rust#150993 (std: sys: uefi: os: Implement join_paths)
 - rust-lang/rust#151483 (Add regression test for issue rust-lang/rust#138225)
 - rust-lang/rust#151568 (Update hexagon target linker configurations)
 - rust-lang/rust#151725 (Fix outdated Debian Ports ISO reference)
 - rust-lang/rust#151895 (Move UI tests batch)
 - rust-lang/rust#151923 (Fix ICE when projection error reporting sees opaque alias terms)
 - rust-lang/rust#151947 (Include assoc const projections in CFI trait object)
 - rust-lang/rust#151948 (Handle unbalanced delimiters gracefully in make_attr_token_stream)
 - rust-lang/rust#151963 (Add regression test for negative literal in a range of unsigned type)
2026-02-02 04:41:32 +00:00
Stuart Cook
cfdd14d964
Rollup merge of #151963 - mcraeynest:main, r=Kivooeo
Add regression test for negative literal in a range of unsigned type

Simple regression test for rust-lang/rust#136514
2026-02-02 10:28:34 +11:00
Stuart Cook
7fe7cee69c
Rollup merge of #151948 - chenyukang:yukang-fix-149954-tokenstream-ice, r=Kivooeo
Handle unbalanced delimiters gracefully in make_attr_token_stream

Fixes rust-lang/rust#149954
2026-02-02 10:28:34 +11:00
Stuart Cook
d748af936b
Rollup merge of #151947 - mu001999-contrib:fix/151878, r=fmease
Include assoc const projections in CFI trait object

Fixes rust-lang/rust#151878

After https://github.com/rust-lang/rust/pull/150843, projections of trait objects should include assoc consts, but the cfi `trait_object_ty` still include only assoc types. So that we got the ICE `expected 1 projection but got 0`.
2026-02-02 10:28:34 +11:00
Stuart Cook
be3bf8276d
Rollup merge of #151923 - TaKO8Ki:issue-151331-opaque-alias-relate, r=Kivooeo,fmease
Fix ICE when projection error reporting sees opaque alias terms

Fixes rust-lang/rust#151331
2026-02-02 10:28:33 +11:00
Stuart Cook
393ce4ba38
Rollup merge of #151895 - Delta17920:move-ui-tests-batch, r=Kivooeo
Move UI tests batch

moved few tests

r? @Kivooeo
2026-02-02 10:28:33 +11:00
Stuart Cook
f59d2ebf61
Rollup merge of #151725 - zzaekkii:debian-cdimage-ports, r=Noratrieb
Fix outdated Debian Ports ISO reference

### Location (URL)
https://doc.rust-lang.org/rustc/platform-support/m68k-unknown-none-elf.html

<img width="800" alt="image" src="https://github.com/user-attachments/assets/328a032e-c4ff-4f9a-a832-eefe1944e2b8" />

### Summary
The referenced Debian Ports ISO link is outdated and no longer accessible.

This updates the link to the current Debian CD image location so readers can easily find the correct installation media.
2026-02-02 10:28:32 +11:00
Stuart Cook
39e52562fb
Rollup merge of #151568 - androm3da:bcain/hexagon_linker_cfg, r=Noratrieb
Update hexagon target linker configurations

* hexagon-unknown-qurt: Use hexagon-clang from Hexagon SDK instead of rust-lld
* hexagon-unknown-linux-musl: Use hexagon-unknown-linux-musl-clang from the open source toolchain instead of rust-lld.
* hexagon-unknown-none-elf: Keep rust-lld but fix the linker flavor.

rust-lld is appropriate for a baremetal target but for traditional programs that depend on libc, using clang's driver makes the most sense.
2026-02-02 10:28:32 +11:00
Stuart Cook
2cc38ff3fa
Rollup merge of #151483 - ThanhNguyxn:fix/add-test-issue-138225, r=Kivooeo
Add regression test for issue #138225

Adds a regression test for rust-lang#138225.

The compiler used to ICE with `ReferencesError` when compiling code with:
- An undefined type in a struct field
- An async function returning a static reference to that struct
- Optimizations enabled (`-C opt-level=1` or higher)

The bug has been fixed and now correctly reports `E0425: cannot find type`.

Test file: `tests/ui/async-await/ice-static-in-async-fn-issue-138225.rs`
Closes rust-lang/rust#138225
2026-02-02 10:28:31 +11:00
Stuart Cook
512afea218
Rollup merge of #150993 - Ayush1325:uefi-join-path, r=Mark-Simulacrum
std: sys: uefi: os: Implement join_paths

- Tested using OVMF using QEMU.

@rustbot label +O-UEFI
2026-02-02 10:28:31 +11:00
Stuart Cook
e6e2d39136
Rollup merge of #147400 - hkBst:convert-1, r=Mark-Simulacrum
TryFrom<integer> for bool

I noticed the manual TryFrom implementation in [this video from RustConf 2025](https://youtu.be/cOP219vkax8?list=PL2b0df3jKKiRFEuVNk76ufXagOgEJ9sBZ&t=1917) and thought I'd add it.
2026-02-02 10:28:30 +11:00
Stuart Cook
a57663ea65
Rollup merge of #151756 - Voultapher:fix-box-retag-in-sort, r=Mark-Simulacrum
Avoid miri error in `slice::sort` under Stacked Borrows

See comment in code.

Fixes: https://github.com/rust-lang/rust/issues/151728
2026-02-02 10:28:29 +11:00
bors
92ea9b29d1 Auto merge of #150428 - kouhe3:win-af-unix-2, r=Mark-Simulacrum
UnixStream/UnixListener on Windows 

Hi, I re impl this. Hope you test it.
2026-02-01 23:17:22 +00:00
Maarten Craeynest
f490f6420b
Add regression test for issue-136514: Negative literal in unsigned range 2026-02-01 22:49:57 +01:00
bors
57d2fb1366 Auto merge of #138405 - Zoxc:vec-cache-tweaks, r=Mark-Simulacrum
Tweak `VecCache` to improve performance

This has some tweaks to `VecCache` to improve performance.

- It saves a `compare_exchange` in `complete` using the new `put_unique` function.
- It removes bound checks on entries. These are instead checked in the `slot_index_exhaustive` test.
- `initialize_bucket` is outlined and tuned for that.

cc @Mark-Simulacrum
2026-02-01 18:57:12 +00:00
bors
8340622e14 Auto merge of #151543 - GuillaumeGomez:more-proc-macro-literal-methods, r=Amanieu
Add new `byte_value` and `char_value` methods to `proc_macro::Literal`

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

It adds two more methods to get unescaped `u8` and `char` from `proc_macro::Literal`.

r? @Amanieu
2026-02-01 15:46:27 +00:00
mu001999
990c55801e Include assoc const projections in CFI trait object 2026-02-01 22:45:43 +08:00
Guillaume Gomez
55e3d2206a Improve new proc-macro methods name 2026-02-01 15:05:57 +01:00
yukang
2bab7a02f2 Handle unbalanced delimiters gracefully in make_attr_token_stream 2026-02-01 13:16:32 +00:00
bors
b7fb220865 Auto merge of #151879 - Zoxc:try-mark-rem-arg, r=jdonszelmann
Remove the `dep_node` argument from `try_mark_previous_green`

This removes the `dep_node` argument from `try_mark_previous_green`. I think this makes it clearer that it's unused without debug assertions.
2026-02-01 12:20:52 +00:00
bors
c4dc07385e Auto merge of #151931 - sizmailov:patch-1, r=jdonszelmann
doc: Replace plain text link with md link to cargo-pgo repo

<img width="1324" height="304" alt="image" src="https://github.com/user-attachments/assets/1ee772e3-6880-4fe7-aa14-cfae4ee73b57" />

https://doc.rust-lang.org/beta/rustc/profile-guided-optimization.html#community-maintained-tools
2026-02-01 09:13:11 +00:00
delta17920
a7dea5504b rename various regression tests 2026-02-01 04:09:25 +00:00
bors
878374e07f Auto merge of #151937 - Zalathar:rollup-WdVeaxy, r=Zalathar
Rollup of 3 pull requests

Successful merges:

 - rust-lang/rust#151927 (typeck_root_def_id: improve doc comment)
 - rust-lang/rust#151907 (Rename `QueryResult` to `ActiveKeyStatus`)
 - rust-lang/rust#151928 (ty::context: clean some code a little)
2026-02-01 03:27:21 +00:00
Stuart Cook
191c915560
Rollup merge of #151928 - tshepang:patch-2, r=Kivooeo
ty::context: clean some code a little

The explicit `return` was not needed
2026-02-01 14:26:47 +11:00
Stuart Cook
0b8e9610a6
Rollup merge of #151907 - Zalathar:active-key-status, r=nnethercote
Rename `QueryResult` to `ActiveKeyStatus`

Long ago, this enum was also used to hold the cached result of a query evaluation that had completed successfully, so its name made some sense.

Nowadays, successful query evaluation is represented by an entry in the query's in-memory cache, which is a separate data structure.

So this enum only deals with “active” query keys, i.e. those for which query evaluation has started, but has not yet completed successfully.

---

The split between jobs and results was introduced by:
-  https://github.com/rust-lang/rust/pull/50102.

---

There should be no change to compiler behaviour.
2026-02-01 14:26:47 +11:00
Stuart Cook
394e519690
Rollup merge of #151927 - tshepang:patch-1, r=Kivooeo
typeck_root_def_id: improve doc comment

This was initially written to be exhaustive, but one more type that can only be type-checked with its containing item has since been added, and was not mentioned. So, make it future-proof by mentioning just the one example.

Also, a previous refactor left this less readable.
2026-02-01 14:26:46 +11:00
Zalathar
bf2536ae64 Rename QueryResult to ActiveKeyStatus 2026-02-01 14:20:20 +11:00
Sergei Izmailov
9b04184cbc
reword 2026-02-01 10:46:02 +09:00
Sergei Izmailov
e251fba475
Replace plain text link with md link to cargo-pgo repo 2026-02-01 10:42:57 +09:00
bors
a1db344c08 Auto merge of #151924 - JonathanBrouwer:rollup-Pqp8PIn, r=JonathanBrouwer
Rollup of 5 pull requests

Successful merges:

 - rust-lang/rust#151886 (Skip unused_allocation lint when method takes &Box<Self>)
 - rust-lang/rust#150300 (Constify `fmt::from_fn`)
 - rust-lang/rust#151102 (Feature-gate `mut ref` patterns in struct pattern field shorthand)
 - rust-lang/rust#151866 (Reorganizing `tests/ui/issues` 10 tests [4/N] )
 - rust-lang/rust#151890 (Re-export `hashbrown::hash_table` from `rustc_data_structures`)
2026-01-31 23:56:07 +00:00
Tshepang Mbambo
1684417326
ty::context: clean some code a little
The explicit `return` was not needed
2026-02-01 00:31:55 +02:00
Tshepang Mbambo
4e02b6db0a
typeck_root_def_id: improve doc comment
This was initially written to be exhaustive, but one more type that can only be type-checked with its containing item has since been added, and was not mentioned. So, make it future-proof by mentioning just the one example.

Also, a previous refactor left this less readable.
2026-02-01 00:00:26 +02:00
Jonathan Brouwer
d853e9e1d6
Rollup merge of #151890 - Zalathar:hash-table, r=Kivooeo
Re-export `hashbrown::hash_table` from `rustc_data_structures`

We don't always re-export shared dependencies, but for `hashbrown::hash_table` I think it makes sense, for a few reasons:

- The lower-level `HashTable` type is already part of the public API of `rustc_data_structures` via the `ShardedHashMap` type alias, and other compiler crates currently depend on being able to access its internal hash tables.
- The `Cargo.toml` entry for `hashbrown` is non-trivial, making it harder to keep in sync and harder to move between crates as needed.
  - [And we currently aren't using `[workspace.dependencies]` for various reasons.](https://github.com/rust-lang/rust/pull/146113)
- It's fine for other compiler crates to use `hash_table` specifically (with care), but they probably shouldn't be using the higher-level `hashbrown::HashMap` and `hashbrown::HashSet` types directly, because they should prefer the various map/set aliases defined by `rustc_data_structures`. Re-exporting only `hash_table` helps to discourage use of those other types.

There should be no change to compiler behaviour.
2026-01-31 21:42:47 +01:00
Jonathan Brouwer
3a54fe982f
Rollup merge of #151866 - zedddie:move-tests, r=Kivooeo
Reorganizing `tests/ui/issues` 10 tests [4/N]

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

r? Kivooeo
2026-01-31 21:42:47 +01:00
Jonathan Brouwer
70f1120363
Rollup merge of #151102 - zachs18:mut-ref-in-struct-pattern-shorthand-gate, r=JonathanBrouwer
Feature-gate `mut ref` patterns in struct pattern field shorthand

Tracking issue for `mut_ref` (and other parts of Match Ergonomics 2024): https://github.com/rust-lang/rust/issues/123076

https://github.com/rust-lang/rust/pull/123080 introduced `mut ref`[^1] patterns (for by-reference bindings where the binding itself is mutable), feature-gated behind the `mut_ref` feature, except for in struct pattern shorthand, where the feature gating was missing. Thus, `mut ref` patterns in struct pattern shorthand has been unintentionally stable for ~18 months (since 1.79.0 ([compiler explorer](https://rust.godbolt.org/z/4WTrvhboT))).

This PR adds feature-gating for `mut ref` patterns in struct pattern shorthand. Since this is reverting an accidental stabilization, this probably needs a crater run and a T-lang FCP?

Some alternative possibilities:

* Do nothing (let the inconsistency exist until `feature(mut_ref)` is stabilized)
* Document the existing behavior
* Do a FCW instead of fully feature-gating
* Stabilize `feature(mut_ref)`

CC https://github.com/rust-lang/rust/pull/123080#issuecomment-3746793632

CC @Nadrieril

[^1]: everything in this description also applies analogously to `mut ref mut` patterns.
2026-01-31 21:42:46 +01:00
Jonathan Brouwer
f580ca88ee
Rollup merge of #150300 - EFanZh:patch-1, r=dtolnay,tgross35
Constify `fmt::from_fn`

See <https://github.com/rust-lang/rust/issues/117729#issuecomment-3683047620>.
2026-01-31 21:42:46 +01:00
Jonathan Brouwer
1c6f67f659
Rollup merge of #151886 - chenyukang:yukang-fix-151846-unused-allocation-box-ref, r=petrochenkov
Skip unused_allocation lint when method takes &Box<Self>

Fixes rust-lang/rust#151846
2026-01-31 21:42:45 +01:00
bors
905b926967 Auto merge of #151622 - scottmcm:elide-more-transmutes, r=cjgillot
GVN: Elide more intermediate transmutes

We already skipped intermediate steps like `u32` or `i32` that support any (initialized) value.

This extends that to also allow skipping intermediate steps whose values are a superset of either the source or destination type.  Most importantly, that means that `usize` → `NonZeroUsize` → `ptr::Alignment` and `ptr::Alignment` → `NonZeroUsize` → `usize` can skip the middle because `NonZeroUsize` is a superset of `Alignment`.

Then `Alignment::as_usize` is updated to take advantage of that and let us remove some more locals in a few places.

r? cjgillot
2026-01-31 20:42:37 +00:00
Takayuki Maeda
c8ce14018f check if ProjectionTy or ProjectionConst
fmt
2026-02-01 05:30:01 +09:00
John Kåre Alsaker
49f9fe75ee Remove the dep_node argument from try_mark_previous_green 2026-01-31 20:21:18 +01:00
bors
8afe9ff1ca Auto merge of #151911 - JonathanBrouwer:rollup-ACi3J2a, r=JonathanBrouwer
Rollup of 3 pull requests

Successful merges:

 - rust-lang/rust#151908 (Remove unused method `DroplessArena::contains_slice`)
 - rust-lang/rust#151850 (refactor: add an `enum DerefAdjustKind` in favor of `Option<OverloadedDeref>`)
 - rust-lang/rust#151889 (Fix ICE when parsing frontmatter without newline)
2026-01-31 16:24:16 +00:00
Jonathan Brouwer
874c5d2275
Rollup merge of #151889 - chenyukang:yukang-fix-151882-frontmatter-ice, r=Kivooeo
Fix ICE when parsing frontmatter without newline

Fixes rust-lang/rust#151882

we can not add a normal test case for it:
- no newline at the end of file, we can bypass this with change test file name with `ignore-tidy`
- multiple errors in stderr, this conflicts with the previous bypass, seems we can not add multiple error annotations in one line

anyway, I added a `run-make` test for it.
2026-01-31 15:17:05 +01:00
Jonathan Brouwer
1b7a7c7514
Rollup merge of #151850 - frank-king:refactor/pin-coerce-2, r=jackh726
refactor: add an `enum DerefAdjustKind` in favor of `Option<OverloadedDeref>`

Part of rust-lang/rust#149130.

r? jackh726
2026-01-31 15:17:05 +01:00
Jonathan Brouwer
5d166b7095
Rollup merge of #151908 - Zalathar:contains-slice, r=chenyukang
Remove unused method `DroplessArena::contains_slice`

- This method was added for https://github.com/rust-lang/rust/pull/120128.
- It became unused in https://github.com/rust-lang/rust/pull/136593.

Checking whether a particular slice is within an arena is a bit of a sketchy operation, so if there's no pressing need for it then I think we're better off not having it lying around.
2026-01-31 15:17:04 +01:00
zedddie
086dc0258b
clean up some tests 2026-01-31 14:01:54 +01:00
zedddie
4df307acc1
move some tests 2026-01-31 14:00:12 +01:00
bors
78865ca937 Auto merge of #151897 - matthiaskrgr:rollup-eTQjYr5, r=matthiaskrgr
Rollup of 4 pull requests

Successful merges:

 - rust-lang/rust#151262 (Introducing clap on tidy)
 - rust-lang/rust#151896 (Revert enabling `outline-atomics` on various platforms)
 - rust-lang/rust#151849 (refactor: remove `Ty::pinned_ref` in favor of `Ty::maybe_pinned_ref`)
 - rust-lang/rust#151892 (Document enum types used as values for E0423)
2026-01-31 12:59:26 +00:00
Zalathar
e60c475471 Remove unused method DroplessArena::contains_slice 2026-01-31 22:56:49 +11:00