19570 Commits

Author SHA1 Message Date
Eric Huss
2668a4f936
fix(config): When merging, replace rather than combining specific configuration keys (#15066)
In general, Cargo merges lists in configuration by concatenating them.
However, sometimes the lists don't make sense for merging, such as a
program and its arguments. We had the `UnmergedStringList` type that
handled this case for merging environment variables, but it did not work
for multiple configs.

* Removes the `UnmergedStringList` type, which only worked for
preventing merging of environment variables with configuration.
* Adds a new function `is_nonmergable_list` which hard-codes which
configuration keys contain lists that should not be merged.

Fixes #14906
2025-01-21 16:32:27 +00:00
Arlo Siemsen
99c57c02d7 fix(config): Don't merge unmergable config 2025-01-20 15:20:27 -06:00
Arlo Siemsen
1948c90a78 Show existing behavior 2025-01-20 14:34:08 -06:00
Rustin170506
1514c7e630 test: add test for script as a dependency
Signed-off-by: Rustin170506 <techregister@pm.me>
2025-01-20 21:53:15 +08:00
Rustin170506
95f6d0b2da feat: use full URL for embedded script paths
Signed-off-by: Rustin170506 <techregister@pm.me>
2025-01-20 21:53:15 +08:00
Rustin170506
d4c1eeeaa0 refactor: use manifest path as the key
Signed-off-by: Rustin170506 <techregister@pm.me>

fix
2025-01-20 21:53:13 +08:00
Ed Page
045bf21b36
created a function for user defined aliases (#15076)
Hey there,

As mentioned in this
[issue](https://github.com/rust-lang/cargo/issues/14520), I worked on
the functionality of autocompleting the user-defined aliases and I moved
the code of user-defined aliases into a separate function by defining
two parameters. The first one is global context or gctx and the second
one is the commands that can be called in the list_commands function.

Thank you!

<!--
Thanks for submitting a pull request 🎉! Here are some tips for you:

* If this is your first contribution, read "Cargo Contribution Guide"
first:
  https://doc.crates.io/contrib/
* Run `cargo fmt --all` to format your code changes.
* Small commits and pull requests are always preferable and easy to
review.
* If your idea is large and needs feedback from the community, read how:
  https://doc.crates.io/contrib/process/#working-on-large-features
* Cargo takes care of compatibility. Read our design principles:
  https://doc.crates.io/contrib/design.html
* When changing help text of cargo commands, follow the steps to
generate docs:

https://github.com/rust-lang/cargo/tree/master/src/doc#building-the-man-pages
* If your PR is not finished, set it as "draft" PR or add "WIP" in its
title.
* It's ok to use the CI resources to test your PR, but please don't
abuse them.

### What does this PR try to resolve?

Explain the motivation behind this change.
A clear overview along with an in-depth explanation are helpful.

You can use `Fixes #<issue number>` to associate this PR to an existing
issue.

### How should we test and review this PR?

Demonstrate how you test this change and guide reviewers through your
PR.
With a smooth review process, a pull request usually gets reviewed
quicker.

If you don't know how to write and run your tests, please read the
guide:
https://doc.crates.io/contrib/tests

### Additional information

Other information you want to mention in this PR, such as prior arts,
future extensions, an unresolved problem, or a TODO list.
-->
2025-01-17 14:59:36 +00:00
Bilal Khan
e01660d656 created a function for user defined aliases
removed the command parameter and returned it in order to extend the command with an alias
2025-01-17 11:08:03 +05:00
Ed Page
531215f6ac
took the functionality of the third party subcommand from the list_commands function (#15075)
Hey there,

I just moved the functionality of the third-party subcommand from the
[list_commands](https://github.com/rust-lang/cargo/blob/master/src/bin/cargo/main.rs#L184)
function to another new function by the name of third_party_subcommand
name and called that function in the list_commands function.

From my understanding regarding the third-party subcommand from this
[tracking issue](https://github.com/rust-lang/cargo/issues/14520),
following points should be performed.

- The code that gathers third-party subcommands in list_commands should
be moved into a separate function that I did.

- This new function will be called both by list_commands and the code
for adding subcommand completions. Although I called the function in the
list_commands but didn't understand the second point.

- Test the change that I made in the first place but it gave me this
error:

![carbon
(68)](https://github.com/user-attachments/assets/fb4c5a55-ea4b-4d22-b187-c2a417f5128d)

<!--
Thanks for submitting a pull request 🎉! Here are some tips for you:

* If this is your first contribution, read "Cargo Contribution Guide"
first:
  https://doc.crates.io/contrib/
* Run `cargo fmt --all` to format your code changes.
* Small commits and pull requests are always preferable and easy to
review.
* If your idea is large and needs feedback from the community, read how:
  https://doc.crates.io/contrib/process/#working-on-large-features
* Cargo takes care of compatibility. Read our design principles:
  https://doc.crates.io/contrib/design.html
* When changing help text of cargo commands, follow the steps to
generate docs:

https://github.com/rust-lang/cargo/tree/master/src/doc#building-the-man-pages
* If your PR is not finished, set it as "draft" PR or add "WIP" in its
title.
* It's ok to use the CI resources to test your PR, but please don't
abuse them.

### What does this PR try to resolve?

Explain the motivation behind this change.
A clear overview along with an in-depth explanation are helpful.

You can use `Fixes #<issue number>` to associate this PR to an existing
issue.

### How should we test and review this PR?

Demonstrate how you test this change and guide reviewers through your
PR.
With a smooth review process, a pull request usually gets reviewed
quicker.

If you don't know how to write and run your tests, please read the
guide:
https://doc.crates.io/contrib/tests

### Additional information

Other information you want to mention in this PR, such as prior arts,
future extensions, an unresolved problem, or a TODO list.
-->
2025-01-16 23:18:38 +00:00
Bilal Khan
ea83afd783 took the functionality of the third party subcommand from the list_commands function
corrected the formatting
2025-01-17 03:48:38 +05:00
Ed Page
dc0d02a1fc
fix: wrong concat and field name (#15074)
### What does this PR try to resolve?

Fixes a wrong concatenation in macro, and one wrong field name.

### How should we test and review this PR?

`cargo doc --document-private-items --no-deps --open`
2025-01-16 20:22:34 +00:00
Weihang Lo
e2f85e1c8c
fix: wrong concat and typos 2025-01-16 14:46:41 -05:00
Weihang Lo
150bbc4d50
fix(publish): Report all unpublishable packages (#15070)
### What does this PR try to resolve?
I didn't extend this to multiple packages restricted to specific
registries.
It seems less likely to be a problem and more complex to gather and
report.

This was inspired by feedback left at #10948

### How should we test and review this PR?

### Additional information
2025-01-16 13:44:50 +00:00
Weihang Lo
1177d2a230
docs(cargo-clippy): correct typo (#15072)
Fix typo in command docs for `cargo-clippy`. The command is
`cargo-clippy` not `cargo-miri`!
2025-01-16 13:23:48 +00:00
overlookmotel
7b7661941f docs(cargo-clippy): correct typo 2025-01-16 11:23:55 +00:00
Ed Page
1eafdb2656 fix(publish): Report all unpublishable packages
I didn't extend this to multiple packages restricted to specific
registries.
It seems less likely to be a problem and more complex to gather and
report.

This was inspired by feedback left at #10948
2025-01-15 20:24:52 -06:00
Ed Page
a282233ae4 test(publish): Check with multiple unpublishable packages 2025-01-15 20:23:19 -06:00
Ed Page
d54c5d404a
docs(cargo-package): alwasy include the lockfile (#15067)
### What does this PR try to resolve?

This was overlooked in #14815.

### How should we test and review this PR?

```
cargo build
target/debug/cargo help package
# and read the manpage
```
2025-01-16 01:49:03 +00:00
Weihang Lo
662394e10f
docs(cargo-package): alwasy include the lockfile
This was overlooked in #14815.
2025-01-15 20:18:08 -05:00
Weihang Lo
2909c013ea
docs(ref): Deprecate 'package.authors' (#15068)
### What does this PR try to resolve?

This was left as a future-possibility in
[RFC
#3052](https://rust-lang.github.io/rfcs/3052-optional-authors-field.html).
Without a clear role for this field within Cargo/crates.io,
there seems little reason to actively support it (e.g. #14949, #15027),
including working through feature requests.
I see the potential for having some fields with more specific roles
(where to go for support, where to go for disclosing vulnerabilities,
etc)
but even these run into the mutable data problem of `authors`.
Users can always manage metadata for their own purposes through
`package.metadata`.

The RFC called out clap as an example of something that uses this.
Clap no longer does by default but users can opt-in through a
`help_template`.

For now, this notes the status in the documentation.
When we have[user control over Cargo lint (#12235)
(and figure out namespacing with lints that overlap with Rust),
we can give a warning on this.
Based on feedback from users, we can evaluate removing this field in a
future edition.

This is as discussed in a recent Cargo team meeting

### How should we test and review this PR?

### Additional information

We may want to consider doing similar for `badges`
2025-01-16 00:42:57 +00:00
Ed Page
149aa21df0
fix(build-std): parse as comma-separated list (#15065)
### What does this PR try to resolve?

Restore to the behavior prior to
30d11ce1d9f06907d1e707c4fe379ebf57305a5e
Also extend `build-std-features` to support comma-separated list.

Fixes #15064

### How should we test and review this PR?

A test has been added.
2025-01-15 23:39:25 +00:00
Weihang Lo
93c764d805 fix(build-std): parse as comma-separated list
Restore to the behavior prior to 30d11ce1d9f06907d1e707c4fe379ebf57305a5e
Also extend `build-std-features` to support comma-separated list.
2025-01-15 15:09:19 -08:00
Weihang Lo
ffe841c540 test: verify how build-std flag be deserialized now
It doesn't parse as comma-separated list.
It did before #14899
2025-01-15 15:09:19 -08:00
Weihang Lo
ac22fd3d2d
Fix benchsuite issue with newer versions of git (#15069)
This fixes a problem introduced with git 2.48.0 where the benchsuite
would fail to run. The problem is that 2.48 changed the behavior so that
HEAD would get changed to follow the remote. crates.io-index's default
branch is "main". The benchsuite uses git to initialize the bare repo
with a HEAD of "refs/heads/master" (the default of
`init.defaultBranch`). Older versions of git would leave HEAD untouched,
but newer versions update it to "refs/heads/main" after fetching to
match the remote. This causes cargo to try to clone a branch called
"main" which is empty.

The solution here is to just force HEAD to be main, and use that as the
branch for our time-travelling snapshot.

Tested with git 2.47.0 and 2.48.1. Test is roughly:

```
rm -rf target/tmp/bench ; cargo test -p benchsuite --all-targets -- cargo && cargo test -p benchsuite --all-targets -- cargo`
```

(Run it twice to verify it can do an incremental fetch.)
2025-01-15 22:16:56 +00:00
Eric Huss
5ac521c649 Fix benchsuite issue with newer versions of git 2025-01-15 13:43:53 -08:00
Ed Page
32d6e9dcfe docs(ref): Deprecate 'package.authors'
This was left as a future-possibility in
[RFC #3052](https://rust-lang.github.io/rfcs/3052-optional-authors-field.html).
Without a clear role for this field within Cargo/crates.io,
there seems little reason to actively support it (e.g. #14949, #15027),
including working through feature requests.
I see the potential for having some fields with more specific roles
(where to go for support, where to go for disclosing vulnerabilities, etc)
but even these run into the mutable data problem of `authors`.
Users can always manage metadata for their own purposes through `package.metadata`.

The RFC called out clap as an example of something that uses this.
Clap no longer does by default but users can opt-in through a
`help_template`.

For now, this notes the status in the documentation.
When we have[user control over Cargo lint (#12235)
(and figure out namespacing with lints that overlap with Rust),
we can give a warning on this.
Based on feedback from users, we can evaluate removing this field in a
future edition.

We may want to consider doing similar for `badges`
2025-01-15 11:25:34 -06:00
Ed Page
1a18d72993 docs(ref): Remove uses of 'package.authors' that isn't documenting something 2025-01-15 11:08:30 -06:00
Weihang Lo
1b77ac6728
Document that cargo automatically registers variables used in env! macro to trigger rebuilds (#15062)
Initially discussed in
https://rust-lang.zulipchat.com/#narrow/channel/246057-t-cargo/topic/env!.2Foption_env!.20are.20tracked.2C.20can.20documentation.20be.20improved.3F/near/491793318

### What does this PR try to resolve?

There is no documentation that I can find which indicates that cargo
will rebuild for changes in the variables used in `env!` macros.

Because this was not always the case, when searching for information on
this, the main result indicates otherwise
https://users.rust-lang.org/t/should-env-cause-rebuild-is-env-var-changes/18013.

Users misled by this may turn to `rerun-if-changed-env` in a build
script to trigger rebuilds, so this documentation is a useful place to
catch users and indicate that it isn't needed for `env!` macros.

### How should we test and review this PR?

I'm not sure how to test the new relative link but I matched it to the
existing `[env-macro]: ../../std/macro.env.html`.

My main concern when writing this was whether it was clear that this
applies to `env!` macro usage within the main code of the crate and not
just in `build.rs`.
2025-01-15 02:05:31 +00:00
Imbris
706e4c8164 Document that cargo automatically registers variables used in env! macro to trigger rebuilds 2025-01-14 20:34:31 -05:00
Ed Page
54df3c7dd9
perf(cargo-package): match certain path prefix with pathspec (#14997)
### What does this PR try to resolve?

This revives #14962. See benchmark chart in
<https://github.com/rust-lang/cargo/pull/14962#issuecomment-2555318312>.
#14962 was closed because we found more bugs in `cargo package`, and
#14962 could potentially make them even harder to fix. Two of them have
been fixed so this is good to ship IMO with its own good.

---

An improvement https://github.com/rust-lang/cargo/issues/14955.

`check_repo_state` checks the entire git repo status. This is usually
fine if you have only a few packages in a workspace.

For huge monorepos, it may hit performance issues.

For example,
on awslabs/aws-sdk-rust@2cbd34d
the workspace has roughly 434 members to publish.
`git ls-files` reported us 204379 files in this Git repository. That
means git may need to check status of all files 434 times. That would be
`204379 * 434 = 88,700,486` checks!

Moreover, the current algorithm is finding the intersection of
`PathSource::list_files` and `git status`.
It is an `O(n^2)` check.
Let's assume files are evenly distributed into each package, so roughly
470 files per package.
If we're unlucky to have some dirty files, say 100 files. We will have
to do `470 * 100 = 47,000` times of path comparisons.

Even worse, because we `git status` everything in the repo, we'll have
to it for all members,
even when those dirty files are not part of the current package in
question. So it becomes `470 * 100 * 434 = 20,398,000`!

#### Solution

Instead of comparing with the status of the entire repository, this
patch use the magic pathspec[1] to tell git only reports paths that
match a certain path prefix.

This wouldn't help the `O(n^2)` algorithm,
but at least it won't check dirty files outside the current package.
Also, we don't `git status` against entire git worktree/index anymore.

[1]:
https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefpathspecapathspec

### How should we test and review this PR?

Run this command against
awslabs/aws-sdk-rust@2cbd34db53,
and see if it is getting better.

```
CARGO_LOG_PROFILE=1 cargor package --no-verify --offline --allow-dirty -p aws-sdk-accessanalyzer -p aws-sdk-apigateway
```

I've verified checksums of `.crate` files generated from master
(d85d76199f89d7a312f308f6e37fc40f70508923) and this commit
(3dabdcdd20d6382e7efa2c01833efa20944f3a79). They are the same.

### Additional information

There are some other alternatives, like making `PathSource::list_files`
additionally reports dirty files. While we already have rooms to do it,
this approach should be the most straightforward one at this moment.

Some other approaches like

* Switch to gitoxide (I tried and it didn't as good as expected. Maybe I
did something wrong).
* A flag `--no-vcs` to skip vcs at all
* Improve the `O(n^2)` algorithm
2025-01-13 19:43:12 +00:00
Ed Page
9bea071ff5 fix(login): Deprecate CLI token
This came up in #13623 to avoid putting tokens into shell history.
2025-01-13 10:40:13 -06:00
Weihang Lo
f15df8fd49
Clarify note in example (#15054)
### What does this PR try to resolve?

I was reading the docs to see how to specify a version to use from a git
dependency, and came across this section and got really confused as I
did not know what `N.B.` meant so the following did not read well for
me: `N.B. that if ...`. I had to look it up and then realized that I had
wasted time that did not need to be wasted. Thus this PR aims to prevent
the time of future readers from being wasted.

### How should we test and review this PR?

Try to read aloud the old version and the new one, as well as the given
alternatives to see which would make most sense to the largest number of
people.

### Additional information

A simple fix would be to just remove "that" as this reads better: `N.B.
if a version doesn't match, Cargo will fail to compile!`

#### Other variations
* `Note that if a version doesn't match, Cargo will fail to compile!`
- might be confused as `Notice that if a version doesn't match, Cargo
will fail to compile!`
* Move the comment out to a reworded sentence right below the code block
and perhaps also link to the [`The role of the version
key`](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#the-role-of-the-version-key)
section above which clearly states:
> The version key does not affect which commit is used when Cargo
retrieves the git dependency, but Cargo checks the version information
in the dependency’s Cargo.toml file against the version key and raises
an error if the check fails.
2025-01-12 00:34:10 +00:00
Aeon
31208bdf0b
Clarify note in example 2025-01-11 18:49:16 -05:00
Ed Page
5408cc22ac
chore(deps): update msrv (3 versions) to v1.82 (#15050)
This PR contains the following updates:

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

---

### Release Notes

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

###
[`v1.82`](https://redirect.github.com/rust-lang/rust/blob/HEAD/RELEASES.md#Version-1820-2024-10-17)

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

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

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

## Language

- [Don't make statement nonterminals match pattern
nonterminals](https://redirect.github.com/rust-lang/rust/pull/120221/)
- [Patterns matching empty types can now be omitted in common
cases](https://redirect.github.com/rust-lang/rust/pull/122792)
- [Enforce supertrait outlives obligations when using trait
impls](https://redirect.github.com/rust-lang/rust/pull/124336)
- [`addr_of(_mut)!` macros and the newly stabilized `&raw (const|mut)`
are now safe to use with all static
items](https://redirect.github.com/rust-lang/rust/pull/125834)
- [size_of_val_raw: for length 0 this is safe to
call](https://redirect.github.com/rust-lang/rust/pull/126152/)
- [Reorder trait bound modifiers *after* `for<...>` binder in trait
bounds](https://redirect.github.com/rust-lang/rust/pull/127054/)
- [Stabilize opaque type precise capturing (RFC
3617)](https://redirect.github.com/rust-lang/rust/pull/127672)
- [Stabilize `&raw const` and `&raw mut` operators (RFC
2582)](https://redirect.github.com/rust-lang/rust/pull/127679)
- [Stabilize unsafe extern blocks (RFC
3484)](https://redirect.github.com/rust-lang/rust/pull/127921)
- [Stabilize nested field access in
`offset_of!`](https://redirect.github.com/rust-lang/rust/pull/128284)
- [Do not require `T` to be live when dropping `[T;
0]`](https://redirect.github.com/rust-lang/rust/pull/128438)
- [Stabilize `const` operands in inline
assembly](https://redirect.github.com/rust-lang/rust/pull/128570)
- [Stabilize floating-point arithmetic in `const
fn`](https://redirect.github.com/rust-lang/rust/pull/128596)
- [Stabilize explicit opt-in to unsafe
attributes](https://redirect.github.com/rust-lang/rust/pull/128771)
- [Document NaN bit patterns
guarantees](https://redirect.github.com/rust-lang/rust/pull/129559)

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

## Compiler

- [Promote riscv64gc-unknown-linux-musl to tier
2](https://redirect.github.com/rust-lang/rust/pull/122049)
- [Promote Mac Catalyst targets `aarch64-apple-ios-macabi` and
`x86_64-apple-ios-macabi` to Tier 2, and ship them with
rustup](https://redirect.github.com/rust-lang/rust/pull/126450)
- [Add tier 3 NuttX based targets for RISC-V and
ARM](https://redirect.github.com/rust-lang/rust/pull/127755)
- [Add tier 3 powerpc-unknown-linux-muslspe
target](https://redirect.github.com/rust-lang/rust/pull/127905)
- [Improved diagnostics to explain why a pattern is
unreachable](https://redirect.github.com/rust-lang/rust/pull/128034)
- [The compiler now triggers the unreachable code warning properly for
async functions that don't return/are `->
!`](https://redirect.github.com/rust-lang/rust/pull/128443)
- [Promote `aarch64-apple-darwin` to Tier
1](https://redirect.github.com/rust-lang/rust/pull/128592)
- [Add Trusty OS target `aarch64-unknown-trusty` and
`armv7-unknown-trusty` as tier 3
targets](https://redirect.github.com/rust-lang/rust/pull/129490)
- [Promote `wasm32-wasip2` to Tier
2.](https://redirect.github.com/rust-lang/rust/pull/126967/)

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

## Libraries

- [Generalize `{Rc,Arc}::make_mut()` to `Path`, `OsStr`, and
`CStr`.](https://redirect.github.com/rust-lang/rust/pull/126877)

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

## Stabilized APIs

-
[`std:🧵:Builder::spawn_unchecked`](https://doc.rust-lang.org/stable/std/thread/struct.Builder.html#method.spawn_unchecked)
-
[`std::str::CharIndices::offset`](https://doc.rust-lang.org/nightly/std/str/struct.CharIndices.html#method.offset)
-
[`std::option::Option::is_none_or`](https://doc.rust-lang.org/nightly/std/option/enum.Option.html#method.is_none_or)
-
[`[T]::is_sorted`](https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.is_sorted)
-
[`[T]::is_sorted_by`](https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.is_sorted_by)
-
[`[T]::is_sorted_by_key`](https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.is_sorted_by_key)
-
[`Iterator::is_sorted`](https://doc.rust-lang.org/nightly/std/iter/trait.Iterator.html#method.is_sorted)
-
[`Iterator::is_sorted_by`](https://doc.rust-lang.org/nightly/std/iter/trait.Iterator.html#method.is_sorted_by)
-
[`Iterator::is_sorted_by_key`](https://doc.rust-lang.org/nightly/std/iter/trait.Iterator.html#method.is_sorted_by_key)
-
[`std::future::Ready::into_inner`](https://doc.rust-lang.org/nightly/std/future/struct.Ready.html#method.into_inner)
-
[`std::iter::repeat_n`](https://doc.rust-lang.org/nightly/std/iter/fn.repeat_n.html)
- [`impl<T: Clone> DoubleEndedIterator for
Take<Repeat<T>>`](https://doc.rust-lang.org/nightly/std/iter/struct.Take.html#impl-DoubleEndedIterator-for-Take%3CRepeat%3CT%3E%3E)
- [`impl<T: Clone> ExactSizeIterator for
Take<Repeat<T>>`](https://doc.rust-lang.org/nightly/std/iter/struct.Take.html#impl-ExactSizeIterator-for-Take%3CRepeat%3CT%3E%3E)
- [`impl<T: Clone> ExactSizeIterator for
Take<RepeatWith<T>>`](https://doc.rust-lang.org/nightly/std/iter/struct.Take.html#impl-ExactSizeIterator-for-Take%3CRepeatWith%3CF%3E%3E)
- [`impl Default for
std::collections::binary_heap::Iter`](https://doc.rust-lang.org/nightly/std/collections/binary_heap/struct.Iter.html#impl-Default-for-Iter%3C'\_,+T%3E)
- [`impl Default for
std::collections::btree_map::RangeMut`](https://doc.rust-lang.org/nightly/std/collections/btree_map/struct.RangeMut.html#impl-Default-for-RangeMut%3C'\_,+K,+V%3E)
- [`impl Default for
std::collections::btree_map::ValuesMut`](https://doc.rust-lang.org/nightly/std/collections/btree_map/struct.ValuesMut.html#impl-Default-for-ValuesMut%3C'\_,+K,+V%3E)
- [`impl Default for
std::collections::vec_deque::Iter`](https://doc.rust-lang.org/nightly/std/collections/vec_deque/struct.Iter.html#impl-Default-for-Iter%3C'\_,+T%3E)
- [`impl Default for
std::collections::vec_deque::IterMut`](https://doc.rust-lang.org/nightly/std/collections/vec_deque/struct.IterMut.html#impl-Default-for-IterMut%3C'\_,+T%3E)
-
[`Rc<T>::new_uninit`](https://doc.rust-lang.org/nightly/std/rc/struct.Rc.html#method.new_uninit)
-
[`Rc<MaybeUninit<T>>::assume_init`](https://doc.rust-lang.org/nightly/std/rc/struct.Rc.html#method.assume_init)
-
[`Rc<[T]>::new_uninit_slice`](https://doc.rust-lang.org/nightly/std/rc/struct.Rc.html#method.new_uninit_slice)
-
[`Rc<[MaybeUninit<T>]>::assume_init`](https://doc.rust-lang.org/nightly/std/rc/struct.Rc.html#method.assume_init-1)
-
[`Arc<T>::new_uninit`](https://doc.rust-lang.org/nightly/std/sync/struct.Arc.html#method.new_uninit)
-
[`Arc<MaybeUninit<T>>::assume_init`](https://doc.rust-lang.org/nightly/std/sync/struct.Arc.html#method.assume_init)
-
[`Arc<[T]>::new_uninit_slice`](https://doc.rust-lang.org/nightly/std/sync/struct.Arc.html#method.new_uninit_slice)
-
[`Arc<[MaybeUninit<T>]>::assume_init`](https://doc.rust-lang.org/nightly/std/sync/struct.Arc.html#method.assume_init-1)
-
[`Box<T>::new_uninit`](https://doc.rust-lang.org/nightly/std/boxed/struct.Box.html#method.new_uninit)
-
[`Box<MaybeUninit<T>>::assume_init`](https://doc.rust-lang.org/nightly/std/boxed/struct.Box.html#method.assume_init)
-
[`Box<[T]>::new_uninit_slice`](https://doc.rust-lang.org/nightly/std/boxed/struct.Box.html#method.new_uninit_slice)
-
[`Box<[MaybeUninit<T>]>::assume_init`](https://doc.rust-lang.org/nightly/std/boxed/struct.Box.html#method.assume_init-1)
-
[`core::arch::x86_64::_bextri_u64`](https://doc.rust-lang.org/stable/core/arch/x86\_64/fn.\_bextri_u64.html)
-
[`core::arch::x86_64::_bextri_u32`](https://doc.rust-lang.org/stable/core/arch/x86\_64/fn.\_bextri_u32.html)
-
[`core::arch::x86::_mm_broadcastsi128_si256`](https://doc.rust-lang.org/stable/core/arch/x86/fn.\_mm_broadcastsi128\_si256.html)
-
[`core::arch::x86::_mm256_stream_load_si256`](https://doc.rust-lang.org/stable/core/arch/x86/fn.\_mm256\_stream_load_si256.html)
-
[`core::arch::x86::_tzcnt_u16`](https://doc.rust-lang.org/stable/core/arch/x86/fn.\_tzcnt_u16.html)
-
[`core::arch::x86::_mm_extracti_si64`](https://doc.rust-lang.org/stable/core/arch/x86/fn.\_mm_extracti_si64.html)
-
[`core::arch::x86::_mm_inserti_si64`](https://doc.rust-lang.org/stable/core/arch/x86/fn.\_mm_inserti_si64.html)
-
[`core::arch::x86::_mm_storeu_si16`](https://doc.rust-lang.org/stable/core/arch/x86/fn.\_mm_storeu_si16.html)
-
[`core::arch::x86::_mm_storeu_si32`](https://doc.rust-lang.org/stable/core/arch/x86/fn.\_mm_storeu_si32.html)
-
[`core::arch::x86::_mm_storeu_si64`](https://doc.rust-lang.org/stable/core/arch/x86/fn.\_mm_storeu_si64.html)
-
[`core::arch::x86::_mm_loadu_si16`](https://doc.rust-lang.org/stable/core/arch/x86/fn.\_mm_loadu_si16.html)
-
[`core::arch::x86::_mm_loadu_si32`](https://doc.rust-lang.org/stable/core/arch/x86/fn.\_mm_loadu_si32.html)
-
[`core::arch::wasm32::u8x16_relaxed_swizzle`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.u8x16\_relaxed_swizzle.html)
-
[`core::arch::wasm32::i8x16_relaxed_swizzle`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.i8x16\_relaxed_swizzle.html)
-
[`core::arch::wasm32::i32x4_relaxed_trunc_f32x4`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.i32x4\_relaxed_trunc_f32x4.html)
-
[`core::arch::wasm32::u32x4_relaxed_trunc_f32x4`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.u32x4\_relaxed_trunc_f32x4.html)
-
[`core::arch::wasm32::i32x4_relaxed_trunc_f64x2_zero`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.i32x4\_relaxed_trunc_f64x2\_zero.html)
-
[`core::arch::wasm32::u32x4_relaxed_trunc_f64x2_zero`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.u32x4\_relaxed_trunc_f64x2\_zero.html)
-
[`core::arch::wasm32::f32x4_relaxed_madd`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.f32x4\_relaxed_madd.html)
-
[`core::arch::wasm32::f32x4_relaxed_nmadd`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.f32x4\_relaxed_nmadd.html)
-
[`core::arch::wasm32::f64x2_relaxed_madd`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.f64x2\_relaxed_madd.html)
-
[`core::arch::wasm32::f64x2_relaxed_nmadd`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.f64x2\_relaxed_nmadd.html)
-
[`core::arch::wasm32::i8x16_relaxed_laneselect`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.i8x16\_relaxed_laneselect.html)
-
[`core::arch::wasm32::u8x16_relaxed_laneselect`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.u8x16\_relaxed_laneselect.html)
-
[`core::arch::wasm32::i16x8_relaxed_laneselect`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.i16x8\_relaxed_laneselect.html)
-
[`core::arch::wasm32::u16x8_relaxed_laneselect`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.u16x8\_relaxed_laneselect.html)
-
[`core::arch::wasm32::i32x4_relaxed_laneselect`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.i32x4\_relaxed_laneselect.html)
-
[`core::arch::wasm32::u32x4_relaxed_laneselect`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.u32x4\_relaxed_laneselect.html)
-
[`core::arch::wasm32::i64x2_relaxed_laneselect`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.i64x2\_relaxed_laneselect.html)
-
[`core::arch::wasm32::u64x2_relaxed_laneselect`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.u64x2\_relaxed_laneselect.html)
-
[`core::arch::wasm32::f32x4_relaxed_min`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.f32x4\_relaxed_min.html)
-
[`core::arch::wasm32::f32x4_relaxed_max`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.f32x4\_relaxed_max.html)
-
[`core::arch::wasm32::f64x2_relaxed_min`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.f64x2\_relaxed_min.html)
-
[`core::arch::wasm32::f64x2_relaxed_max`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.f64x2\_relaxed_max.html)
-
[`core::arch::wasm32::i16x8_relaxed_q15mulr`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.i16x8\_relaxed_q15mulr.html)
-
[`core::arch::wasm32::u16x8_relaxed_q15mulr`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.u16x8\_relaxed_q15mulr.html)
-
[`core::arch::wasm32::i16x8_relaxed_dot_i8x16_i7x16`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.i16x8\_relaxed_dot_i8x16\_i7x16.html)
-
[`core::arch::wasm32::u16x8_relaxed_dot_i8x16_i7x16`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.u16x8\_relaxed_dot_i8x16\_i7x16.html)
-
[`core::arch::wasm32::i32x4_relaxed_dot_i8x16_i7x16_add`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.i32x4\_relaxed_dot_i8x16\_i7x16\_add.html)
-
[`core::arch::wasm32::u32x4_relaxed_dot_i8x16_i7x16_add`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.u32x4\_relaxed_dot_i8x16\_i7x16\_add.html)

These APIs are now stable in const contexts:

-
[`std::task::Waker::from_raw`](https://doc.rust-lang.org/nightly/std/task/struct.Waker.html#method.from_raw)
-
[`std::task::Context::from_waker`](https://doc.rust-lang.org/nightly/std/task/struct.Context.html#method.from_waker)
-
[`std::task::Context::waker`](https://doc.rust-lang.org/nightly/std/task/struct.Context.html#method.waker)
-
[`{integer}::from_str_radix`](https://doc.rust-lang.org/nightly/std/primitive.u32.html#method.from_str_radix)
-
[`std::num::ParseIntError::kind`](https://doc.rust-lang.org/nightly/std/num/struct.ParseIntError.html#method.kind)

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

## Cargo

- [feat: Add `info` cargo
subcommand](https://redirect.github.com/rust-lang/cargo/pull/14141/)

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

## Compatibility Notes

- We now [disallow setting some built-in cfgs via the
command-line](https://redirect.github.com/rust-lang/rust/pull/126158)
with the newly added
[`explicit_builtin_cfgs_in_flags`](https://doc.rust-lang.org/rustc/lints/listing/deny-by-default.html#explicit-builtin-cfgs-in-flags)
lint in order to prevent incoherent state, eg. `windows` cfg active but
target is Linux based. The appropriate [`rustc`
flag](https://doc.rust-lang.org/rustc/command-line-arguments.html)
should be used instead.
- The standard library has a new implementation of `binary_search` which
is significantly improves performance
([#&#8203;128254](https://redirect.github.com/rust-lang/rust/pull/128254)).
However when a sorted slice has multiple values which compare equal, the
new implementation may select a different value among the equal ones
than the old implementation.
- [illumos/Solaris now sets `MSG_NOSIGNAL` when writing to
sockets](https://redirect.github.com/rust-lang/rust/pull/128259). This
avoids killing the process with SIGPIPE when writing to a closed socket,
which matches the existing behavior on other UNIX targets.
- [Removes a problematic hack that always passed the --whole-archive
linker flag for tests, which may cause linker errors for code
accidentally relying on
it.](https://redirect.github.com/rust-lang/rust/pull/128400)
- The WebAssembly target features `multivalue` and `reference-types` are
now
both enabled by default. These two features both have subtle changes
implied
for generated WebAssembly binaries. For the `multivalue` feature,
WebAssembly
target support has changed when upgrading to LLVM 19. Support for
generating
    functions with multiple returns no longer works and
`-Ctarget-feature=+multivalue` has a different meaning than it did in
LLVM 18
and prior. There is no longer any supported means to generate a module
that has
a function with multiple returns in WebAssembly from Rust source code.
For the
`reference-types` feature the encoding of immediates in the
`call_indirect`, a
commonly used instruction by the WebAssembly backend, has changed.
Validators
and parsers which don't understand the `reference-types` proposal will
no
longer accept modules produced by LLVM due to this change in encoding of
immediates. Additionally these features being enabled are encoded in the
`target_features` custom section and may affect downstream tooling such
as
`wasm-opt` consuming the module. Generating a WebAssembly module that
disables
default features requires `-Zbuild-std` support from Cargo and more
information
    can be found at

[rust-lang/rust#128511](https://redirect.github.com/rust-lang/rust/pull/128511).
- [Rust now raises unsafety errors for union patterns in
parameter-position](https://redirect.github.com/rust-lang/rust/pull/130531)

<a id="1.82.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
19](https://redirect.github.com/rust-lang/rust/pull/127513)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "* * * * *" (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:eyJjcmVhdGVkSW5WZXIiOiIzOS45Mi4wIiwidXBkYXRlZEluVmVyIjoiMzkuOTIuMCIsInRhcmdldEJyYW5jaCI6Im1hc3RlciIsImxhYmVscyI6W119-->
2025-01-10 21:13:44 +00:00
renovate[bot]
38105c381d
chore(deps): update msrv (3 versions) to v1.82 2025-01-10 20:40:54 +00:00
Weihang Lo
088d496082
docs(reference): Fix PkgIdSpec kind docs (#15049)
Fixes #15048

<!--
Thanks for submitting a pull request 🎉! Here are some tips for you:

* If this is your first contribution, read "Cargo Contribution Guide"
first:
  https://doc.crates.io/contrib/
* Run `cargo fmt --all` to format your code changes.
* Small commits and pull requests are always preferable and easy to
review.
* If your idea is large and needs feedback from the community, read how:
  https://doc.crates.io/contrib/process/#working-on-large-features
* Cargo takes care of compatibility. Read our design principles:
  https://doc.crates.io/contrib/design.html
* When changing help text of cargo commands, follow the steps to
generate docs:

https://github.com/rust-lang/cargo/tree/master/src/doc#building-the-man-pages
* If your PR is not finished, set it as "draft" PR or add "WIP" in its
title.
* It's ok to use the CI resources to test your PR, but please don't
abuse them.

### What does this PR try to resolve?

Explain the motivation behind this change.
A clear overview along with an in-depth explanation are helpful.

You can use `Fixes #<issue number>` to associate this PR to an existing
issue.

### How should we test and review this PR?

Demonstrate how you test this change and guide reviewers through your
PR.
With a smooth review process, a pull request usually gets reviewed
quicker.

If you don't know how to write and run your tests, please read the
guide:
https://doc.crates.io/contrib/tests

### Additional information

Other information you want to mention in this PR, such as prior arts,
future extensions, an unresolved problem, or a TODO list.
-->
2025-01-10 20:10:21 +00:00
Ed Page
c2b32517c5 docs(reference): Fix PkgIdSpec kind docs
Fixes #15048
2025-01-10 13:24:10 -06:00
Jacob Finkelman
92f096362c use option replace 2025-01-10 16:46:36 +00:00
Weihang Lo
c518f225a9
feat: Added warning when failing to update index cache (#15014)
<!--
Thanks for submitting a pull request 🎉! Here are some tips for you:

* If this is your first contribution, read "Cargo Contribution Guide"
first:
  https://doc.crates.io/contrib/
* Run `cargo fmt --all` to format your code changes.
* Small commits and pull requests are always preferable and easy to
review.
* If your idea is large and needs feedback from the community, read how:
  https://doc.crates.io/contrib/process/#working-on-large-features
* Cargo takes care of compatibility. Read our design principles:
  https://doc.crates.io/contrib/design.html
* When changing help text of cargo commands, follow the steps to
generate docs:

https://github.com/rust-lang/cargo/tree/master/src/doc#building-the-man-pages
* If your PR is not finished, set it as "draft" PR or add "WIP" in its
title.
* It's ok to use the CI resources to test your PR, but please don't
abuse them.

### What does this PR try to resolve?

Explain the motivation behind this change.
A clear overview along with an in-depth explanation are helpful.

You can use `Fixes #<issue number>` to associate this PR to an existing
issue.

### How should we test and review this PR?

Demonstrate how you test this change and guide reviewers through your
PR.
With a smooth review process, a pull request usually gets reviewed
quicker.

If you don't know how to write and run your tests, please read the
guide:
https://doc.crates.io/contrib/tests

### Additional information

Other information you want to mention in this PR, such as prior arts,
future extensions, an unresolved problem, or a TODO list.
-->

### What does this PR try to resolve?

Fixes #13712

Adds a warning if there is an error updating the index cache.
It also attempts to avoid warning spam as requested in [this
comment](https://github.com/rust-lang/cargo/issues/13712#issuecomment-2514991597)

Below is an example output

```
    Updating crates.io index
warning: failed to write cache, path: /home/ross/.cargo/registry/index/index.crates.io-1949cf8c6b5b557f/.cache/ba/se/base64, error: Permission denied (os error 13)
   Compiling serde v1.0.217
   Compiling r-efi v5.2.0
   Compiling base64 v0.22.1
   Compiling cargo-13712 v0.1.0 (/home/ross/projects/cargo-13712)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.20s

```

### How should we test and review this PR?

I tested this on my machine by manually changing the owner/permission of
the index files
```sh
sudo chown root ~/.cargo/registry/index/.../.cache/r-
sudo chmod 700 ~/.cargo/registry/index/.../.cache/r-

# in a project that uses the `r-efi` crate
cargo build
```

I wasn't quiet sure about the best way to add a test to the testsuite
for this. 😅
If there is good way to create a test for this lmk
2025-01-10 15:54:06 +00:00
ranger-ross
272d07ad78
feat: Added warning when failing to update index cache 2025-01-10 23:57:23 +09:00
ranger-ross
1d9a0871fa
test: Added test to verify registry cache write error emit warnings 2025-01-10 23:57:13 +09:00
Eric Huss
eb69b444a3
docs(ref): Fix the inverted logic about MSRV (#15044)
### What does this PR try to resolve?

Reported at
https://www.reddit.com/r/rust/comments/1hxfo8n/announcing_rust_1840/m6ajr41/

### How should we test and review this PR?

### Additional information
2025-01-10 02:02:02 +00:00
Ed Page
3a4abacae1
chore(deps): update msrv (1 version) to v1.84 (#15041)
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [MSRV:1](https://redirect.github.com/rust-lang/rust) | minor | `1.83`
-> `1.84` |

---

### Release Notes

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

###
[`v1.84`](https://redirect.github.com/rust-lang/rust/blob/HEAD/RELEASES.md#Version-1840-2025-01-09)

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

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

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

## Language

- [Allow `#[deny]` inside `#[forbid]` as a
no-op](https://redirect.github.com/rust-lang/rust/pull/121560/)
- [Show a warning when `-Ctarget-feature` is used to toggle features
that can lead to unsoundness due to ABI
mismatches](https://redirect.github.com/rust-lang/rust/pull/129884)
- [Use the next-generation trait solver in
coherence](https://redirect.github.com/rust-lang/rust/pull/130654)
- [Allow coercions to drop the principal of trait
objects](https://redirect.github.com/rust-lang/rust/pull/131857)
- [Support `/` as the path separator for `include!()` in all cases on
Windows](https://redirect.github.com/rust-lang/rust/pull/125205)
- [Taking a raw ref (`raw (const|mut)`) of a deref of a pointer (`*ptr`)
is now safe](https://redirect.github.com/rust-lang/rust/pull/129248)
- [Stabilize s390x inline
assembly](https://redirect.github.com/rust-lang/rust/pull/131258)
- [Stabilize Arm64EC inline
assembly](https://redirect.github.com/rust-lang/rust/pull/131781)
- [Lint against creating pointers to immediately dropped
temporaries](https://redirect.github.com/rust-lang/rust/pull/128985)
- [Execute drop glue when unwinding in an `extern "C"`
function](https://redirect.github.com/rust-lang/rust/pull/129582)

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

## Compiler

- [Add `--print host-tuple` flag to print the host target tuple and
affirm the "target tuple" terminology over "target
triple"](https://redirect.github.com/rust-lang/rust/pull/125579)
- [Declaring functions with a calling convention not supported on the
current target now triggers a hard
error](https://redirect.github.com/rust-lang/rust/pull/129935)
- [Set up indirect access to external data for
`loongarch64-unknown-linux-{musl,ohos}`](https://redirect.github.com/rust-lang/rust/pull/131583)
- [Enable XRay instrumentation for LoongArch Linux
targets](https://redirect.github.com/rust-lang/rust/pull/131818)
- [Extend the `unexpected_cfgs` lint to also warn in external
macros](https://redirect.github.com/rust-lang/rust/pull/132577)
- [Stabilize WebAssembly `multivalue`, `reference-types`, and
`tail-call` target
features](https://redirect.github.com/rust-lang/rust/pull/131080)
- [Added Tier 2 support for the `wasm32v1-none`
target](https://redirect.github.com/rust-lang/rust/pull/131487)

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

## Libraries

- [Implement `From<&mut {slice}>` for
`Box/Rc/Arc<{slice}>`](https://redirect.github.com/rust-lang/rust/pull/129329)
- [Move `<float>::copysign`, `<float>::abs`, `<float>::signum` to
`core`](https://redirect.github.com/rust-lang/rust/pull/131304)
- [Add `LowerExp` and `UpperExp` implementations to
`NonZero`](https://redirect.github.com/rust-lang/rust/pull/131377)
- [Implement `FromStr` for `CString` and `TryFrom<CString>` for
`String`](https://redirect.github.com/rust-lang/rust/pull/130608)
- [`std::os::darwin` has been made
public](https://redirect.github.com/rust-lang/rust/pull/123723)

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

## Stabilized APIs

-
[`Ipv6Addr::is_unique_local`](https://doc.rust-lang.org/stable/core/net/struct.Ipv6Addr.html#method.is_unique_local)
-
[`Ipv6Addr::is_unicast_link_local`](https://doc.rust-lang.org/stable/core/net/struct.Ipv6Addr.html#method.is_unicast_link_local)
-
[`core::ptr::with_exposed_provenance`](https://doc.rust-lang.org/stable/core/ptr/fn.with_exposed_provenance.html)
-
[`core::ptr::with_exposed_provenance_mut`](https://doc.rust-lang.org/stable/core/ptr/fn.with_exposed_provenance_mut.html)
-
[`<ptr>::addr`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.addr)
-
[`<ptr>::expose_provenance`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.expose_provenance)
-
[`<ptr>::with_addr`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.with_addr)
-
[`<ptr>::map_addr`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.map_addr)
-
[`<int>::isqrt`](https://doc.rust-lang.org/stable/core/primitive.i32.html#method.isqrt)
-
[`<int>::checked_isqrt`](https://doc.rust-lang.org/stable/core/primitive.i32.html#method.checked_isqrt)
-
[`<uint>::isqrt`](https://doc.rust-lang.org/stable/core/primitive.u32.html#method.isqrt)
-
[`NonZero::isqrt`](https://doc.rust-lang.org/stable/core/num/struct.NonZero.html#impl-NonZero%3Cu128%3E/method.isqrt)
-
[`core::ptr::without_provenance`](https://doc.rust-lang.org/stable/core/ptr/fn.without_provenance.html)
-
[`core::ptr::without_provenance_mut`](https://doc.rust-lang.org/stable/core/ptr/fn.without_provenance_mut.html)
-
[`core::ptr::dangling`](https://doc.rust-lang.org/stable/core/ptr/fn.dangling.html)
-
[`core::ptr::dangling_mut`](https://doc.rust-lang.org/stable/core/ptr/fn.dangling_mut.html)

These APIs are now stable in const contexts

-
[`AtomicBool::from_ptr`](https://doc.rust-lang.org/stable/core/sync/atomic/struct.AtomicBool.html#method.from_ptr)
-
[`AtomicPtr::from_ptr`](https://doc.rust-lang.org/stable/core/sync/atomic/struct.AtomicPtr.html#method.from_ptr)
-
[`AtomicU8::from_ptr`](https://doc.rust-lang.org/stable/core/sync/atomic/struct.AtomicU8.html#method.from_ptr)
-
[`AtomicU16::from_ptr`](https://doc.rust-lang.org/stable/core/sync/atomic/struct.AtomicU16.html#method.from_ptr)
-
[`AtomicU32::from_ptr`](https://doc.rust-lang.org/stable/core/sync/atomic/struct.AtomicU32.html#method.from_ptr)
-
[`AtomicU64::from_ptr`](https://doc.rust-lang.org/stable/core/sync/atomic/struct.AtomicU64.html#method.from_ptr)
-
[`AtomicUsize::from_ptr`](https://doc.rust-lang.org/stable/core/sync/atomic/struct.AtomicUsize.html#method.from_ptr)
-
[`AtomicI8::from_ptr`](https://doc.rust-lang.org/stable/core/sync/atomic/struct.AtomicI8.html#method.from_ptr)
-
[`AtomicI16::from_ptr`](https://doc.rust-lang.org/stable/core/sync/atomic/struct.AtomicI16.html#method.from_ptr)
-
[`AtomicI32::from_ptr`](https://doc.rust-lang.org/stable/core/sync/atomic/struct.AtomicI32.html#method.from_ptr)
-
[`AtomicI64::from_ptr`](https://doc.rust-lang.org/stable/core/sync/atomic/struct.AtomicI64.html#method.from_ptr)
-
[`AtomicIsize::from_ptr`](https://doc.rust-lang.org/stable/core/sync/atomic/struct.AtomicIsize.html#method.from_ptr)
-
[`<ptr>::is_null`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.is_null-1)
-
[`<ptr>::as_ref`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.as_ref-1)
-
[`<ptr>::as_mut`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.as_mut)
-
[`Pin::new`](https://doc.rust-lang.org/stable/core/pin/struct.Pin.html#method.new)
-
[`Pin::new_unchecked`](https://doc.rust-lang.org/stable/core/pin/struct.Pin.html#method.new_unchecked)
-
[`Pin::get_ref`](https://doc.rust-lang.org/stable/core/pin/struct.Pin.html#method.get_ref)
-
[`Pin::into_ref`](https://doc.rust-lang.org/stable/core/pin/struct.Pin.html#method.into_ref)
-
[`Pin::get_mut`](https://doc.rust-lang.org/stable/core/pin/struct.Pin.html#method.get_mut)
-
[`Pin::get_unchecked_mut`](https://doc.rust-lang.org/stable/core/pin/struct.Pin.html#method.get_unchecked_mut)
-
[`Pin::static_ref`](https://doc.rust-lang.org/stable/core/pin/struct.Pin.html#method.static_ref)
-
[`Pin::static_mut`](https://doc.rust-lang.org/stable/core/pin/struct.Pin.html#method.static_mut)

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

## Cargo

- [Stabilize MSRV-aware resolver
config](https://redirect.github.com/rust-lang/cargo/pull/14639/)
- [Stabilize resolver
v3](https://redirect.github.com/rust-lang/cargo/pull/14754/)

<a id="1.84-Rustdoc"></a>

## Rustdoc

- [rustdoc-search: improve type-driven
search](https://redirect.github.com/rust-lang/rust/pull/127589)

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

## Compatibility Notes

- [Enable by default the `LSX` target feature for LoongArch Linux
targets](https://redirect.github.com/rust-lang/rust/pull/132140)
- [The unstable `-Zprofile` flag (“gcov-style” coverage instrumentation)
has been
removed.](https://redirect.github.com/rust-lang/rust/pull/131829) This
does not affect the stable flags for coverage instrumentation
(`-Cinstrument-coverage`) and profile-guided optimization
(`-Cprofile-generate`, `-Cprofile-use`), which are unrelated and remain
available.
- Support for the target named `wasm32-wasi` has been removed as the
target is now named `wasm32-wasip1`. This completes the
[transition](https://redirect.github.com/rust-lang/compiler-team/issues/607)
[plan](https://redirect.github.com/rust-lang/compiler-team/issues/695)
for this target following [the introduction of
`wasm32-wasip1`](https://redirect.github.com/rust-lang/rust/pull/120468)
in Rust 1.78. Compiler warnings on [use of
`wasm32-wasi`](https://redirect.github.com/rust-lang/rust/pull/126662)
introduced in Rust 1.81 are now gone as well as the target is removed.
- [The syntax `&pin (mut|const) T` is now parsed as a type which in
theory could affect macro expansion results in some edge
cases](https://redirect.github.com/rust-lang/rust/pull/130635#issuecomment-2375462821)
- [Legacy syntax for calling `std::arch` functions is no longer
permitted to declare items or bodies (such as closures, inline consts,
or async
blocks).](https://redirect.github.com/rust-lang/rust/pull/130443#issuecomment-2445678945)
- The `wasm32-unknown-emscripten` target's binary release of the
standard library is now [built with the latest emsdk
3.1.68](https://redirect.github.com/rust-lang/rust/pull/131533), which
fixes an ABI-incompatibility with Emscripten >= 3.1.42. If you are
locally using a version of emsdk with an incompatible ABI (e.g. before
3.1.42 or a future one), you should build your code with `-Zbuild-std`
to ensure that `std` uses the correct ABI.
- [Declaring functions with a calling convention not supported on the
current target now triggers a hard
error](https://redirect.github.com/rust-lang/rust/pull/129935)
- [The next-generation trait solver is now enabled for coherence, fixing
multiple soundness
issues](https://redirect.github.com/rust-lang/rust/pull/130654)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "* * * * *" (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:eyJjcmVhdGVkSW5WZXIiOiIzOS45Mi4wIiwidXBkYXRlZEluVmVyIjoiMzkuOTIuMCIsInRhcmdldEJyYW5jaCI6Im1hc3RlciIsImxhYmVscyI6W119-->
2025-01-09 21:50:00 +00:00
Ed Page
f4f28004f4 docs(ref): Fix the inverted logic about MSRV 2025-01-09 15:40:32 -06:00
Ed Page
b75783a923 chore: Bump versions 2025-01-09 15:18:56 -06:00
Weihang Lo
9589831f61
Remove unnecessary into conversions (#15042)
"identity" `.into()` calls where the base's type isn't changed is a
future compatibility foot-gun (like the issue we had with `time` a few
months ago) as new `impl Into` blocks can cause previously compiling
code to start failing. I don't foresee these ones in particular causing
problems anytime soon, but I noticed them and might as well clean them
up as a drive-by.
2025-01-09 19:58:12 +00:00
Weihang Lo
fdaccd421e
docs(contrib): Start guidelines for schema design (#15037)
### What does this PR try to resolve?

This was inspired by a recent Cargo team discussion on whether we should
generally elide default values.
This will also help with
https://rust-lang.github.io/rust-project-goals/2025h1/cargo-plumbing.html

Case studies in schema design:
- https://github.com/rust-lang/cargo/issues/14506
- https://github.com/rust-lang/cargo/issues/10543

### How should we test and review this PR?

### Additional information
2025-01-09 19:39:10 +00:00
Esteban Küber
d954a43e4a Remove unnecessary into conversions 2025-01-09 19:20:27 +00:00
renovate[bot]
7ee43a58ec
chore(deps): update msrv (1 version) to v1.84 2025-01-09 19:15:56 +00:00
Jacob Finkelman
5e9f7214a0 remove argument 2025-01-09 18:17:23 +00:00