Skip to content

Commit 9803651

Browse files
Update rustdoc-js* format
1 parent 6b0c7c4 commit 9803651

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+236
-400
lines changed

tests/rustdoc-js-std/alias-1.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
const QUERY = '&';
2-
31
const EXPECTED = {
2+
'query': '&',
43
'others': [
54
{ 'path': 'std', 'name': 'reference' },
65
],

tests/rustdoc-js-std/alias-2.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
const QUERY = '+';
2-
31
const EXPECTED = {
2+
'query': '+',
43
'others': [
54
{ 'path': 'std::ops', 'name': 'AddAssign' },
65
{ 'path': 'std::ops', 'name': 'Add' },

tests/rustdoc-js-std/alias-3.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
const QUERY = '!';
2-
31
const EXPECTED = {
2+
'query': '!',
43
'others': [
54
{ 'path': 'std', 'name': 'never' },
65
],

tests/rustdoc-js-std/alias-4.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
const QUERY = '<';
2-
31
const EXPECTED = {
2+
'query': '<',
43
'others': [
54
{ 'name': 'Ord' },
65
],

tests/rustdoc-js-std/alias.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// ignore-order
22

3-
const QUERY = '[';
4-
53
const EXPECTED = {
4+
'query': '[',
65
'others': [
76
{ 'path': 'std', 'name': 'slice' },
87
{ 'path': 'std::ops', 'name': 'IndexMut' },

tests/rustdoc-js-std/asrawfd.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// ignore-order
22

3-
const QUERY = 'RawFd::as_raw_fd';
4-
53
const EXPECTED = {
4+
'query': 'RawFd::as_raw_fd',
65
'others': [
76
// Reproduction test for https://github.com/rust-lang/rust/issues/78724
87
// Validate that type alias methods get the correct path.

tests/rustdoc-js-std/basic.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
const QUERY = 'String';
2-
31
const EXPECTED = {
2+
'query': 'String',
43
'others': [
54
{ 'path': 'std::string', 'name': 'String' },
65
{ 'path': 'std::ffi', 'name': 'CString' },

tests/rustdoc-js-std/deduplication.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// ignore-order
22

3-
const QUERY = 'is_nan';
4-
53
const EXPECTED = {
4+
'query': 'is_nan',
65
'others': [
76
{ 'path': 'std::f32', 'name': 'is_nan' },
87
{ 'path': 'std::f64', 'name': 'is_nan' },

tests/rustdoc-js-std/enum-option.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
const QUERY = 'enum:Option';
2-
31
const EXPECTED = {
2+
'query': 'enum:Option',
43
'others': [
54
{ 'path': 'std::option', 'name': 'Option' },
65
],

tests/rustdoc-js-std/filter-crate.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// exact-check
22

3-
const QUERY = '"hashmap"';
43
const FILTER_CRATE = 'core';
54

65
const EXPECTED = {
6+
'query': 'hashmap',
77
'others': [
88
],
99
};

tests/rustdoc-js-std/fn-forget.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
const QUERY = 'fn:forget';
2-
31
const EXPECTED = {
2+
'query': 'fn:forget',
43
'others': [
54
{ 'path': 'std::mem', 'name': 'forget' },
65
{ 'path': 'std::fmt', 'name': 'format' },

tests/rustdoc-js-std/from_u.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
const QUERY = 'from_u';
2-
31
const EXPECTED = {
2+
'query': 'from_u',
43
'others': [
54
{ 'path': 'std::char', 'name': 'from_u32' },
65
{ 'path': 'std::str', 'name': 'from_utf8' },

tests/rustdoc-js-std/keyword.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// ignore-order
22

3-
const QUERY = 'fn';
4-
53
const EXPECTED = {
4+
'query': 'fn',
65
'others': [
76
{ 'path': 'std', 'name': 'fn', ty: 15 }, // 15 is for primitive types
87
{ 'path': 'std', 'name': 'fn', ty: 21 }, // 21 is for keywords

tests/rustdoc-js-std/macro-check.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// ignore-order
22

3-
const QUERY = 'panic';
4-
53
const EXPECTED = {
4+
'query': 'panic',
65
'others': [
76
{ 'path': 'std', 'name': 'panic', ty: 14 }, // 15 is for macros
87
{ 'path': 'std', 'name': 'panic', ty: 0 }, // 0 is for modules

tests/rustdoc-js-std/macro-print.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
const QUERY = 'macro:print';
2-
31
const EXPECTED = {
2+
'query': 'macro:print',
43
'others': [
54
{ 'path': 'std', 'name': 'print' },
65
{ 'path': 'std', 'name': 'println' },

tests/rustdoc-js-std/never.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
const QUERY = '!';
2-
31
const EXPECTED = {
2+
'query': '!',
43
'others': [
54
{ 'path': 'std', 'name': 'never' },
65
],

tests/rustdoc-js-std/option-type-signatures.js

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
1-
const QUERY = [
2-
'option, fnonce -> option',
3-
'option -> default',
4-
];
5-
61
const EXPECTED = [
72
{
3+
'query': 'option, fnonce -> option',
84
'others': [
95
{ 'path': 'std::option::Option', 'name': 'map' },
106
],
117
},
128
{
9+
'query': 'option -> default',
1310
'others': [
1411
{ 'path': 'std::option::Option', 'name': 'unwrap_or_default' },
1512
{ 'path': 'std::option::Option', 'name': 'get_or_insert_default' },

0 commit comments

Comments
 (0)