Skip to content

Rollup of 14 pull requests #141067

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

Open
wants to merge 76 commits into
base: master
Choose a base branch
from
Open

Rollup of 14 pull requests #141067

wants to merge 76 commits into from

Conversation

hkBst
Copy link
Member

@hkBst hkBst commented May 16, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

tshepang and others added 30 commits May 1, 2025 07:38
The 2 commands do the same thing.
Also, follow style used elsewhere in the guide.
Fix minor typo in serialization.md
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
…ounds on generic function

Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
Align advice to discourage issue-number-only names
Fix minor typo in installation.md
Fix minor typo in rustdoc-internals.md
add rdg push git config entry for git protocol pushers
This made it look the the topic was covered in the chapter just before
the current one.
They are internal tools.
tgross35 and others added 17 commits May 15, 2025 20:57
This requires a fix to the subnormal test to cap the maximum allowed
value within the maximum mantissa.
On Fuchsia, we have an internal Gerrit mirrors of the rust repositories
to avoid excess load on the public github servers. Since rust uses
submodules, we need to then use git's `url.<base>.insteadOf` to point
our checkouts at our mirrors.

We'd prefer to be able to point all repositories under
`https://github.com/rust-lang` to
`https://rust.googlesource.com/rust-lang`, but unfortunately it seems
that when Rust mirrored Enzyme, the repository name was lower cased to
`https://github.com/rust-lang/enzyme`, but kept the name capitalized in
the .gitmodules file. This didn't cause a problem for Github, which
seems to handle repository names in a case insensitive way, Gerrit is
case sensitive, so we can't use a glob rule. Instead we have to setup
`insteadOf` rules for each repository.

This renames the URL to match the case of the repository name, which
should avoid the issue.
One could be tempted to replace the "then" `hir::Expr` with kind
`hir::ExprKind::Block` by a `hir::Block`. Explain why this would not be
a good idea.
…Simulacrum

Add `f16` formatting and parsing

Use the same algorithms as for `f32` and `f64` to implement `f16` parsing and printing.

try-job: aarch64-gnu
try-job: dist-s390x-linux
try-job: x86_64-mingw-1
try-job: x86_64-mingw-2
std: explain prefer `TryInto` over `TryFrom` when specifying traits bounds on generic function

Fixes rust-lang#140761

This PR keeps the explanations of `Into` and `From` consistent and adds explanations for `TryInto` and `TryFrom`.

r? libs
move (or remove) some impl Trait tests

Probably not actually worth the effort, so I am stopping here 😅
…tabilization, r=joboet

Remove `stable` attribute from wasi fs (read_exact|write_all)_at

The docs for [`std::os::wasi::fs::FileExt::read_exact_at`](https://doc.rust-lang.org/1.86.0/std/os/wasi/fs/trait.FileExt.html#method.read_exact_at) and [`std::os::wasi::fs::FileExt::write_all_at`](https://doc.rust-lang.org/1.86.0/std/os/wasi/fs/trait.FileExt.html#method.write_all_at) show the methods to be stable since v1.33, which is not correct and was a mistake made when the methods were added in (rust-lang#74076 (review)). The reviewer seemed to think this was an insta-stabilization, but the entire file is marked as unstable so that was not right. The stabilization version would also have been wrong either way.
fix doc for UnixStream

Doc example was using `UdpSocket` instead of `UnixStream`.
…, r=lqd

Add negative test coverage for `-Clink-self-contained` and `-Zlinker-features`

Noticed while reviewing stabilization rust-lang#140525 that we don't have any negative test coverage for these flags. Feel free to cherry-pick these tests into the stabilization PR, or we can land these before separately.

r? ``@lqd``
…ler-errors

Improve ternary operator recovery

This
- Improves the span of the error to not point at the next token
- Where possible, we use the span of the condition to further improve the span of the error to include the cond, and suggest a maybe-incorrect fix

Currently this works on free expressions, not let statements; some more refactoring would be needed to pass the span down, which I'm not sure is worth doing.

### Old
![image](https://github.com/user-attachments/assets/5688cefc-e4ef-4135-a5ba-340ce05ae6f3)

### New
![image](https://github.com/user-attachments/assets/154f5380-e0c8-42c7-9bf8-0adb3d0433fa)
Migrate to modern datetime API

# PR Summary
This small PR resolves the `datetime` library warnings:
```python
DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC). or datetime.datetime.utcnow()
```
Note that `.replace(tzinfo=None)` allows to keep the original behavior where the time appears as a naive UTC timestamp (i.e., without any timezone offset). Comparision:
```python
# With .utcnow() or .now(datetime.timezone.utc).replace(tzinfo=None)
Time,Idle
2025-05-14T15:40:25.013414,98.73417721518987

# With .now(datetime.timezone.utc)
Time,Idle
2025-05-14T15:40:25.013414+00:00,98.73417721518987
```
…pinfo_windows, r=joboet

Implement methods to set STARTUPINFO flags for Command API on Windows

Implements rust-lang#141010
rustc-dev-guide subtree update

r? ```@ghost```
…ncy-fix, r=oli-obk

Async drop fix for dropee from another crate (rust-lang#140858)

Fixes rust-lang#140858.

For `AsyncDestructor` impl def id was wrongly kept as a LocalDefId, which causes crash when dropee is declared in another crate.

Also, potential problem found:
when user crate drops type with async drop in dependency crate, and user crate doesn't enable `feature(async_drop)`, then sync drop version will be used.

Is it a problem? Do we need some notification about such situations?
ci: split the dist-ohos job

try-job: `dist-ohos-*`
Lowercase git url for rust-lang/enzyme.git

On Fuchsia, we have an internal Gerrit mirrors of the rust repositories to avoid excess load on the public github servers. Since rust uses submodules, we need to then use git's `url.<base>.insteadOf` to point our checkouts at our mirrors.

We'd prefer to be able to point all repositories under `https://github.com/rust-lang` to
`https://rust.googlesource.com/rust-lang`, but unfortunately it seems that when Rust mirrored Enzyme, the repository name was lower cased to `https://github.com/rust-lang/enzyme`, but kept the name capitalized in the .gitmodules file. This didn't cause a problem for Github, which seems to handle repository names in a case insensitive way, Gerrit is case sensitive, so we can't use a glob rule. Instead we have to setup `insteadOf` rules for each repository.

This renames the URL to match the case of the repository name, which should avoid the issue.
…=compiler-errors

HIR: explain in comment why `ExprKind::If` "then" is an `Expr`

One could be tempted to replace the "then" `hir::Expr` with kind `hir::ExprKind::Block` by a `hir::Block`. Explain why this would not be a good idea.

I've been there.

r? `@compiler-errors`
@rustbot rustbot added A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc A-tidy Area: The tidy tool O-unix Operating system: Unix-like O-wasi Operating system: Wasi, Webassembly System Interface O-wasm Target: WASM (WebAssembly), http://webassembly.org/ 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-infra Relevant to the infrastructure 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. labels May 16, 2025
@rustbot
Copy link
Collaborator

rustbot commented May 16, 2025

Error: Label rollup can only be set by Rust team members

Please file an issue on GitHub at triagebot if there's a problem with this bot, or reach out on #t-infra on Zulip.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc A-tidy Area: The tidy tool O-unix Operating system: Unix-like O-wasi Operating system: Wasi, Webassembly System Interface O-wasm Target: WASM (WebAssembly), http://webassembly.org/ 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-infra Relevant to the infrastructure 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.