diff options
| author | binarycat <binarycat@envs.net> | 2025-01-13 15:31:15 -0600 |
|---|---|---|
| committer | binarycat <binarycat@envs.net> | 2025-01-16 11:52:00 -0600 |
| commit | 9397d133f683070863029552313b5e083398bf42 (patch) | |
| tree | 51632cf584458936608639cfb0efc67f2d3c09e0 /tests/rustdoc-js-std/field-is-unary-func.js | |
| parent | d8a64098c9d0fb25699f657c6efff0bb418f7e18 (diff) | |
| download | rust-9397d133f683070863029552313b5e083398bf42.tar.gz rust-9397d133f683070863029552313b5e083398bf42.zip | |
Treat other items as functions for the purpose of type-based search
constants and statics are nullary functions, and struct fields are unary functions. functions (along with methods and trait methods) are prioritized over other items, like fields and constants.
Diffstat (limited to 'tests/rustdoc-js-std/field-is-unary-func.js')
| -rw-r--r-- | tests/rustdoc-js-std/field-is-unary-func.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/rustdoc-js-std/field-is-unary-func.js b/tests/rustdoc-js-std/field-is-unary-func.js new file mode 100644 index 00000000000..09ce8a0dde0 --- /dev/null +++ b/tests/rustdoc-js-std/field-is-unary-func.js @@ -0,0 +1,7 @@ +const EXPECTED = { + // one of the only non-generic structs with public fields + 'query': 'CpuidResult -> u32', + 'others': [ + { 'path': 'core::arch::x86::CpuidResult', 'name': 'eax' }, + ], +} |
