[beta-1.95] Add missing truncate when writing .crate files#16713
[beta-1.95] Add missing truncate when writing .crate files#16713epage merged 1 commit intorust-lang:rust-1.95.0from
Conversation
|
r? @ehuss rustbot has assigned @ehuss. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
|
The failure was due to rust-lang/rust#152164, which worked correctly as ECHO_SCRIPT doesn't have any frontmatter. A quick fix for our test suite can be adding empty frontmatter to ECHO_SCRIPT, but that won't help user's Cargo script. Another quick fix is adding |
|
BTW the fix should be ported to both master and rust-1.95.0 branch. |
### What does this PR try to resolve? rust-lang/rust#152164 added a warn-by-default `unused_features` lint. Cargo injects `#![feature(frontmatter)]` for all embedded scripts, but scripts without frontmatter syntax never trigger feature gate check, and causes causing the lint warning. Given the stabilization FCP of frontmatter [is complete](rust-lang/rust#148051 (comment)) already, we could expect it will soon be stabilized (?). It should be fine we suppress this new unstable lint. ### How to test and review this PR? Test suite passes. See <#16713 (comment)> for more.
…16714) ### What does this PR try to resolve? rust-lang/rust#152164 added a warn-by-default `unused_features` lint. Cargo injects `#![feature(frontmatter)]` for all embedded scripts, but scripts without frontmatter syntax never trigger feature gate check, and causes causing the lint warning. Given the stabilization FCP of frontmatter [is complete](rust-lang/rust#148051 (comment)) already, we could expect it will soon be stabilized (?). It should be fine we suppress this new unstable lint. ### How to test and review this PR? Test suite passes. See <rust-lang#16713 (comment)> for more.
|
Posted #16715 to update the tests. |
<!-- _Thanks for the pull request 🎉!_ _Please read the contribution guide: <https://doc.crates.io/contrib/>._ --> ### What does this PR try to resolve? Fixes rust-lang#16683 by adding manuall truncate. <!-- _Explain the motivation behind this change._ _A clear overview along with an in-depth explanation are helpful._ --> ### How to test and review this PR? See the original issue for mCVE. <!-- _Demonstrate how you test this change and guide reviewers through your PR._ _With a smooth review process, a pull request usually gets reviewed quicker._ -->
|
This PR was rebased onto a different rust-1.95.0 commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
[beta] update stage0 and cargo Update stage0 to 1.94.0 <https://forge.rust-lang.org/release/process.html#beta-stage0-update-friday> --- Update cargo submodule #153515 2 commits in f298b8c82da0cba538516b45b04a480fc501d4c0..e8eb8435d5cad936237a1ee798c2f983624d0825 2026-02-24 21:59:20 +0000 to 2026-03-06 12:51:00 -0600 - [beta-1.95] Add missing truncate when writing .crate files (rust-lang/cargo#16713) - [beta 1.95] backport test fixes (rust-lang/cargo#16715)
Beta backports
In order to make CI pass, the following PRs are also cherry-picked: