-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Allow to expect (adopted) #15301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Allow to expect (adopted) #15301
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
4aa4081
feat(ecs): specify ellided lifetime
BD103 3d48e7a
feat: warn on allow attributes without reason
BD103 58b379a
refactor: switch `#[allow(missing_docs)]` to `#[expect(missing_docs)]`
BD103 5a94b2e
refactor(ptr): migrate `bevy_ptr`
BD103 c0830cb
refactor(utils): migrate `bevy_utils`
BD103 1b0e8e0
refactor(reflect): migrate `bevy_reflect`
BD103 648ff55
refactor(tasks): migrate `bevy_tasks`
BD103 4981d93
refactor(ecs): migrate `bevy_ecs`
BD103 66f72a7
refactor(derive): migrate `bevy_derive`
BD103 4a9db7d
refactor(tasks): migrate a forgotten `allow` attribute
BD103 5bfe4b7
refactor(app): migrate `bevy_app`
BD103 37cacc4
refactor: rustfmt
BD103 cac6cbf
fix(reflect): switch some `#[expect(...)]` to `#[allow(...)]` when th…
BD103 486781c
refactor(asset_macros): migrate `bevy_asset_macros`
BD103 c50791f
refactor(encase_derive): migrate `bevy_encase_derive`
BD103 dce395d
fix: better wording in `bevy_app` reason
BD103 8f8756c
feat(reflect): condional `#[expect(...)]`
BD103 80202ee
refactor: switch all `#![allow(missing_docs]` to `expect` with a reason
BD103 1cfe910
refactor(log): migrate `bevy_log`
BD103 1631b97
refactor(time): migrate `bevy_time`
BD103 73868a4
refactor(transform): migrate `bevy_transform`
BD103 5ce7428
refactor(asset): migrate `bevy_asset`
BD103 2a296a8
Fix typo
bas-ie 462f8ad
Fix typo
bas-ie e2ca452
Fix quotes
bas-ie 98e02f8
Remove EnumVariant::index (dead code)
bas-ie 18f523a
Temporarily remove allow_attributes_without_warn
bas-ie ae87e76
Remove another use of index
bas-ie 31918d5
Temporarily remove crate-level expect
bas-ie 622c015
Merge branch 'main' into allow-to-expect
bas-ie cdcaf84
Remove defunct comment
bas-ie ff5ecf9
Temporarily replace #![expect] with #![allow]
bas-ie dd95b7b
Fix more CI failures (for now)
bas-ie 762b9d9
Bump minimum supported Rust to 1.81.0
bas-ie File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,7 +76,7 @@ use std::{ | |
use thiserror::Error; | ||
|
||
// Needed for doc strings | ||
#[allow(unused_imports)] | ||
#[allow(unused_imports, reason = "Needed for documentation links.")] | ||
use crate::io::{AssetReader, AssetWriter}; | ||
bas-ie marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
/// A "background" asset processor that reads asset values from a source [`AssetSource`] (which corresponds to an [`AssetReader`] / [`AssetWriter`] pair), | ||
|
@@ -557,7 +557,13 @@ impl AssetProcessor { | |
/// This info will later be used to determine whether or not to re-process an asset | ||
/// | ||
/// This will validate transactions and recover failed transactions when necessary. | ||
#[allow(unused)] | ||
#[cfg_attr( | ||
any(target_arch = "wasm32", not(feature = "multi_threaded")), | ||
expect( | ||
dead_code, | ||
reason = "This function is only used when the `multi_threaded` feature is enabled, and when not on WASM." | ||
) | ||
)] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would it make sense to instead make intialize() feature-gated? |
||
async fn initialize(&self) -> Result<(), InitializeError> { | ||
self.validate_transaction_log_and_recover().await; | ||
let mut asset_infos = self.data.asset_infos.write().await; | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,7 +67,10 @@ use {bevy_ecs::system::Resource, bevy_utils::synccell::SyncCell}; | |
/// Wrapper resource for `tracing-chrome`'s flush guard. | ||
/// When the guard is dropped the chrome log is written to file. | ||
#[cfg(feature = "tracing-chrome")] | ||
#[allow(dead_code)] | ||
#[expect( | ||
dead_code, | ||
reason = "`FlushGuard` never needs to be read, it just needs to be kept alive for the `App`'s lifetime." | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is so much more useful, wow. |
||
)] | ||
#[derive(Resource)] | ||
pub(crate) struct FlushGuard(SyncCell<tracing_chrome::FlushGuard>); | ||
|
||
|
@@ -187,7 +190,6 @@ impl Default for LogPlugin { | |
} | ||
|
||
impl Plugin for LogPlugin { | ||
#[cfg_attr(not(feature = "tracing-chrome"), allow(unused_variables))] | ||
fn build(&self, app: &mut App) { | ||
#[cfg(feature = "trace")] | ||
{ | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.