1
Fork 0

rustdoc: fix type search index for fn<T>() -> &T where T: Trait

This commit is contained in:
Michael Howell 2023-03-07 10:06:42 -07:00
parent 0a3b557d52
commit a6446c53fe
3 changed files with 18 additions and 2 deletions

View file

@ -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' },
],
},
];

View file

@ -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!()
}