Repository: mozilla/cbindgen (language: rust)

Issue:
`usize_is_size_t` documented but not valid
docs.md mentions the `usize_is_size_t` option, but trying to use it gives an error in v0.21.0.
```
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: "Couldn't parse config file: unknown field `usize_is_size_t`, expected one of `prefix`, `postfix`, `must_use`, `args`, `rename_args`, `swift_name_macro`, `sort_by`, `no_return` for key `fn` at line 21 column 1."'
```

If this option has effectively been removed, is there a replacement for it ?


Discussion / hints:
It's a global option, but it looks like you are using it inside a `[fn]` block in your toml config.
Indeed it works as a global option, thanks.
Leaving the issue open because this option is listed under the `[fn]` block inside docs.md, so I thought it was an `fn` option.

Fix patch:
diff --git a/docs.md b/docs.md
index 9c0897f41..e97e16f80 100644
--- a/docs.md
+++ b/docs.md
@@ -532,6 +532,10 @@ documentation_style = "short"
 # default: "both"
 style = "both"
 
+# If this option is true `usize` and `isize` will be converted into `size_t` and `ptrdiff_t`
+# instead of `uintptr_t` and `intptr_t` respectively.
+usize_is_size_t = true
+
 # A list of substitutions for converting cfg's to ifdefs. cfgs which aren't
 # defined here will just be discarded.
 #
@@ -718,10 +722,6 @@ rename_args = "PascalCase"
 # default: "None"
 sort_by = "Name"
 
-# If this option is true `usize` and `isize` will be converted into `size_t` and `ptrdiff_t`
-# instead of `uintptr_t` and `intptr_t` respectively.
-usize_is_size_t = true
-
 [struct]
 # A rule to use to rename struct field names. The renaming assumes the input is
 # the Rust standard snake_case, however it acccepts all the different rename_args


Test patch: