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.
This commit is contained in:
parent
d8a64098c9
commit
9397d133f6
6 changed files with 71 additions and 2 deletions
7
tests/rustdoc-js-std/const-is-nullary-func.js
Normal file
7
tests/rustdoc-js-std/const-is-nullary-func.js
Normal file
|
@ -0,0 +1,7 @@
|
|||
const EXPECTED = {
|
||||
'query': '-> char',
|
||||
'others': [
|
||||
{ 'path': 'std::char', 'name': 'from_digit' },
|
||||
{ 'path': 'std::char', 'name': 'MAX' },
|
||||
],
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue