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 = 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 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 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 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 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 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 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 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 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 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 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 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