diff options
| author | Urgau <urgau@numericable.fr> | 2024-12-19 22:33:49 +0100 |
|---|---|---|
| committer | Urgau <urgau@numericable.fr> | 2025-06-12 07:35:05 +0200 |
| commit | 14b3e630129a3c89020e79bf7f0f1e60f6a6e93a (patch) | |
| tree | 5bc48a2985fa044ea507c34b61999352f62752ad | |
| parent | fafc0f249f8d6c2eabd2c75dca536f04ddead79f (diff) | |
| download | rust-14b3e630129a3c89020e79bf7f0f1e60f6a6e93a.tar.gz rust-14b3e630129a3c89020e79bf7f0f1e60f6a6e93a.zip | |
Allow `unpredictable_function_pointer_comparisons` lint in more places
| -rw-r--r-- | library/core/src/task/wake.rs | 1 | ||||
| -rw-r--r-- | tests/ui/issues/issue-28561.rs | 1 | ||||
| -rw-r--r-- | tests/ui/mir/mir_refs_correct.rs | 2 | ||||
| -rw-r--r-- | tests/ui/nullable-pointer-iotareduction.rs | 2 |
4 files changed, 6 insertions, 0 deletions
diff --git a/library/core/src/task/wake.rs b/library/core/src/task/wake.rs index 9b8fefe42af..bb7efe582f7 100644 --- a/library/core/src/task/wake.rs +++ b/library/core/src/task/wake.rs @@ -104,6 +104,7 @@ impl RawWaker { /// synchronization. This is because [`LocalWaker`] is not thread safe itself, so it cannot /// be sent across threads. #[stable(feature = "futures_api", since = "1.36.0")] +#[allow(unpredictable_function_pointer_comparisons)] #[derive(PartialEq, Copy, Clone, Debug)] pub struct RawWakerVTable { /// This function will be called when the [`RawWaker`] gets cloned, e.g. when diff --git a/tests/ui/issues/issue-28561.rs b/tests/ui/issues/issue-28561.rs index f9b0ceb22fc..642b2193a4f 100644 --- a/tests/ui/issues/issue-28561.rs +++ b/tests/ui/issues/issue-28561.rs @@ -37,6 +37,7 @@ struct Array<T> { } #[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] +#[allow(unpredictable_function_pointer_comparisons)] struct Fn<A, B, C, D, E, F, G, H, I, J, K, L> { f00: fn(), f01: fn(A), diff --git a/tests/ui/mir/mir_refs_correct.rs b/tests/ui/mir/mir_refs_correct.rs index fc23c8c3631..f1832d90a0f 100644 --- a/tests/ui/mir/mir_refs_correct.rs +++ b/tests/ui/mir/mir_refs_correct.rs @@ -1,6 +1,8 @@ //@ run-pass //@ aux-build:mir_external_refs.rs +#![allow(unpredictable_function_pointer_comparisons)] + extern crate mir_external_refs as ext; struct S(#[allow(dead_code)] u8); diff --git a/tests/ui/nullable-pointer-iotareduction.rs b/tests/ui/nullable-pointer-iotareduction.rs index fa837dab51b..1b73164c9fc 100644 --- a/tests/ui/nullable-pointer-iotareduction.rs +++ b/tests/ui/nullable-pointer-iotareduction.rs @@ -8,6 +8,8 @@ // trying to get assert failure messages that at least identify which case // failed. +#![allow(unpredictable_function_pointer_comparisons)] + enum E<T> { Thing(isize, T), #[allow(dead_code)] Nothing((), ((), ()), [i8; 0]) } impl<T> E<T> { fn is_none(&self) -> bool { |
