diff options
| author | Michael Howell <michael@notriddle.com> | 2023-06-02 19:58:44 -0700 |
|---|---|---|
| committer | Michael Howell <michael@notriddle.com> | 2023-06-11 18:19:37 -0700 |
| commit | 9946d675793288e7bfb5091fcb99e0dc2fd59ee8 (patch) | |
| tree | dfdea5d5bf24bc9211df0fc64abe1f3cd4ffc296 /tests/rustdoc-js/nested-unboxed.js | |
| parent | 04f4493722a29018b85e6c2893c15ab0285d5dcd (diff) | |
| download | rust-9946d675793288e7bfb5091fcb99e0dc2fd59ee8.tar.gz rust-9946d675793288e7bfb5091fcb99e0dc2fd59ee8.zip | |
rustdoc-search: build args, return, and generics on one unifier
This enhances generics with the "unboxing" behavior where A<T> matches T. It makes this unboxing transitive over generics.
Diffstat (limited to 'tests/rustdoc-js/nested-unboxed.js')
| -rw-r--r-- | tests/rustdoc-js/nested-unboxed.js | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/tests/rustdoc-js/nested-unboxed.js b/tests/rustdoc-js/nested-unboxed.js new file mode 100644 index 00000000000..44f784eb1f6 --- /dev/null +++ b/tests/rustdoc-js/nested-unboxed.js @@ -0,0 +1,68 @@ +// exact-check + +const EXPECTED = [ + { + 'query': '-> Result<Object, bool>', + 'others': [ + { 'path': 'nested_unboxed', 'name': 'something' }, + ], + }, + { + 'query': '-> Result<Object<i32, u32>, bool>', + 'others': [ + { 'path': 'nested_unboxed', 'name': 'something' }, + ], + }, + { + 'query': '-> Object, bool', + 'others': [ + { 'path': 'nested_unboxed', 'name': 'something' }, + ], + }, + { + 'query': '-> Object<i32, u32>, bool', + 'others': [ + { 'path': 'nested_unboxed', 'name': 'something' }, + ], + }, + { + 'query': '-> i32, u32, bool', + 'others': [ + { 'path': 'nested_unboxed', 'name': 'something' }, + ], + }, + { + 'query': '-> Result<i32, u32, bool>', + 'others': [ + { 'path': 'nested_unboxed', 'name': 'something' }, + ], + }, + { + 'query': '-> Result<Object<i32>, bool>', + 'others': [ + { 'path': 'nested_unboxed', 'name': 'something' }, + ], + }, + { + 'query': '-> Result<Object<u32>, bool>', + 'others': [ + { 'path': 'nested_unboxed', 'name': 'something' }, + ], + }, + { + 'query': '-> Result<Object<i32>, u32, bool>', + 'others': [], + }, + { + 'query': '-> Result<i32, Object<u32>, bool>', + 'others': [], + }, + { + 'query': '-> Result<i32, u32, Object<bool>>', + 'others': [], + }, + { + 'query': '-> Result<Object<i32>, Object<u32>, bool>', + 'others': [], + }, +]; |
