Skip to content

Upgrade to Rust 1.88 - #19825

Merged
alice-i-cecile merged 2 commits into
bevyengine:mainfrom
tychedelia:rustc-188
Jun 26, 2025
Merged

alice-i-cecile merged 2 commits into
bevyengine:mainfrom
tychedelia:rustc-188

Conversation

@tychedelia

Copy link
Copy Markdown
Member

No description provided.

self.contains(Key::OIT_ENABLED)
.then_some("_oit")
.unwrap_or_default(),
if self.contains(Key::MULTISAMPLED) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's wrong with unwrap_or_default()?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

obfuscated_if_else now supports then().unwrap_or_else() and then_some().unwrap_or_else() rust-lang/rust-clippy#14165

});
}

#[expect(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we put this on the assert! instead of the function so it's more clear which line is triggering clippy?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope that doesn't work

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

error[E0658]: attributes on expressions are experimental

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that sounds like you put it inside the assert! instead of above.

#[expect(
            clippy::neg_multiply,
            reason = "Clippy doesn't like this, but it's correct"
        )]
        assert_eq!(
            mapped_curve.sample_unchecked(-1.0),
            (-1.0 * 3.0 + 1.0) / 7.0
        );

seems to work for me.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nvm, it's giving an error about not applying to macros

@alice-i-cecile
alice-i-cecile enabled auto-merge June 26, 2025 19:33
@alice-i-cecile alice-i-cecile added D-Trivial Nice and easy! A great choice to get started with Bevy C-Code-Quality A section of code that is hard to understand or change S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it P-Critical This must be fixed immediately or contributors or users will be severely impacted A-Cross-Cutting Impacts the entire engine labels Jun 26, 2025
@alice-i-cecile
alice-i-cecile added this pull request to the merge queue Jun 26, 2025
Merged via the queue into bevyengine:main with commit 92e65d5 Jun 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Cross-Cutting Impacts the entire engine C-Code-Quality A section of code that is hard to understand or change D-Trivial Nice and easy! A great choice to get started with Bevy P-Critical This must be fixed immediately or contributors or users will be severely impacted S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants