diff options
| author | Michael Howell <michael@notriddle.com> | 2023-03-07 10:06:42 -0700 | 
|---|---|---|
| committer | Michael Howell <michael@notriddle.com> | 2023-03-07 11:20:49 -0700 | 
| commit | a6446c53fe8be6692b07e121b831c3db770ff94a (patch) | |
| tree | 53a2359aaf4d1b4c7eeb8a3504b3f699179c4ae1 /tests/rustdoc-js | |
| parent | 0a3b557d528dd7c8a88ceca6f7dc0699b89a3ef4 (diff) | |
| download | rust-a6446c53fe8be6692b07e121b831c3db770ff94a.tar.gz rust-a6446c53fe8be6692b07e121b831c3db770ff94a.zip | |
rustdoc: fix type search index for `fn<T>() -> &T where T: Trait`
Diffstat (limited to 'tests/rustdoc-js')
| -rw-r--r-- | tests/rustdoc-js/where-clause.js | 7 | ||||
| -rw-r--r-- | tests/rustdoc-js/where-clause.rs | 6 | 
2 files changed, 12 insertions, 1 deletions
| diff --git a/tests/rustdoc-js/where-clause.js b/tests/rustdoc-js/where-clause.js index 6cb42a455a3..4112f08fb0a 100644 --- a/tests/rustdoc-js/where-clause.js +++ b/tests/rustdoc-js/where-clause.js @@ -1,4 +1,4 @@ -const QUERY = ['trait<nested>', '-> trait<nested>', 't1, t2']; +const QUERY = ['trait<nested>', '-> trait<nested>', 't1, t2', '-> shazam']; const EXPECTED = [ { @@ -16,4 +16,9 @@ const EXPECTED = [ { 'path': 'where_clause', 'name': 'presto' }, ], }, + { + 'others': [ + { 'path': 'where_clause', 'name': 'bippety' }, + ], + }, ]; diff --git a/tests/rustdoc-js/where-clause.rs b/tests/rustdoc-js/where-clause.rs index 808561feee2..f8bdc072216 100644 --- a/tests/rustdoc-js/where-clause.rs +++ b/tests/rustdoc-js/where-clause.rs @@ -14,3 +14,9 @@ pub trait T2<'a, T> { } pub fn presto<A, B>(_: A, _: B) where A: T1, B: for <'b> T2<'b, Nested> {} + +pub trait Shazam {} + +pub fn bippety<X>() -> &'static X where X: Shazam { + panic!() +} | 
