This repository was archived by the owner on Apr 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -153,18 +153,21 @@ fn get_functions(files: Vec<syn::File>) -> Vec<FnSig> {
153
153
err ! ( "not `extern \" C\" `" ) ;
154
154
e = e2;
155
155
}
156
- // Right now no functions are const fn - they could be, but that
157
- // change should be explicit - so error if somebody tries.
156
+ // Right now there are no const fn functions. We might add them
157
+ // in the future, and at that point, we should tune this here.
158
+ // In the mean time, error if somebody tries.
158
159
if let Some ( _) = constness {
159
160
err ! ( "is const" ) ;
160
161
}
161
162
// No functions should be async fn
162
163
if let Some ( _) = asyncness {
163
164
err ! ( "is async" ) ;
164
165
}
165
- // FIXME: Math functions shouldn't be unsafe. Some functions
166
- // that should take pointers use repr(Rust) tuples. When we fix
167
- // those, they should use references are not pointers.
166
+ // FIXME: Math functions are not unsafe. Some functions in the
167
+ // libm C API take pointers, but in our API take repr(Rust)
168
+ // tuples (for some reason). Once we fix those to have the same
169
+ // API as C libm, we should use references on their signature
170
+ // instead, and make them safe.
168
171
if let Some ( _) = unsafety {
169
172
let e2 = e;
170
173
err ! ( "is unsafe" ) ;
You can’t perform that action at this time.
0 commit comments