-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rustdoc-search: case-sensitive only when capitals are used
This is the "smartcase" behavior, described by vim and dtolnay.
- Loading branch information
Showing
4 changed files
with
55 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
const EXPECTED = [ | ||
{ | ||
'query': 'write', | ||
'others': [ | ||
{ 'path': 'std::fmt', 'name': 'write' }, | ||
{ 'path': 'std::fs', 'name': 'write' }, | ||
{ 'path': 'std::ptr', 'name': 'write' }, | ||
{ 'path': 'std::fmt', 'name': 'Write' }, | ||
{ 'path': 'std::io', 'name': 'Write' }, | ||
{ 'path': 'std::hash::Hasher', 'name': 'write' }, | ||
], | ||
}, | ||
{ | ||
'query': 'Write', | ||
'others': [ | ||
{ 'path': 'std::fmt', 'name': 'Write' }, | ||
{ 'path': 'std::io', 'name': 'Write' }, | ||
{ 'path': 'std::fmt', 'name': 'write' }, | ||
{ 'path': 'std::fs', 'name': 'write' }, | ||
{ 'path': 'std::ptr', 'name': 'write' }, | ||
{ 'path': 'std::hash::Hasher', 'name': 'write' }, | ||
], | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
const EXPECTED = [ | ||
{ | ||
'query': 'Foo', | ||
'others': [ | ||
{ 'path': 'case', 'name': 'Foo', 'desc': 'Docs for Foo' }, | ||
{ 'path': 'case', 'name': 'foo', 'desc': 'Docs for foo' }, | ||
], | ||
}, | ||
{ | ||
'query': 'foo', | ||
'others': [ | ||
// https://github.com/rust-lang/rust/issues/133017 | ||
{ 'path': 'case', 'name': 'Foo', 'desc': 'Docs for Foo' }, | ||
{ 'path': 'case', 'name': 'foo', 'desc': 'Docs for foo' }, | ||
], | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#![allow(nonstandard_style)] | ||
|
||
/// Docs for Foo | ||
pub struct Foo; | ||
|
||
/// Docs for foo | ||
pub struct foo; |