Skip to content

Commit 463ad44

Browse files
committed
fix some rustdoc-js-std tests broke by trait item filtering
1 parent c979014 commit 463ad44

File tree

3 files changed

+13
-15
lines changed

3 files changed

+13
-15
lines changed

tests/rustdoc-js-std/asrawfd.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
// ignore-order
22

33
const EXPECTED = {
4-
'query': 'RawFd::as_raw_fd',
4+
'query': 'method:RawFd::as_raw_fd',
55
'others': [
66
// Reproduction test for https://github.com/rust-lang/rust/issues/78724
77
// Validate that type alias methods get the correct path.
8-
{ 'path': 'std::os::fd::AsRawFd', 'name': 'as_raw_fd' },
9-
{ 'path': 'std::os::fd::AsRawFd', 'name': 'as_raw_fd' },
108
{ 'path': 'std::os::fd::RawFd', 'name': 'as_raw_fd' },
119
],
1210
};

tests/rustdoc-js-std/quoted.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1+
// make sure quoted search works both for items and and without generics
12
// ignore-order
23

34
const FILTER_CRATE = 'std';
45

56
const EXPECTED = {
6-
'query': '"error"',
7+
'query': '"result"',
78
'others': [
8-
{ 'path': 'std', 'name': 'error' },
9-
{ 'path': 'std::fmt', 'name': 'Error' },
10-
{ 'path': 'std::io', 'name': 'Error' },
9+
{ 'path': 'std', 'name': 'result' },
10+
{ 'path': 'std::result', 'name': 'Result' },
11+
{ 'path': 'std::fmt', 'name': 'Result' },
1112
],
1213
'in_args': [
13-
{ 'path': 'std::fmt::Error', 'name': 'eq' },
14-
{ 'path': 'std::fmt::Error', 'name': 'cmp' },
15-
{ 'path': 'std::fmt::Error', 'name': 'partial_cmp' },
16-
14+
{ 'path': 'std::result::Result', 'name': 'branch' },
15+
{ 'path': 'std::result::Result', 'name': 'ok' },
16+
{ 'path': 'std::result::Result', 'name': 'unwrap' },
1717
],
1818
'returned': [
19-
{ 'path': 'std::fmt::LowerExp', 'name': 'fmt' },
19+
{ 'path': 'std::bool', 'name': 'try_into' },
2020
],
2121
};

tests/rustdoc-js-std/bufread-fill-buf.js renamed to tests/rustdoc-js-std/trait-unbox.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
// ignore-order
1+
// make sure type-based searches with traits get unboxed too
22

33
const EXPECTED = [
44
{
5-
'query': 'bufread -> result<[u8]>',
5+
'query': 'any -> result<box>',
66
'others': [
7-
{ 'path': 'std::boxed::Box', 'name': 'fill_buf' },
7+
{ 'path': 'std::boxed::Box', 'name': 'downcast' },
88
],
99
},
1010
{

0 commit comments

Comments
 (0)