Fixed Never Type Fallback being () warning#223
Merged
Conversation
This prevents the future hard error that would occur in Rust 2024. ```bash cargo report future-incompatibilities --id 1 --package trie-db@0.30.0 The following warnings were discovered during the build. These warnings are an indication that the packages contain code that will become an error in a future release of Rust. These warnings typically cover changes to close soundness problems, unintended or undocumented behavior, or critical problems that cannot be fixed in a backwards-compatible fashion, and are not expected to be in wide use. Each warning should contain a link for more information on what the warning means and how to resolve it. To solve this problem, you can try the following approaches: - If the issue is not solved by updating the dependencies, a fix has to be implemented by those dependencies. You can help with that by notifying the maintainers of this problem (e.g. by creating a bug report) or by proposing a fix to the maintainers (e.g. by creating a pull request): - trie-db@0.30.0 - Repository: https://github.com/paritytech/trie - Detailed warning command: `cargo report future-incompatibilities --id 1 --package trie-db@0.30.0` - If waiting for an upstream fix is not an option, you can use the `[patch]` section in `Cargo.toml` to use your own version of the dependency. For more information, see: https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html#the-patch-section The package `trie-db v0.30.0` currently triggers the following future incompatibility lints: > warning: this function depends on never type fallback being `()` > --> /Users/paolo/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/trie-db-0.30.0/src/node.rs:206:2 > | > 206 | / pub fn to_owned_node<L: TrieLayout>( > 207 | | &self, > 208 | | ) -> Result<NodeOwned<TrieHash<L>>, TrieHash<L>, CError<L>> { > | |_______________________________________________________________^ > | > = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in Rust 2024 and in a future release in all editions! > = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/never-type-fallback.html> > = help: specify the types explicitly > note: in edition 2024, the requirement `!: FromIterator<()>` will fail ``` Since we are there, fixed also lifetime syntax warnings and dead code warnings.
Never Type Fallback being () WarningNever Type Fallback being () warning
acatangiu
approved these changes
Jun 24, 2025
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This prevents the future hard error that would occur in Rust 2024.
Since we are there, fixed also lifetime syntax warnings and dead code warnings.