Skip to content

Rollup of 8 pull requests #141710

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 61 commits into from
Closed

Conversation

tgross35
Copy link
Contributor

@tgross35 tgross35 commented May 28, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

tbu- and others added 30 commits March 23, 2025 19:54
It uses the file metadata on Unix with a fallback for files incorrectly
reported as zero-sized. It uses `GetFileSizeEx` on Windows.

This reduces the number of syscalls needed for determining the file size
of an open file from 3 to 1.
It can only describe the inner workings of the default implementation,
other implementations might not be implemented using seeks at all.
The current default plain, tends to create non-uniform import blocks over time, some being relative, some being absolute.
I believe we should encourage a different default here.
By removing the cache.
Previously only the open delimiter's span was set, and this caused... weird problems.
…egrated-benchmarks

internal: fix `integrated_benchmarks` to make actual edits
fix: Correctly set the span of the proc_macro crate's Group delimiters
fix: Fix cache problems with lints level
minor: Support `transmute_unchecked` intrinsic for mir-eval
Remove rust-analyzer.vs from other editors
The implementation delegates to `<ByteStr as Display>::fmt`.

Link: rust-lang/libs-team#550
Link: rust-lang#139984.
It wasn't inside the source, because there was no source map.
…rmation instead of syntactical hacks

And rename it to `is_inside_macro_call()` accordingly.
fix: Properly implement `might_be_inside_macro_call()` using semantic information instead of syntactical hacks
…austiveness

fix: Normalize when checking for uninhabited types for pattern exhaustiveness checking
fixes: ide-assists, generate_new indent loses
Change import prefix default to be by crate
…it-impl-indent

fix: ide-assists, generate mut trait impl indent
…macro-hir

fix: Fix IDE resolution of item macros
tgross35 added 7 commits May 28, 2025 17:56
…ross,bjorn3

Stabilize `repr128`

## Stabilisation report

The `repr128` feature ([tracking issue](rust-lang#56071)) allows the use of `#[repr(u128)]` and `#[repr(i128)]` on enums in the same way that other primitive representations such as `#[repr(u64)]` can be used. For example:

```rust
#[repr(u128)]
enum Foo {
    One = 1,
    Two,
    Big = u128::MAX,
}

#[repr(i128)]
enum Bar {
    HasThing(u16) = 42,
    HasSomethingElse(i64) = u64::MAX as i128 + 1,
    HasNothing,
}
```

This is the final part of adding 128-bit integers to Rust ([RFC 1504](https://rust-lang.github.io/rfcs/1504-int128.html)); all other parts of 128-bit integer support were stabilised in rust-lang#49101 back in 2018.

From a design perspective, `#[repr(u128)]`/`#[repr(i128)]` function like `#[repr(u64)]`/`#[repr(i64)]` but for 128-bit integers instead of 64-bit integers. The only differences are:

- FFI safety: as `u128`/`i128` are not currently considered FFI safe, neither are `#[repr(u128)]`/`#[repr(i128)]` enums (I discovered this wasn't the case while drafting this stabilisation report, so I have submitted rust-lang#138282 to fix this).
- Debug info: while none of the major debuggers currently support 128-bit integers, as of LLVM 20 `rustc` will emit valid debuginfo for both DWARF and PDB (PDB makes use of the same natvis that is also used for all enums with fields, whereas DWARF has native support).

Tests for `#[repr(u128)]`/`#[repr(i128)]` enums include:
- [ui/enum-discriminant/repr128.rs](https://github.com/rust-lang/rust/blob/385970f0c1fd0c09bac426b02f38300c0b1ba9a2/tests/ui/enum-discriminant/repr128.rs): checks that 128-bit enum discriminants have the correct values.
- [debuginfo/msvc-pretty-enums.rs](https://github.com/rust-lang/rust/blob/385970f0c1fd0c09bac426b02f38300c0b1ba9a2/tests/debuginfo/msvc-pretty-enums.rs): checks the PDB debuginfo is correct.
- [run-make/repr128-dwarf](https://github.com/rust-lang/rust/blob/385970f0c1fd0c09bac426b02f38300c0b1ba9a2/tests/run-make/repr128-dwarf/rmake.rs): checks the DWARF debuginfo is correct.

Stabilising this feature does not require any changes to the Rust Reference as [the documentation on primitive representations](https://doc.rust-lang.org/nightly/reference/type-layout.html#r-layout.repr.primitive.intro) already includes `u128` and `i128`.

Closes rust-lang#56071
Closes rust-lang/reference#1368

r? lang

``@rustbot`` label +I-lang-nominated +T-lang
add `CStr::display`

The implementation delegates to `<ByteStr as Display>::fmt`.

Link: rust-lang/libs-team#550
Link: rust-lang#139984.

r? ``@BurntSushi``
cc ``@Darksonn`` ``@tgross35`` ``@ojeda`` ``@joshtriplett``
Path::with_extension: show that it adds an extension where one did no…

…t exist

I think the times I encountered this, I had to check first if files without extensions were added, since all examples only had files with existing extensions.

Also, this replaced example already has a similar example below.
clean up old rintf leftovers

As usual stdarch needed special treatment due to rust-lang/stdarch#1655, and apparently I forgot to clean up these leftovers here. They can be removed now.
Add `rustc_diagnostic_item` to `sys::Mutex` methods

For an ongoing project for adding a concurrency model checker to Miri we need to be able to intercept locking/unlocking operations on standard library mutexes.

This PR adds diagnostic items to the relevant calls `lock`, `try_lock` and `unlock` for the `sys::Mutex` implementation on the targets we care about.
This PR also makes the internals of `pthread::Mutex` less public, to reduce the chance of anyone locking/unlocking a mutex without going through the intercepted methods.

r? `@RalfJung`
Subtree update of `rust-analyzer`

r? `@ghost`
…Void

Add eholk to compiler reviewer rotation

Now that we have work queue limits on triagebot, I'm happy to share some of the review load.

r? `@wesleywiser`
@rustbot rustbot added A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-run-make Area: port run-make Makefiles to rmake.rs A-rustdoc-json Area: Rustdoc JSON backend A-tidy Area: The tidy tool O-windows Operating system: Windows S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels May 28, 2025
@tgross35
Copy link
Contributor Author

@bors r+ rollup=never p=5

@rustbot rustbot added the rollup A PR which is a rollup label May 28, 2025
@bors
Copy link
Collaborator

bors commented May 28, 2025

📌 Commit 9d394b9 has been approved by tgross35

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 28, 2025
@bors
Copy link
Collaborator

bors commented May 28, 2025

⌛ Testing commit 9d394b9 with merge c16c016...

bors added a commit that referenced this pull request May 28, 2025
Rollup of 8 pull requests

Successful merges:

 - #125087 (Optimize `Seek::stream_len` impl for `File`)
 - #138285 (Stabilize `repr128`)
 - #139994 (add `CStr::display`)
 - #141477 (Path::with_extension: show that it adds an extension where one did no…)
 - #141533 (clean up old rintf leftovers)
 - #141690 (Add `rustc_diagnostic_item` to `sys::Mutex` methods)
 - #141693 (Subtree update of `rust-analyzer`)
 - #141702 (Add eholk to compiler reviewer rotation)

r? `@ghost`
`@rustbot` modify labels: rollup
@rust-log-analyzer
Copy link
Collaborator

The job dist-various-2 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@bors
Copy link
Collaborator

bors commented May 28, 2025

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels May 28, 2025
@tgross35 tgross35 closed this May 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-run-make Area: port run-make Makefiles to rmake.rs A-rustdoc-json Area: Rustdoc JSON backend A-tidy Area: The tidy tool O-windows Operating system: Windows rollup A PR which is a rollup S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.