Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.

Commit 6ef8fa7

Browse files
committed
Improve doc comments
1 parent fae0b0a commit 6ef8fa7

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

crates/libm-analyze/src/lib.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,18 +153,21 @@ fn get_functions(files: Vec<syn::File>) -> Vec<FnSig> {
153153
err!("not `extern \"C\"`");
154154
e = e2;
155155
}
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.
158159
if let Some(_) = constness {
159160
err!("is const");
160161
}
161162
// No functions should be async fn
162163
if let Some(_) = asyncness {
163164
err!("is async");
164165
}
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.
168171
if let Some(_) = unsafety {
169172
let e2 = e;
170173
err!("is unsafe");

0 commit comments

Comments
 (0)