]> git.bitcoin.ninja Git - rust-lightning/commit
Add an `explicit_type` TLV syntax for avoiding certain cases of type inference
authorDuncan Dean <git@dunxen.dev>
Fri, 6 Sep 2024 10:26:19 +0000 (12:26 +0200)
committerDuncan Dean <git@dunxen.dev>
Wed, 2 Oct 2024 11:08:04 +0000 (13:08 +0200)
commitc0d84e85c7f1af37882087f6a798ef7d1bc5c52b
tree0f3e8b1533a9ff440d7376db374b09f2a9fa8dec
parentc7627dfd61ffaff1b9a94ef59ecb312b4a33da38
Add an `explicit_type` TLV syntax for avoiding certain cases of type inference

This new syntax is used to fix "dependency on fallback of ! -> ()".
This avoids cases where code compiles with a fallback of the
never type leading to the unit type. The behaviour in Rust edition 2024
would make this a compile error.

See: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_lint/builtin/static.DEPENDENCY_ON_UNIT_NEVER_TYPE_FALLBACK.html#
.github/workflows/build.yml
lightning/src/ln/chan_utils.rs
lightning/src/util/ser_macros.rs