Summary
native-tls v0.2.17 fails to compile with a non-exhaustive patterns error in src/imp/openssl.rs. The Protocol::Tlsv13 variant exists in the Protocol enum but is not handled in the openssl backend's match arms.
Error
error[E0004]: non-exhaustive patterns: `Some(Protocol::Tlsv13)` not covered
--> native-tls-0.2.17/src/imp/openssl.rs:61:22
|
61 | options |= match min {
| ^^^ pattern `Some(Protocol::Tlsv13)` not covered
error[E0004]: non-exhaustive patterns: `Some(Protocol::Tlsv13)` not covered
--> native-tls-0.2.17/src/imp/openssl.rs:75:22
|
75 | options |= match max {
| ^^^ pattern `Some(Protocol::Tlsv13)` not covered
Reproduction
cargo install cargo-tarpaulin # or any crate that depends on native-tls ^0.2
Fails because cargo resolves native-tls to 0.2.17 (the latest), which has this bug.
Environment
native-tls: 0.2.17
rustc: 1.93.0-nightly (c23ed3ef2 2025-11-23)
- OS: Linux (x86_64)
Workaround
Pin to native-tls ≤ 0.2.16, or use --locked when installing crates that depend on it (so their published Cargo.lock resolves to an older version).
Fix
The Protocol::Tlsv13 arm needs to be added to the min/max match blocks in src/imp/openssl.rs.
Summary
native-tls v0.2.17fails to compile with a non-exhaustive patterns error insrc/imp/openssl.rs. TheProtocol::Tlsv13variant exists in theProtocolenum but is not handled in the openssl backend's match arms.Error
Reproduction
Fails because cargo resolves
native-tlsto0.2.17(the latest), which has this bug.Environment
native-tls: 0.2.17rustc: 1.93.0-nightly (c23ed3ef2 2025-11-23)Workaround
Pin to
native-tls≤ 0.2.16, or use--lockedwhen installing crates that depend on it (so their published Cargo.lock resolves to an older version).Fix
The
Protocol::Tlsv13arm needs to be added to themin/maxmatch blocks insrc/imp/openssl.rs.