1- warning: cast `foo` with `as fn() -> _` to use it as a pointer
2- --> $DIR/function-references.rs:58 :22
1+ warning: cast `foo` with `as fn() -> _` to obtain a function pointer
2+ --> $DIR/function-references.rs:57 :22
33 |
44LL | println!("{:p}", &foo);
55 | ^^^^
@@ -10,158 +10,158 @@ note: the lint level is defined here
1010LL | #![warn(function_item_references)]
1111 | ^^^^^^^^^^^^^^^^^^^^^^^^
1212
13- warning: cast `foo` with `as fn() -> _` to use it as a pointer
14- --> $DIR/function-references.rs:60 :20
13+ warning: cast `foo` with `as fn() -> _` to obtain a function pointer
14+ --> $DIR/function-references.rs:59 :20
1515 |
1616LL | print!("{:p}", &foo);
1717 | ^^^^
1818
19- warning: cast `foo` with `as fn() -> _` to use it as a pointer
20- --> $DIR/function-references.rs:62 :21
19+ warning: cast `foo` with `as fn() -> _` to obtain a function pointer
20+ --> $DIR/function-references.rs:61 :21
2121 |
2222LL | format!("{:p}", &foo);
2323 | ^^^^
2424
25- warning: cast `foo` with `as fn() -> _` to use it as a pointer
26- --> $DIR/function-references.rs:65 :22
25+ warning: cast `foo` with `as fn() -> _` to obtain a function pointer
26+ --> $DIR/function-references.rs:64 :22
2727 |
2828LL | println!("{:p}", &foo as *const _);
2929 | ^^^^^^^^^^^^^^^^
3030
31- warning: cast `foo` with `as fn() -> _` to use it as a pointer
32- --> $DIR/function-references.rs:67 :22
31+ warning: cast `foo` with `as fn() -> _` to obtain a function pointer
32+ --> $DIR/function-references.rs:66 :22
3333 |
3434LL | println!("{:p}", zst_ref);
3535 | ^^^^^^^
3636
37- warning: cast `foo` with `as fn() -> _` to use it as a pointer
38- --> $DIR/function-references.rs:69 :22
37+ warning: cast `foo` with `as fn() -> _` to obtain a function pointer
38+ --> $DIR/function-references.rs:68 :22
3939 |
4040LL | println!("{:p}", cast_zst_ptr);
4141 | ^^^^^^^^^^^^
4242
43- warning: cast `foo` with `as fn() -> _` to use it as a pointer
44- --> $DIR/function-references.rs:71 :22
43+ warning: cast `foo` with `as fn() -> _` to obtain a function pointer
44+ --> $DIR/function-references.rs:70 :22
4545 |
4646LL | println!("{:p}", coerced_zst_ptr);
4747 | ^^^^^^^^^^^^^^^
4848
49- warning: cast `foo` with `as fn() -> _` to use it as a pointer
50- --> $DIR/function-references.rs:74 :22
49+ warning: cast `foo` with `as fn() -> _` to obtain a function pointer
50+ --> $DIR/function-references.rs:73 :22
5151 |
5252LL | println!("{:p}", &fn_item);
5353 | ^^^^^^^^
5454
55- warning: cast `foo` with `as fn() -> _` to use it as a pointer
56- --> $DIR/function-references.rs:76 :22
55+ warning: cast `foo` with `as fn() -> _` to obtain a function pointer
56+ --> $DIR/function-references.rs:75 :22
5757 |
5858LL | println!("{:p}", indirect_ref);
5959 | ^^^^^^^^^^^^
6060
61- warning: cast `nop` with `as fn()` to use it as a pointer
62- --> $DIR/function-references.rs:79 :22
61+ warning: cast `nop` with `as fn()` to obtain a function pointer
62+ --> $DIR/function-references.rs:78 :22
6363 |
6464LL | println!("{:p}", &nop);
6565 | ^^^^
6666
67- warning: cast `bar` with `as fn(_) -> _` to use it as a pointer
68- --> $DIR/function-references.rs:81 :22
67+ warning: cast `bar` with `as fn(_) -> _` to obtain a function pointer
68+ --> $DIR/function-references.rs:80 :22
6969 |
7070LL | println!("{:p}", &bar);
7171 | ^^^^
7272
73- warning: cast `baz` with `as fn(_, _) -> _` to use it as a pointer
74- --> $DIR/function-references.rs:83 :22
73+ warning: cast `baz` with `as fn(_, _) -> _` to obtain a function pointer
74+ --> $DIR/function-references.rs:82 :22
7575 |
7676LL | println!("{:p}", &baz);
7777 | ^^^^
7878
79- warning: cast `unsafe_fn` with `as unsafe fn()` to use it as a pointer
80- --> $DIR/function-references.rs:85 :22
79+ warning: cast `unsafe_fn` with `as unsafe fn()` to obtain a function pointer
80+ --> $DIR/function-references.rs:84 :22
8181 |
8282LL | println!("{:p}", &unsafe_fn);
8383 | ^^^^^^^^^^
8484
85- warning: cast `c_fn` with `as extern "C" fn()` to use it as a pointer
86- --> $DIR/function-references.rs:87 :22
85+ warning: cast `c_fn` with `as extern "C" fn()` to obtain a function pointer
86+ --> $DIR/function-references.rs:86 :22
8787 |
8888LL | println!("{:p}", &c_fn);
8989 | ^^^^^
9090
91- warning: cast `unsafe_c_fn` with `as unsafe extern "C" fn()` to use it as a pointer
92- --> $DIR/function-references.rs:89 :22
91+ warning: cast `unsafe_c_fn` with `as unsafe extern "C" fn()` to obtain a function pointer
92+ --> $DIR/function-references.rs:88 :22
9393 |
9494LL | println!("{:p}", &unsafe_c_fn);
9595 | ^^^^^^^^^^^^
9696
97- warning: cast `variadic_fn ` with `as unsafe extern "C" fn(_, ...)` to use it as a pointer
98- --> $DIR/function-references.rs:91 :22
97+ warning: cast `variadic ` with `as unsafe extern "C" fn(_, ...)` to obtain a function pointer
98+ --> $DIR/function-references.rs:90 :22
9999 |
100- LL | println!("{:p}", &variadic_fn );
101- | ^^^^^^^^^^^^
100+ LL | println!("{:p}", &variadic );
101+ | ^^^^^^^^^
102102
103- warning: cast `var` with `as fn(_) -> _` to use it as a pointer
104- --> $DIR/function-references.rs:93 :22
103+ warning: cast `var` with `as fn(_) -> _` to obtain a function pointer
104+ --> $DIR/function-references.rs:92 :22
105105 |
106106LL | println!("{:p}", &std::env::var::<String>);
107107 | ^^^^^^^^^^^^^^^^^^^^^^^^
108108
109- warning: cast `nop` with `as fn()` to use it as a pointer
110- --> $DIR/function-references.rs:96 :32
109+ warning: cast `nop` with `as fn()` to obtain a function pointer
110+ --> $DIR/function-references.rs:95 :32
111111 |
112112LL | println!("{:p} {:p} {:p}", &nop, &foo, &bar);
113113 | ^^^^
114114
115- warning: cast `foo` with `as fn() -> _` to use it as a pointer
116- --> $DIR/function-references.rs:96 :38
115+ warning: cast `foo` with `as fn() -> _` to obtain a function pointer
116+ --> $DIR/function-references.rs:95 :38
117117 |
118118LL | println!("{:p} {:p} {:p}", &nop, &foo, &bar);
119119 | ^^^^
120120
121- warning: cast `bar` with `as fn(_) -> _` to use it as a pointer
122- --> $DIR/function-references.rs:96 :44
121+ warning: cast `bar` with `as fn(_) -> _` to obtain a function pointer
122+ --> $DIR/function-references.rs:95 :44
123123 |
124124LL | println!("{:p} {:p} {:p}", &nop, &foo, &bar);
125125 | ^^^^
126126
127- warning: cast `foo` with `as fn() -> _` to use it as a pointer
128- --> $DIR/function-references.rs:111 :41
127+ warning: cast `foo` with `as fn() -> _` to obtain a function pointer
128+ --> $DIR/function-references.rs:110 :41
129129 |
130130LL | std::mem::transmute::<_, usize>(&foo);
131131 | ^^^^
132132
133- warning: cast `foo` with `as fn() -> _` to use it as a pointer
134- --> $DIR/function-references.rs:113 :50
133+ warning: cast `foo` with `as fn() -> _` to obtain a function pointer
134+ --> $DIR/function-references.rs:112 :50
135135 |
136136LL | std::mem::transmute::<_, (usize, usize)>((&foo, &bar));
137137 | ^^^^^^^^^^^^
138138
139- warning: cast `bar` with `as fn(_) -> _` to use it as a pointer
140- --> $DIR/function-references.rs:113 :50
139+ warning: cast `bar` with `as fn(_) -> _` to obtain a function pointer
140+ --> $DIR/function-references.rs:112 :50
141141 |
142142LL | std::mem::transmute::<_, (usize, usize)>((&foo, &bar));
143143 | ^^^^^^^^^^^^
144144
145- warning: cast `bar` with `as fn(_) -> _` to use it as a pointer
146- --> $DIR/function-references.rs:123 :15
145+ warning: cast `bar` with `as fn(_) -> _` to obtain a function pointer
146+ --> $DIR/function-references.rs:122 :15
147147 |
148148LL | print_ptr(&bar);
149149 | ^^^^
150150
151- warning: cast `bar` with `as fn(_) -> _` to use it as a pointer
152- --> $DIR/function-references.rs:125 :24
151+ warning: cast `bar` with `as fn(_) -> _` to obtain a function pointer
152+ --> $DIR/function-references.rs:124 :24
153153 |
154154LL | bound_by_ptr_trait(&bar);
155155 | ^^^^
156156
157- warning: cast `bar` with `as fn(_) -> _` to use it as a pointer
158- --> $DIR/function-references.rs:127 :30
157+ warning: cast `bar` with `as fn(_) -> _` to obtain a function pointer
158+ --> $DIR/function-references.rs:126 :30
159159 |
160160LL | bound_by_ptr_trait_tuple((&foo, &bar));
161161 | ^^^^^^^^^^^^
162162
163- warning: cast `foo` with `as fn() -> _` to use it as a pointer
164- --> $DIR/function-references.rs:127 :30
163+ warning: cast `foo` with `as fn() -> _` to obtain a function pointer
164+ --> $DIR/function-references.rs:126 :30
165165 |
166166LL | bound_by_ptr_trait_tuple((&foo, &bar));
167167 | ^^^^^^^^^^^^
0 commit comments