1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171
|
warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique
--> $DIR/fn-ptr-comparisons.rs:26:13
|
LL | let _ = f == a;
| ^^^^^^
|
= note: the address of the same function can vary between different codegen units
= note: furthermore, different functions could have the same address after being merged together
= note: for more information visit <https://doc.rust-lang.org/nightly/core/ptr/fn.fn_addr_eq.html>
= note: `#[warn(unpredictable_function_pointer_comparisons)]` on by default
help: refactor your code, or use `std::ptr::fn_addr_eq` to suppress the lint
|
LL | let _ = std::ptr::fn_addr_eq(f, a as fn());
| +++++++++++++++++++++ ~ ++++++++
warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique
--> $DIR/fn-ptr-comparisons.rs:28:13
|
LL | let _ = f != a;
| ^^^^^^
|
= note: the address of the same function can vary between different codegen units
= note: furthermore, different functions could have the same address after being merged together
= note: for more information visit <https://doc.rust-lang.org/nightly/core/ptr/fn.fn_addr_eq.html>
help: refactor your code, or use `std::ptr::fn_addr_eq` to suppress the lint
|
LL | let _ = !std::ptr::fn_addr_eq(f, a as fn());
| ++++++++++++++++++++++ ~ ++++++++
warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique
--> $DIR/fn-ptr-comparisons.rs:30:13
|
LL | let _ = f == g;
| ^^^^^^
|
= note: the address of the same function can vary between different codegen units
= note: furthermore, different functions could have the same address after being merged together
= note: for more information visit <https://doc.rust-lang.org/nightly/core/ptr/fn.fn_addr_eq.html>
help: refactor your code, or use `std::ptr::fn_addr_eq` to suppress the lint
|
LL | let _ = std::ptr::fn_addr_eq(f, g);
| +++++++++++++++++++++ ~ +
warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique
--> $DIR/fn-ptr-comparisons.rs:32:13
|
LL | let _ = f == f;
| ^^^^^^
|
= note: the address of the same function can vary between different codegen units
= note: furthermore, different functions could have the same address after being merged together
= note: for more information visit <https://doc.rust-lang.org/nightly/core/ptr/fn.fn_addr_eq.html>
help: refactor your code, or use `std::ptr::fn_addr_eq` to suppress the lint
|
LL | let _ = std::ptr::fn_addr_eq(f, f);
| +++++++++++++++++++++ ~ +
warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique
--> $DIR/fn-ptr-comparisons.rs:34:13
|
LL | let _ = g == g;
| ^^^^^^
|
= note: the address of the same function can vary between different codegen units
= note: furthermore, different functions could have the same address after being merged together
= note: for more information visit <https://doc.rust-lang.org/nightly/core/ptr/fn.fn_addr_eq.html>
help: refactor your code, or use `std::ptr::fn_addr_eq` to suppress the lint
|
LL | let _ = std::ptr::fn_addr_eq(g, g);
| +++++++++++++++++++++ ~ +
warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique
--> $DIR/fn-ptr-comparisons.rs:36:13
|
LL | let _ = g == g;
| ^^^^^^
|
= note: the address of the same function can vary between different codegen units
= note: furthermore, different functions could have the same address after being merged together
= note: for more information visit <https://doc.rust-lang.org/nightly/core/ptr/fn.fn_addr_eq.html>
help: refactor your code, or use `std::ptr::fn_addr_eq` to suppress the lint
|
LL | let _ = std::ptr::fn_addr_eq(g, g);
| +++++++++++++++++++++ ~ +
warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique
--> $DIR/fn-ptr-comparisons.rs:38:13
|
LL | let _ = &g == &g;
| ^^^^^^^^
|
= note: the address of the same function can vary between different codegen units
= note: furthermore, different functions could have the same address after being merged together
= note: for more information visit <https://doc.rust-lang.org/nightly/core/ptr/fn.fn_addr_eq.html>
help: refactor your code, or use `std::ptr::fn_addr_eq` to suppress the lint
|
LL | let _ = std::ptr::fn_addr_eq(g, g);
| ~~~~~~~~~~~~~~~~~~~~~ ~ +
warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique
--> $DIR/fn-ptr-comparisons.rs:40:13
|
LL | let _ = a as fn() == g;
| ^^^^^^^^^^^^^^
|
= note: the address of the same function can vary between different codegen units
= note: furthermore, different functions could have the same address after being merged together
= note: for more information visit <https://doc.rust-lang.org/nightly/core/ptr/fn.fn_addr_eq.html>
help: refactor your code, or use `std::ptr::fn_addr_eq` to suppress the lint
|
LL | let _ = std::ptr::fn_addr_eq(a as fn(), g);
| +++++++++++++++++++++ ~ +
warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique
--> $DIR/fn-ptr-comparisons.rs:44:13
|
LL | let _ = cfn == c;
| ^^^^^^^^
|
= note: the address of the same function can vary between different codegen units
= note: furthermore, different functions could have the same address after being merged together
= note: for more information visit <https://doc.rust-lang.org/nightly/core/ptr/fn.fn_addr_eq.html>
help: refactor your code, or use `std::ptr::fn_addr_eq` to suppress the lint
|
LL | let _ = std::ptr::fn_addr_eq(cfn, c as extern "C" fn());
| +++++++++++++++++++++ ~ +++++++++++++++++++
warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique
--> $DIR/fn-ptr-comparisons.rs:48:13
|
LL | let _ = argsfn == args;
| ^^^^^^^^^^^^^^
|
= note: the address of the same function can vary between different codegen units
= note: furthermore, different functions could have the same address after being merged together
= note: for more information visit <https://doc.rust-lang.org/nightly/core/ptr/fn.fn_addr_eq.html>
help: refactor your code, or use `std::ptr::fn_addr_eq` to suppress the lint
|
LL | let _ = std::ptr::fn_addr_eq(argsfn, args as extern "C" fn(i32) -> i32);
| +++++++++++++++++++++ ~ +++++++++++++++++++++++++++++
warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique
--> $DIR/fn-ptr-comparisons.rs:52:13
|
LL | let _ = t == test;
| ^^^^^^^^^
|
= note: the address of the same function can vary between different codegen units
= note: furthermore, different functions could have the same address after being merged together
= note: for more information visit <https://doc.rust-lang.org/nightly/core/ptr/fn.fn_addr_eq.html>
help: refactor your code, or use `std::ptr::fn_addr_eq` to suppress the lint
|
LL | let _ = std::ptr::fn_addr_eq(t, test as unsafe extern "C" fn());
| +++++++++++++++++++++ ~ ++++++++++++++++++++++++++
warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique
--> $DIR/fn-ptr-comparisons.rs:56:13
|
LL | let _ = a1.f == a2.f;
| ^^^^^^^^^^^^
|
= note: the address of the same function can vary between different codegen units
= note: furthermore, different functions could have the same address after being merged together
= note: for more information visit <https://doc.rust-lang.org/nightly/core/ptr/fn.fn_addr_eq.html>
help: refactor your code, or use `std::ptr::fn_addr_eq` to suppress the lint
|
LL | let _ = std::ptr::fn_addr_eq(a1.f, a2.f);
| +++++++++++++++++++++ ~ +
warning: 12 warnings emitted
|