clippy: whitelist uninhabited_references lint

This lint triggers on `fn input_len(&self) -> usize { match *self {} }`
where Self is an infallible type, claiming that the dereference of self
is UB. Maybe it would be, if this were possible. But it's not, and this
is literally the only point of using infallible types, so this lint is
always wrong.

Enabled in rustc 1.76 as warn by default.
This commit is contained in:
Andrew Poelstra 2023-12-19 16:38:53 +00:00
parent 8315760403
commit 6cdbb04820
No known key found for this signature in database
GPG Key ID: C588D63CE41B97C1
1 changed files with 1 additions and 0 deletions

View File

@ -38,6 +38,7 @@
#![cfg_attr(fuzzing, allow(dead_code, unused_imports))] #![cfg_attr(fuzzing, allow(dead_code, unused_imports))]
// Exclude clippy lints we don't think are valuable // Exclude clippy lints we don't think are valuable
#![allow(clippy::needless_question_mark)] // https://github.com/rust-bitcoin/rust-bitcoin/pull/2134 #![allow(clippy::needless_question_mark)] // https://github.com/rust-bitcoin/rust-bitcoin/pull/2134
#![allow(clippy::uninhabited_references)] // falsely claims that 100% safe code is UB
// Disable 16-bit support at least for now as we can't guarantee it yet. // Disable 16-bit support at least for now as we can't guarantee it yet.
#[cfg(target_pointer_width = "16")] #[cfg(target_pointer_width = "16")]