about summary refs log tree commit diff
path: root/tests/ui/lint/fn-ptr-comparisons-weird.stderr
blob: 2014e519c253869263d315e9d9b27b29f8cdfaf8 (plain)
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
warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique
  --> $DIR/fn-ptr-comparisons-weird.rs:5:5
   |
LL | #[derive(PartialEq, Eq)]
   |          --------- in this derive macro expansion
LL | struct A {
LL |     f: fn(),
   |     ^^^^^^^
   |
   = 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

warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique
  --> $DIR/fn-ptr-comparisons-weird.rs:25: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>

warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique
  --> $DIR/fn-ptr-comparisons-weird.rs:27: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>

warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique
  --> $DIR/fn-ptr-comparisons-weird.rs:29: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>

warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique
  --> $DIR/fn-ptr-comparisons-weird.rs:31: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>

warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique
  --> $DIR/fn-ptr-comparisons-weird.rs:33:13
   |
LL |     let _ = assert_eq!(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>
   = note: this warning originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)

warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique
  --> $DIR/fn-ptr-comparisons-weird.rs:35:13
   |
LL |     let _ = assert_ne!(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>
   = note: this warning originates in the macro `assert_ne` (in Nightly builds, run with -Z macro-backtrace for more info)

warning: 7 warnings emitted