Skip to content

Commit 8f06933

Browse files
committed
Allow unpredictable_function_pointer_comparisons lint in more places
1 parent 3c1ffb9 commit 8f06933

File tree

4 files changed

+6
-0
lines changed

4 files changed

+6
-0
lines changed

library/core/src/task/wake.rs

+1
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ impl RawWaker {
107107
/// synchronization. This is because [`LocalWaker`] is not thread safe itself, so it cannot
108108
/// be sent across threads.
109109
#[stable(feature = "futures_api", since = "1.36.0")]
110+
#[cfg_attr(not(bootstrap), allow(unpredictable_function_pointer_comparisons))]
110111
#[derive(PartialEq, Copy, Clone, Debug)]
111112
pub struct RawWakerVTable {
112113
/// This function will be called when the [`RawWaker`] gets cloned, e.g. when

tests/ui/issues/issue-28561.rs

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ struct Array<T> {
3737
}
3838

3939
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
40+
#[allow(unpredictable_function_pointer_comparisons)]
4041
struct Fn<A, B, C, D, E, F, G, H, I, J, K, L> {
4142
f00: fn(),
4243
f01: fn(A),

tests/ui/mir/mir_refs_correct.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
//@ run-pass
22
//@ aux-build:mir_external_refs.rs
33

4+
#![allow(unpredictable_function_pointer_comparisons)]
5+
46
extern crate mir_external_refs as ext;
57

68
struct S(#[allow(dead_code)] u8);

tests/ui/nullable-pointer-iotareduction.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// trying to get assert failure messages that at least identify which case
99
// failed.
1010

11+
#![allow(unpredictable_function_pointer_comparisons)]
12+
1113
enum E<T> { Thing(isize, T), #[allow(dead_code)] Nothing((), ((), ()), [i8; 0]) }
1214
impl<T> E<T> {
1315
fn is_none(&self) -> bool {

0 commit comments

Comments
 (0)