Ed Page 29363ab601
fix(toml): show required rust-version in unstable edition error (#16653)
## What does this PR try to resolve?

Fixes the unhelpful error when a package declares an unstable edition on
a
stable Cargo toolchain. Previously the error told the user to "try a
newer
version of Cargo" but gave no indication of *which* version, forcing
them to
dig through docs.

This PR adds a `help:` line that names the required toolchain version,
derived from the package's `rust-version` field (or from
`Edition::first_version()` once that is set at unstable time).

Before:
```
Consider trying a newer version of Cargo (this may require the nightly release).
See https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#unstable-editions
```

After:
```
Consider trying a newer version of Cargo (this may require the nightly release).
help: mypackage@0.1.0 requires rustc 1.90
See https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#unstable-editions
```

Also fixes a latent bug in `edition_unstable_gated`: it expected
`feature 'edition{next}'` but current code emits `feature
'unstable-editions'`.
The test was silently skipping because `Edition::LATEST_UNSTABLE` is
`None`.

Fixes #15305
2026-02-25 17:59:16 +00:00
..
2026-01-24 17:52:57 -08:00
2026-01-22 09:03:58 -08:00
2025-11-14 15:16:02 +08:00
2025-11-14 21:52:18 +01:00
2026-01-24 17:52:57 -08:00
2026-02-11 21:26:12 +09:00
2025-09-02 18:15:50 -06:00
2025-11-12 09:31:23 -07:00
2025-11-06 07:35:35 -06:00
2025-10-14 22:29:51 -05:00
2025-11-12 09:31:23 -07:00
2025-10-14 22:29:51 -05:00