20612 Commits

Author SHA1 Message Date
Weihang Lo
bfc0a59ebe
docs(contrib): move docs building process to contributor guide 2025-08-18 18:25:37 -04:00
Ed Page
b2c0aea98d
Switch to using native mdbook fragment redirects (#15861)
Mdbook recently gained the ability to redirect fragments. This removes
the embedded scripts to use this mechanism instead.
2025-08-18 21:49:40 +00:00
Eric Huss
f8dc368fe3 Switch to using native mdbook fragment redirects
Mdbook recently gained the ability to redirect fragments. This removes
the embedded scripts to use this mechanism instead.
2025-08-18 14:21:36 -07:00
Eric Huss
1840e7a507
docs(profile): revert wrong statement of lto options' optimization (#15855)
There is no clear winner between fat LTO and ThinLTO, so don't say "from
most to least optimizing" here.

See https://github.com/rust-lang/cargo/pull/15841#discussion_r2281037386
2025-08-18 17:10:47 +00:00
Ed Page
dd69fab752
docs: avoid ambiguity between update and fetch (#15860)
address
<https://github.com/rust-lang/cargo/pull/15853#discussion_r2282734460>

r? epage
2025-08-18 16:45:29 +00:00
Weihang Lo
33baa940c0
docs: avoid ambiguity between update and fetch 2025-08-18 12:16:36 -04:00
Eric Huss
62537dd3ef
docs: mention how Cargo fetch git submodules (#15853)
### What does this PR try to resolve?

Clarify how git submodules are handled in Cargo for `git` dependencies.

See
https://github.com/rust-lang/cargo/issues/4247#issuecomment-3160707916
2025-08-18 15:21:27 +00:00
Weihang Lo
33cb1c2654
feat(unstable): Added -Zbuild-dir-new-layout unstable feature (#15848)
### What does this PR try to resolve?

Added `-Zbuild-dir-new-layout` unstable feature as part of #15010

I will open a follow up PR with an initial implementation as mentioned
[here](https://github.com/rust-lang/cargo/issues/15010#issuecomment-3193725891)

r? @weihanglo
2025-08-18 05:04:24 +00:00
Weihang Lo
bff04ca05e
docs(profile): revert wrong statement of lto options' optimization
There is no clear winner between fat LTO and ThinLTO,
so don't say "from most to least optimizing" here.

See https://github.com/rust-lang/cargo/pull/15841#discussion_r2281037386
2025-08-17 20:21:11 -04:00
Weihang Lo
206e3fe6b3
Implement host-target substitution (#15838)
### What does this PR try to resolve?

This PR resolves: https://github.com/rust-lang/cargo/issues/13051

Namely, it allows users to invoke cargo subcommands that accept a
`--target` directive to specify the `host` target, which is later
substituted in the command processing layer by the host's real target
triple (for instance, on most Linux distributions, `cargo build --target
host` would effectively run `cargo build --target
x86_64-unknown-linux-gnu`).

This additionally applies to usage within `config.toml`, like so:

```toml
# .cargo/config.toml

[build]
target = "host"
```
2025-08-18 00:01:34 +00:00
zdivelbiss
d5509ebacc
amend documentation style for host target specifier
We also rebuilt the manual pages, to ensure they're up-to-date with the changes made in the `host` target specifier PR.
2025-08-17 14:39:35 -05:00
Weihang Lo
65e7c7a817
docs: mention how Cargo fetch git submodules 2025-08-17 14:59:10 -04:00
zdivelbiss
8f66af7194
simplify tests for host target specifier 2025-08-17 12:54:22 -05:00
zdivelbiss
b23e0a99b2
documentation for host target specifier 2025-08-17 12:52:11 -05:00
zdivelbiss
b3f5e052f6
tests for host target specifier 2025-08-17 12:51:34 -05:00
zdivelbiss
7794d62ced
implement "host" target substitution 2025-08-17 12:51:29 -05:00
Weihang Lo
71eb84f21a
update tests to match lint message changes from rust-lang/rust#140794 (#15849)
Needed for
[rust-lang/rust#140794](https://github.com/rust-lang/rust/pull/140794)
(not merged yet).
2025-08-17 17:18:56 +00:00
Karol Zwolak
cec8eb1d16 bump rustfix version to 0.9.3 2025-08-17 18:50:55 +02:00
Karol Zwolak
fb046a1354 update tests to match lint message changes from rust-lang/rust#140794 2025-08-17 18:50:55 +02:00
Eric Huss
9c7bc45bfa
chore: downgrade to libc@0.2.174 (#15851)
### What does this PR try to resolve?

There is incompatibility between rustix@1.0.8 and libc@0.2.175 that
leads to compilation errors.

See

* https://github.com/bytecodealliance/rustix/issues/1496
* https://github.com/rust-lang/rust/pull/145478#issuecomment-3193494156

### How to test and review this PR?

In rust-lang/rust, update the `src/tools/cargo` submodule accordingly,
and run

```
cargo run --manifest-path src/ci/citool/Cargo.toml run-local dist-loongarch64-musl
```

With this downgrade it should compile.
2025-08-17 16:05:32 +00:00
Weihang Lo
eae8d0dd30
Reorder lto options in profiles.md (#15841)
Aside from `false`, the `lto` options seem to be ordered from "most
optimizing" to "least optimizing".

If this interpretation is correct, then I think `false` should go
between `thin` and `off`.

cc: @ehuss (who I think wrote that text)
2025-08-17 15:36:33 +00:00
Weihang Lo
72dabb4487
chore: downgrade to libc@0.2.174
There is incompatibility between rustix@1.0.8 and libc@0.2.175 that
leads to compilation errors.

See

* https://github.com/bytecodealliance/rustix/issues/1496
* https://github.com/rust-lang/rust/pull/145478#issuecomment-3193494156
2025-08-17 10:37:29 -04:00
Samuel Moelius
396f8c62ed
Mention ordering rationale in profiles.md
Co-authored-by: Weihang Lo <weihanglo@users.noreply.github.com>
2025-08-17 10:29:42 -04:00
Ross Sullivan
c519405582
docs(unstable): Added -Zbuild-dir-new-layout to unstable doc 2025-08-17 14:19:58 +09:00
Ross Sullivan
8e53ef3bbf
feat(unstable): Added -Zbuild-dir-new-layout unstable feature 2025-08-17 14:17:27 +09:00
Ed Page
e04e0b65c0
feat(unstable): add -Zbuild-analysis unstable feature (#15845)
### What does this PR try to resolve?

Part of #15844

Set up `-Zbuild-analysis` flag and `build.analysis` configuration table
to lay the ground work.
when `build.analysis.enabled = true`, enables HTML timing output to
pretend we are persisting timing data for now. This will change when the
storage part is implemented.

### How to test and review this PR?
2025-08-16 14:18:21 +00:00
Weihang Lo
4373786e3f
docs(unstable): add -Zbuild-analysis doc 2025-08-16 08:28:38 -04:00
Weihang Lo
b43404de7e
feat(build-analysis): build.analysis configuration
When enabled, set timing output format to HTML to pretend
we are persisting timing data for now.
2025-08-16 08:28:38 -04:00
Weihang Lo
973f7410a8
test(build-analysis): feature gate tests 2025-08-16 08:28:37 -04:00
Ed Page
a22a25b602
refactor(unstable): group stabilized features (#15846)
This was an overlook when stabilizing doctest-xcompile
2025-08-16 11:02:12 +00:00
Weihang Lo
121b80dc98
refactor(unstable): group stabilized features 2025-08-16 00:14:17 -04:00
Weihang Lo
57fd10126c
feat(unstable): add -Zbuild-analysis unstable feature 2025-08-15 23:32:31 -04:00
Ed Page
9a0712751c
Fixes error while running the cargo clippy --all-targets -- -D warning (#15843)
Fixes #15842

Before -:

<img width="895" height="701" alt="Screenshot From 2025-08-16 01-15-35"
src="https://github.com/user-attachments/assets/5e8daca4-5fad-4fc7-bb12-f67288061704"
/>

After the fix-:

<img width="831" height="107" alt="Screenshot From 2025-08-16 01-28-50"
src="https://github.com/user-attachments/assets/eb03c852-69a0-44a3-9562-f8a99dae4033"
/>
2025-08-15 20:30:47 +00:00
Weihang Lo
d1bbe63f64
Clarify that cargo doc --no-deps is cumulative and won’t delete prev (#15800)
### What does this PR try to resolve?
clarifies that cargo doc --no-deps will not delete previously-built
dependency docs, and points users to cargo clean --doc or manual
deletion if they want a truly “fresh” doc set. This pr fixed
https://github.com/rust-lang/cargo/issues/15728

### How to test and review this PR?
No testing required.
2025-08-15 20:01:27 +00:00
Ojus Chugh
0e540b2bea Fixes error while running the cargo clippy --all-targets -- -D warnings commad 2025-08-16 01:18:59 +05:30
Ojus Chugh
ff9a9c8305 fixed documentation, which fixes the concern raised in issue 15728 and regenerated pages using cargo build-man and ran ./ci/validate-man.sh 2025-08-16 00:56:15 +05:30
Samuel Moelius
0b34dd3577
Reorder lto options in profiles.md 2025-08-15 13:08:25 -04:00
Weihang Lo
c204194c52
docs: Formatting and cross-linking to build-dir/target-dir docs (#15840)
Documentation follow up on
https://github.com/rust-lang/cargo/pull/15833#discussion_r2278150419

r? @weihanglo
2025-08-15 12:18:04 +00:00
Ross Sullivan
e1969ef25a
docs: Formatting and cross-linking to build-dir/target-dir docs 2025-08-15 20:26:55 +09:00
Ed Page
2b71fd6424
Stabilize build.build-dir (#15833)
This PR stabilizes `build.build-dir` which moves intermediate build
artifacts out of `target-dir`.

* Tracking issue: #14125
* Call for testing:
https://github.com/rust-lang/cargo/issues/14125#issuecomment-3029073591
* FCP:
https://github.com/rust-lang/cargo/issues/14125#issuecomment-3029073904
* Implementation: https://github.com/rust-lang/cargo/pull/15104

Closes #14125
2025-08-15 02:30:18 +00:00
Ross Sullivan
a24ae6fd58
feat(build-dir): Stabilize build-dir 2025-08-15 11:00:01 +09:00
Ed Page
a2f54c794b
make resolve features public for cargo-as-a-library (#15835)
### What does this PR try to resolve?

While working on a [plumbing
command](https://github.com/crate-ci/cargo-plumbing) for feature
resolution, I hit a dead end where the fields and types are private.
This PR changes the needed things into `pub`.

r? @epage

### How to test and review this PR?

`cargo check`
2025-08-13 18:33:27 +00:00
secona
9e48c5af5f refactor: make resolve features public 2025-08-14 00:51:05 +07:00
Ed Page
02bcdd2983
chore(deps): bump slab from 0.4.10 to 0.4.11 (#15832)
Bumps [slab](https://github.com/tokio-rs/slab) from 0.4.10 to 0.4.11.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/tokio-rs/slab/releases">slab's
releases</a>.</em></p>
<blockquote>
<h2>v0.4.11</h2>
<ul>
<li>Fix <code>Slab::get_disjoint_mut</code> out of bounds (<a
href="https://redirect.github.com/tokio-rs/slab/issues/152">#152</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/tokio-rs/slab/blob/master/CHANGELOG.md">slab's
changelog</a>.</em></p>
<blockquote>
<h1>0.4.11 (August 8, 2025)</h1>
<ul>
<li>Fix <code>Slab::get_disjoint_mut</code> out of bounds (<a
href="https://redirect.github.com/tokio-rs/slab/issues/152">#152</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="2e5779f8eb"><code>2e5779f</code></a>
Release v0.4.11 (<a
href="https://redirect.github.com/tokio-rs/slab/issues/153">#153</a>)</li>
<li><a
href="2d65c514bc"><code>2d65c51</code></a>
Fix get_disjoint_mut error condition (<a
href="https://redirect.github.com/tokio-rs/slab/issues/152">#152</a>)</li>
<li>See full diff in <a
href="https://github.com/tokio-rs/slab/compare/v0.4.10...v0.4.11">compare
view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=slab&package-manager=cargo&previous-version=0.4.10&new-version=0.4.11)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/rust-lang/cargo/network/alerts).

</details>
2025-08-13 13:47:53 +00:00
dependabot[bot]
4eca2106bf
chore(deps): bump slab from 0.4.10 to 0.4.11
Bumps [slab](https://github.com/tokio-rs/slab) from 0.4.10 to 0.4.11.
- [Release notes](https://github.com/tokio-rs/slab/releases)
- [Changelog](https://github.com/tokio-rs/slab/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tokio-rs/slab/compare/v0.4.10...v0.4.11)

---
updated-dependencies:
- dependency-name: slab
  dependency-version: 0.4.11
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-13 00:18:01 +00:00
Eric Huss
e647065d5d
chore: remove x86_64-apple-darwin from CI and tests (#15831)
### What does this PR try to resolve?

RFC 3841 has merged, and x86_64-apple-darwin will be demoted to tier-2
in 1.90.0. In Cargo we usually run test against tier-1 platforms, so
x86_64-apple-darwin should be removed.
Also, that target platform is often the slowest one in CI, we are happy
to remove it to save us a couple of minutes.

https://rust-lang.github.io/rfcs/3841-demote-x86_64-apple-darwin.html

### How to test and review this PR?

Run `cargo test` locally with cross-compile tests enabled, and no
regression.
2025-08-12 20:48:04 +00:00
Ed Page
1a12cb22ca
chore(deps): update msrv (3 versions) to v1.87 (#15819)
This PR contains the following updates:

| Package | Update | Change | Pending |
|---|---|---|---|
| [MSRV:3](https://redirect.github.com/rust-lang/rust) | minor | `1.86`
-> `1.87` | `1.89` (+1) |

---

### Release Notes

<details>
<summary>rust-lang/rust (MSRV:3)</summary>

###
[`v1.87`](https://redirect.github.com/rust-lang/rust/blob/HEAD/RELEASES.md#Version-1870-2025-05-15)

[Compare
Source](https://redirect.github.com/rust-lang/rust/compare/1.86.0...1.87.0)

\==========================

<a id="1.87.0-Language"></a>

## Language

- [Stabilize `asm_goto`
feature](https://redirect.github.com/rust-lang/rust/pull/133870)
- [Allow parsing open beginning ranges (`..EXPR`) after unary operators
`!`, `-`, and
`*`](https://redirect.github.com/rust-lang/rust/pull/134900).
- [Don't require method impls for methods with `Self: Sized` bounds in
`impl`s for unsized
types](https://redirect.github.com/rust-lang/rust/pull/135480)
- [Stabilize `feature(precise_capturing_in_traits)` allowing `use<...>`
bounds on return position `impl Trait` in
`trait`s](https://redirect.github.com/rust-lang/rust/pull/138128)

<a id="1.87.0-Compiler"></a>

## Compiler

- [x86: make SSE2 required for i686 targets and use it to pass SIMD
types](https://redirect.github.com/rust-lang/rust/pull/135408)

<a id="1.87.0-Platform-Support"></a>

## Platform Support

- [Remove `i586-pc-windows-msvc`
target](https://redirect.github.com/rust-lang/rust/pull/137957)

Refer to Rust's [platform support page][platform-support-doc]
for more information on Rust's tiered platform support.

[platform-support-doc]:
https://doc.rust-lang.org/rustc/platform-support.html

<a id="1.87.0-Libraries"></a>

## Libraries

- [Stabilize the anonymous pipe
API](https://redirect.github.com/rust-lang/rust/issues/127154)
- [Add support for unbounded left/right shift
operations](https://redirect.github.com/rust-lang/rust/issues/129375)
- [Print pointer metadata in `Debug` impl of raw
pointers](https://redirect.github.com/rust-lang/rust/pull/135080)
- [`Vec::with_capacity` guarantees it allocates with the amount
requested, even if `Vec::capacity` returns a different
number.](https://redirect.github.com/rust-lang/rust/pull/135933)
- Most `std::arch` intrinsics which don't take pointer arguments can now
be called from safe code if the caller has the appropriate target
features already enabled
([https://github.com/rust-lang/stdarch/pull/1714](https://redirect.github.com/rust-lang/stdarch/pull/1714),
[https://github.com/rust-lang/stdarch/pull/1716](https://redirect.github.com/rust-lang/stdarch/pull/1716),
[https://github.com/rust-lang/stdarch/pull/1717](https://redirect.github.com/rust-lang/stdarch/pull/1717))
- [Undeprecate
`env::home_dir`](https://redirect.github.com/rust-lang/rust/pull/137327)
- [Denote `ControlFlow` as
`#[must_use]`](https://redirect.github.com/rust-lang/rust/pull/137449)
- [Macros such as `assert_eq!` and `vec!` now support `const {...}`
expressions](https://redirect.github.com/rust-lang/rust/pull/138162)

<a id="1.87.0-Stabilized-APIs"></a>

## Stabilized APIs

-
[`Vec::extract_if`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.extract_if)
-
[`vec::ExtractIf`](https://doc.rust-lang.org/stable/std/vec/struct.ExtractIf.html)
-
[`LinkedList::extract_if`](https://doc.rust-lang.org/stable/std/collections/struct.LinkedList.html#method.extract_if)
-
[`linked_list::ExtractIf`](https://doc.rust-lang.org/stable/std/collections/linked_list/struct.ExtractIf.html)
-
[`<[T]>::split_off`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.split_off)
-
[`<[T]>::split_off_mut`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.split_off_mut)
-
[`<[T]>::split_off_first`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.split_off_first)
-
[`<[T]>::split_off_first_mut`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.split_off_first_mut)
-
[`<[T]>::split_off_last`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.split_off_last)
-
[`<[T]>::split_off_last_mut`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.split_off_last_mut)
-
[`String::extend_from_within`](https://doc.rust-lang.org/stable/alloc/string/struct.String.html#method.extend_from_within)
-
[`os_str::Display`](https://doc.rust-lang.org/stable/std/ffi/os_str/struct.Display.html)
-
[`OsString::display`](https://doc.rust-lang.org/stable/std/ffi/struct.OsString.html#method.display)
-
[`OsStr::display`](https://doc.rust-lang.org/stable/std/ffi/struct.OsStr.html#method.display)
- [`io::pipe`](https://doc.rust-lang.org/stable/std/io/fn.pipe.html)
-
[`io::PipeReader`](https://doc.rust-lang.org/stable/std/io/struct.PipeReader.html)
-
[`io::PipeWriter`](https://doc.rust-lang.org/stable/std/io/struct.PipeWriter.html)
- [`impl From<PipeReader> for
OwnedHandle`](https://doc.rust-lang.org/stable/std/os/windows/io/struct.OwnedHandle.html#impl-From%3CPipeReader%3E-for-OwnedHandle)
- [`impl From<PipeWriter> for
OwnedHandle`](https://doc.rust-lang.org/stable/std/os/windows/io/struct.OwnedHandle.html#impl-From%3CPipeWriter%3E-for-OwnedHandle)
- [`impl From<PipeReader> for
Stdio`](https://doc.rust-lang.org/stable/std/process/struct.Stdio.html)
- [`impl From<PipeWriter> for
Stdio`](https://doc.rust-lang.org/stable/std/process/struct.Stdio.html#impl-From%3CPipeWriter%3E-for-Stdio)
- [`impl From<PipeReader> for
OwnedFd`](https://doc.rust-lang.org/stable/std/os/fd/struct.OwnedFd.html#impl-From%3CPipeReader%3E-for-OwnedFd)
- [`impl From<PipeWriter> for
OwnedFd`](https://doc.rust-lang.org/stable/std/os/fd/struct.OwnedFd.html#impl-From%3CPipeWriter%3E-for-OwnedFd)
-
[`Box<MaybeUninit<T>>::write`](https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.write)
- [`impl TryFrom<Vec<u8>> for
String`](https://doc.rust-lang.org/stable/std/string/struct.String.html#impl-TryFrom%3CVec%3Cu8%3E%3E-for-String)
- [`<*const
T>::offset_from_unsigned`](https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.offset_from_unsigned)
- [`<*const
T>::byte_offset_from_unsigned`](https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.byte_offset_from_unsigned)
- [`<*mut
T>::offset_from_unsigned`](https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.offset_from_unsigned-1)
- [`<*mut
T>::byte_offset_from_unsigned`](https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.byte_offset_from_unsigned-1)
-
[`NonNull::offset_from_unsigned`](https://doc.rust-lang.org/stable/std/ptr/struct.NonNull.html#method.offset_from_unsigned)
-
[`NonNull::byte_offset_from_unsigned`](https://doc.rust-lang.org/stable/std/ptr/struct.NonNull.html#method.byte_offset_from_unsigned)
-
[`<uN>::cast_signed`](https://doc.rust-lang.org/stable/std/primitive.usize.html#method.cast_signed)
-
[`NonZero::<uN>::cast_signed`](https://doc.rust-lang.org/stable/std/num/struct.NonZero.html#method.cast_signed-5).
-
[`<iN>::cast_unsigned`](https://doc.rust-lang.org/stable/std/primitive.isize.html#method.cast_unsigned).
-
[`NonZero::<iN>::cast_unsigned`](https://doc.rust-lang.org/stable/std/num/struct.NonZero.html#method.cast_unsigned-5).
-
[`<uN>::is_multiple_of`](https://doc.rust-lang.org/stable/std/primitive.usize.html#method.is_multiple_of)
-
[`<uN>::unbounded_shl`](https://doc.rust-lang.org/stable/std/primitive.usize.html#method.unbounded_shl)
-
[`<uN>::unbounded_shr`](https://doc.rust-lang.org/stable/std/primitive.usize.html#method.unbounded_shr)
-
[`<iN>::unbounded_shl`](https://doc.rust-lang.org/stable/std/primitive.isize.html#method.unbounded_shl)
-
[`<iN>::unbounded_shr`](https://doc.rust-lang.org/stable/std/primitive.isize.html#method.unbounded_shr)
-
[`<iN>::midpoint`](https://doc.rust-lang.org/stable/std/primitive.isize.html#method.midpoint)
-
[`<str>::from_utf8`](https://doc.rust-lang.org/stable/std/primitive.str.html#method.from_utf8)
-
[`<str>::from_utf8_mut`](https://doc.rust-lang.org/stable/std/primitive.str.html#method.from_utf8_mut)
-
[`<str>::from_utf8_unchecked`](https://doc.rust-lang.org/stable/std/primitive.str.html#method.from_utf8_unchecked)
-
[`<str>::from_utf8_unchecked_mut`](https://doc.rust-lang.org/stable/std/primitive.str.html#method.from_utf8_unchecked_mut)

These previously stable APIs are now stable in const contexts:

-
[`core::str::from_utf8_mut`](https://doc.rust-lang.org/stable/std/str/fn.from_utf8_mut.html)
-
[`<[T]>::copy_from_slice`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.copy_from_slice)
-
[`SocketAddr::set_ip`](https://doc.rust-lang.org/stable/std/net/enum.SocketAddr.html#method.set_ip)
-
[`SocketAddr::set_port`](https://doc.rust-lang.org/stable/std/net/enum.SocketAddr.html#method.set_port),
-
[`SocketAddrV4::set_ip`](https://doc.rust-lang.org/stable/std/net/struct.SocketAddrV4.html#method.set_ip)
-
[`SocketAddrV4::set_port`](https://doc.rust-lang.org/stable/std/net/struct.SocketAddrV4.html#method.set_port),
-
[`SocketAddrV6::set_ip`](https://doc.rust-lang.org/stable/std/net/struct.SocketAddrV6.html#method.set_ip)
-
[`SocketAddrV6::set_port`](https://doc.rust-lang.org/stable/std/net/struct.SocketAddrV6.html#method.set_port)
-
[`SocketAddrV6::set_flowinfo`](https://doc.rust-lang.org/stable/std/net/struct.SocketAddrV6.html#method.set_flowinfo)
-
[`SocketAddrV6::set_scope_id`](https://doc.rust-lang.org/stable/std/net/struct.SocketAddrV6.html#method.set_scope_id)
-
[`char::is_digit`](https://doc.rust-lang.org/stable/std/primitive.char.html#method.is_digit)
-
[`char::is_whitespace`](https://doc.rust-lang.org/stable/std/primitive.char.html#method.is_whitespace)
- [`<[[T;
N]]>::as_flattened`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_flattened)
- [`<[[T;
N]]>::as_flattened_mut`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_flattened_mut)
-
[`String::into_bytes`](https://doc.rust-lang.org/stable/std/string/struct.String.html#method.into_bytes)
-
[`String::as_str`](https://doc.rust-lang.org/stable/std/string/struct.String.html#method.as_str)
-
[`String::capacity`](https://doc.rust-lang.org/stable/std/string/struct.String.html#method.capacity)
-
[`String::as_bytes`](https://doc.rust-lang.org/stable/std/string/struct.String.html#method.as_bytes)
-
[`String::len`](https://doc.rust-lang.org/stable/std/string/struct.String.html#method.len)
-
[`String::is_empty`](https://doc.rust-lang.org/stable/std/string/struct.String.html#method.is_empty)
-
[`String::as_mut_str`](https://doc.rust-lang.org/stable/std/string/struct.String.html#method.as_mut_str)
-
[`String::as_mut_vec`](https://doc.rust-lang.org/stable/std/string/struct.String.html#method.as_mut_vec)
-
[`Vec::as_ptr`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.as_ptr)
-
[`Vec::as_slice`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.as_slice)
-
[`Vec::capacity`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.capacity)
-
[`Vec::len`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.len)
-
[`Vec::is_empty`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.is_empty)
-
[`Vec::as_mut_slice`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.as_mut_slice)
-
[`Vec::as_mut_ptr`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.as_mut_ptr)

<a id="1.87.0-Cargo"></a>

## Cargo

- [Add terminal integration via ANSI OSC 9;4
sequences](https://redirect.github.com/rust-lang/cargo/pull/14615/)
- [chore: bump openssl to
v3](https://redirect.github.com/rust-lang/cargo/pull/15232/)
- [feat(package): add --exclude-lockfile
flag](https://redirect.github.com/rust-lang/cargo/pull/15234/)

<a id="1.87.0-Compatibility-Notes"></a>

## Compatibility Notes

- [Rust now raises an error for macro invocations inside the
`#![crate_name]`
attribute](https://redirect.github.com/rust-lang/rust/pull/127581)
- [Unstable fields are now always considered to be
inhabited](https://redirect.github.com/rust-lang/rust/pull/133889)
- [Macro arguments of unary operators followed by open beginning ranges
may now be matched
differently](https://redirect.github.com/rust-lang/rust/pull/134900)
- [Make `Debug` impl of raw pointers print metadata if
present](https://redirect.github.com/rust-lang/rust/pull/135080)
- [Warn against function pointers using unsupported ABI strings in
dependencies](https://redirect.github.com/rust-lang/rust/pull/135767)
- [Associated types on `dyn` types are no longer
deduplicated](https://redirect.github.com/rust-lang/rust/pull/136458)
- [Forbid attributes on `..` inside of struct patterns (`let Struct {
#[attribute] .. })
=`](https://redirect.github.com/rust-lang/rust/pull/136490)
- [Make `ptr_cast_add_auto_to_object` lint into hard
error](https://redirect.github.com/rust-lang/rust/pull/136764)
- Many `std::arch` intrinsics are now safe to call in some contexts,
there may now be new `unused_unsafe` warnings in existing codebases.
- [Limit `width` and `precision` formatting options to 16 bits on all
targets](https://redirect.github.com/rust-lang/rust/pull/136932)
- [Turn order dependent trait objects future incompat warning into a
hard error](https://redirect.github.com/rust-lang/rust/pull/136968)
- [Denote `ControlFlow` as
`#[must_use]`](https://redirect.github.com/rust-lang/rust/pull/137449)
- [Windows: The standard library no longer links `advapi32`, except on
win7.](https://redirect.github.com/rust-lang/rust/pull/138233) Code such
as C libraries that were relying on this assumption may need to
explicitly link advapi32.
- [Proc macros can no longer observe expanded `cfg(true)`
attributes.](https://redirect.github.com/rust-lang/rust/pull/138844)
- [Start changing the internal representation of pasted
tokens](https://redirect.github.com/rust-lang/rust/pull/124141). Certain
invalid declarative macros that were previously accepted in obscure
circumstances are now correctly rejected by the compiler. Use of a `tt`
fragment specifier can often fix these macros.
- [Don't allow flattened format\_args in
const.](https://redirect.github.com/rust-lang/rust/pull/139624)

<a id="1.87.0-Internal-Changes"></a>

## Internal Changes

These changes do not affect any public interfaces of Rust, but they
represent
significant improvements to the performance or internals of rustc and
related
tools.

- [Update to LLVM
20](https://redirect.github.com/rust-lang/rust/pull/135763)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - Every minute ( * * * * * ) (UTC),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/rust-lang/cargo).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS41MS4xIiwidXBkYXRlZEluVmVyIjoiNDEuNjAuNCIsInRhcmdldEJyYW5jaCI6Im1hc3RlciIsImxhYmVscyI6W119-->
2025-08-12 20:08:01 +00:00
Weihang Lo
9614bc251b
chore: remove x86_64-apple-darwin from CI and tests
RFC 3841 has merged, and x86_64-apple-darwin will be demoted to tier-2
in 1.90.0. In Cargo we usually run test against tier-1 platforms, so
x86_64-apple-darwin should be removed.
Also, that target platform is often the slowest one in CI,
we are happy to remove it to save us a couple of minutes.

https://rust-lang.github.io/rfcs/3841-demote-x86_64-apple-darwin.html
2025-08-12 16:02:16 -04:00
Ed Page
2dc9c20034
perf(package): Always reuse the workspace's target-dir (#15783)
### What does this PR try to resolve?

While preparing to stabilize `build-dir`, [it was
discovered](https://github.com/rust-lang/cargo/issues/14125#issuecomment-3127467689)
that `cargo package` will sometimes use the build cache for dependency
crates if `CARGO_TARGET_DIR` is explicitly set.

If target-dir is not set, the build will be preformed in an "inner
target dir" at `target/package/{name}-{version}/target` and rebuild
everything.

This PR changes the default behavior to always use the build cache,
matching the behavior of having `target-dir` set.

### How to test and review this PR?

Added a dedicated test to verify the previous behavior (cargo recompiled
non-workspace crates) in the first commit.
Then updated it to verify the new behavior.

### Related links/notes

* I did some Git archaeology and I _think_ this behavior was introduced
in #2912
* While searching through the commit/pr history was never able to find
any explicit reason why the behavior is the way it is.
* Even if it was intentional, it has been 9 years since and Cargo's
fingerprinting/rebuild detection is much more mature now so I believe
its worth revisiting if this is still the desired behavior.
* Would help mitigate https://github.com/rust-lang/cargo/issues/14941
2025-08-12 19:27:53 +00:00
renovate[bot]
4ba3e6a7ab
chore(deps): update msrv (3 versions) to v1.87 2025-08-12 19:27:19 +00:00