diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-11-14 20:45:15 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-14 20:45:15 +0100 |
| commit | 8912909b98ef0ac835142cc7753cfdeefab3e259 (patch) | |
| tree | 1c9884f7a6adc599b0d1a2b3f469d8e09035a057 /tests/rustdoc-js | |
| parent | dd61213be45c127a3031bce131a3b5a819079338 (diff) | |
| parent | 32500aa8e0f23029c0fa69235d19f770106c016f (diff) | |
| download | rust-8912909b98ef0ac835142cc7753cfdeefab3e259.tar.gz rust-8912909b98ef0ac835142cc7753cfdeefab3e259.zip | |
Rollup merge of #133043 - notriddle:master, r=fmease
rustdoc-search: case-sensitive only when capitals are used This is the "smartcase" behavior, described by vim and dtolnay. Fixes https://github.com/rust-lang/rust/issues/133017
Diffstat (limited to 'tests/rustdoc-js')
| -rw-r--r-- | tests/rustdoc-js/case.js | 17 | ||||
| -rw-r--r-- | tests/rustdoc-js/case.rs | 7 |
2 files changed, 24 insertions, 0 deletions
diff --git a/tests/rustdoc-js/case.js b/tests/rustdoc-js/case.js new file mode 100644 index 00000000000..22b970eb139 --- /dev/null +++ b/tests/rustdoc-js/case.js @@ -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' }, + ], + }, +]; diff --git a/tests/rustdoc-js/case.rs b/tests/rustdoc-js/case.rs new file mode 100644 index 00000000000..532edd55f1d --- /dev/null +++ b/tests/rustdoc-js/case.rs @@ -0,0 +1,7 @@ +#![allow(nonstandard_style)] + +/// Docs for Foo +pub struct Foo; + +/// Docs for foo +pub struct foo; |
