Skip to content

Conversation

@sigurpol
Copy link
Contributor

This prevents the future hard error that would occur in Rust 2024.

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.

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.
@sigurpol sigurpol changed the title Fixed Never Type Fallback being () Warning Fixed Never Type Fallback being () warning Jun 24, 2025
@sigurpol sigurpol requested review from alexggh and cheme June 24, 2025 08:05
@sigurpol sigurpol merged commit f0ef95b into master Jun 24, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants