]> git.lizzy.rs Git - rust.git/blob - src/test/ui/lint/function-references.stderr
Removed test for unhandled case in function_item_references lint
[rust.git] / src / test / ui / lint / function-references.stderr
1 warning: cast `foo` with `as fn() -> _` to obtain a function pointer
2   --> $DIR/function-references.rs:57:22
3    |
4 LL |     println!("{:p}", &foo);
5    |                      ^^^^
6    |
7 note: the lint level is defined here
8   --> $DIR/function-references.rs:3:9
9    |
10 LL | #![warn(function_item_references)]
11    |         ^^^^^^^^^^^^^^^^^^^^^^^^
12
13 warning: cast `foo` with `as fn() -> _` to obtain a function pointer
14   --> $DIR/function-references.rs:59:20
15    |
16 LL |     print!("{:p}", &foo);
17    |                    ^^^^
18
19 warning: cast `foo` with `as fn() -> _` to obtain a function pointer
20   --> $DIR/function-references.rs:61:21
21    |
22 LL |     format!("{:p}", &foo);
23    |                     ^^^^
24
25 warning: cast `foo` with `as fn() -> _` to obtain a function pointer
26   --> $DIR/function-references.rs:64:22
27    |
28 LL |     println!("{:p}", &foo as *const _);
29    |                      ^^^^^^^^^^^^^^^^
30
31 warning: cast `foo` with `as fn() -> _` to obtain a function pointer
32   --> $DIR/function-references.rs:66:22
33    |
34 LL |     println!("{:p}", zst_ref);
35    |                      ^^^^^^^
36
37 warning: cast `foo` with `as fn() -> _` to obtain a function pointer
38   --> $DIR/function-references.rs:68:22
39    |
40 LL |     println!("{:p}", cast_zst_ptr);
41    |                      ^^^^^^^^^^^^
42
43 warning: cast `foo` with `as fn() -> _` to obtain a function pointer
44   --> $DIR/function-references.rs:70:22
45    |
46 LL |     println!("{:p}", coerced_zst_ptr);
47    |                      ^^^^^^^^^^^^^^^
48
49 warning: cast `foo` with `as fn() -> _` to obtain a function pointer
50   --> $DIR/function-references.rs:73:22
51    |
52 LL |     println!("{:p}", &fn_item);
53    |                      ^^^^^^^^
54
55 warning: cast `foo` with `as fn() -> _` to obtain a function pointer
56   --> $DIR/function-references.rs:75:22
57    |
58 LL |     println!("{:p}", indirect_ref);
59    |                      ^^^^^^^^^^^^
60
61 warning: cast `nop` with `as fn()` to obtain a function pointer
62   --> $DIR/function-references.rs:78:22
63    |
64 LL |     println!("{:p}", &nop);
65    |                      ^^^^
66
67 warning: cast `bar` with `as fn(_) -> _` to obtain a function pointer
68   --> $DIR/function-references.rs:80:22
69    |
70 LL |     println!("{:p}", &bar);
71    |                      ^^^^
72
73 warning: cast `baz` with `as fn(_, _) -> _` to obtain a function pointer
74   --> $DIR/function-references.rs:82:22
75    |
76 LL |     println!("{:p}", &baz);
77    |                      ^^^^
78
79 warning: cast `unsafe_fn` with `as unsafe fn()` to obtain a function pointer
80   --> $DIR/function-references.rs:84:22
81    |
82 LL |     println!("{:p}", &unsafe_fn);
83    |                      ^^^^^^^^^^
84
85 warning: cast `c_fn` with `as extern "C" fn()` to obtain a function pointer
86   --> $DIR/function-references.rs:86:22
87    |
88 LL |     println!("{:p}", &c_fn);
89    |                      ^^^^^
90
91 warning: cast `unsafe_c_fn` with `as unsafe extern "C" fn()` to obtain a function pointer
92   --> $DIR/function-references.rs:88:22
93    |
94 LL |     println!("{:p}", &unsafe_c_fn);
95    |                      ^^^^^^^^^^^^
96
97 warning: cast `variadic` with `as unsafe extern "C" fn(_, ...)` to obtain a function pointer
98   --> $DIR/function-references.rs:90:22
99    |
100 LL |     println!("{:p}", &variadic);
101    |                      ^^^^^^^^^
102
103 warning: cast `var` with `as fn(_) -> _` to obtain a function pointer
104   --> $DIR/function-references.rs:92:22
105    |
106 LL |     println!("{:p}", &std::env::var::<String>);
107    |                      ^^^^^^^^^^^^^^^^^^^^^^^^
108
109 warning: cast `nop` with `as fn()` to obtain a function pointer
110   --> $DIR/function-references.rs:95:32
111    |
112 LL |     println!("{:p} {:p} {:p}", &nop, &foo, &bar);
113    |                                ^^^^
114
115 warning: cast `foo` with `as fn() -> _` to obtain a function pointer
116   --> $DIR/function-references.rs:95:38
117    |
118 LL |     println!("{:p} {:p} {:p}", &nop, &foo, &bar);
119    |                                      ^^^^
120
121 warning: cast `bar` with `as fn(_) -> _` to obtain a function pointer
122   --> $DIR/function-references.rs:95:44
123    |
124 LL |     println!("{:p} {:p} {:p}", &nop, &foo, &bar);
125    |                                            ^^^^
126
127 warning: cast `foo` with `as fn() -> _` to obtain a function pointer
128   --> $DIR/function-references.rs:110:41
129    |
130 LL |         std::mem::transmute::<_, usize>(&foo);
131    |                                         ^^^^
132
133 warning: cast `foo` with `as fn() -> _` to obtain a function pointer
134   --> $DIR/function-references.rs:112:50
135    |
136 LL |         std::mem::transmute::<_, (usize, usize)>((&foo, &bar));
137    |                                                  ^^^^^^^^^^^^
138
139 warning: cast `bar` with `as fn(_) -> _` to obtain a function pointer
140   --> $DIR/function-references.rs:112:50
141    |
142 LL |         std::mem::transmute::<_, (usize, usize)>((&foo, &bar));
143    |                                                  ^^^^^^^^^^^^
144
145 warning: cast `bar` with `as fn(_) -> _` to obtain a function pointer
146   --> $DIR/function-references.rs:122:15
147    |
148 LL |     print_ptr(&bar);
149    |               ^^^^
150
151 warning: cast `bar` with `as fn(_) -> _` to obtain a function pointer
152   --> $DIR/function-references.rs:124:24
153    |
154 LL |     bound_by_ptr_trait(&bar);
155    |                        ^^^^
156
157 warning: cast `bar` with `as fn(_) -> _` to obtain a function pointer
158   --> $DIR/function-references.rs:126:30
159    |
160 LL |     bound_by_ptr_trait_tuple((&foo, &bar));
161    |                              ^^^^^^^^^^^^
162
163 warning: cast `foo` with `as fn() -> _` to obtain a function pointer
164   --> $DIR/function-references.rs:126:30
165    |
166 LL |     bound_by_ptr_trait_tuple((&foo, &bar));
167    |                              ^^^^^^^^^^^^
168
169 warning: 27 warnings emitted
170