Add test for Self
not being a generic in search index
This commit is contained in:
parent
b4f77df9f8
commit
dac7f20e13
22
tests/rustdoc-js/self-is-not-generic.js
Normal file
22
tests/rustdoc-js/self-is-not-generic.js
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
// exact-check
|
||||||
|
|
||||||
|
const EXPECTED = [
|
||||||
|
{
|
||||||
|
'query': 'A -> A',
|
||||||
|
'others': [
|
||||||
|
{ 'path': 'self_is_not_generic::Thing', 'name': 'from' }
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'query': 'A -> B',
|
||||||
|
'others': [
|
||||||
|
{ 'path': 'self_is_not_generic::Thing', 'name': 'try_from' }
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'query': 'Combine -> Combine',
|
||||||
|
'others': [
|
||||||
|
{ 'path': 'self_is_not_generic::Combine', 'name': 'combine' }
|
||||||
|
],
|
||||||
|
}
|
||||||
|
];
|
11
tests/rustdoc-js/self-is-not-generic.rs
Normal file
11
tests/rustdoc-js/self-is-not-generic.rs
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
pub trait Combine {
|
||||||
|
fn combine(&self, other: &Self) -> Self;
|
||||||
|
}
|
||||||
|
|
||||||
|
pub struct Thing;
|
||||||
|
|
||||||
|
impl Combine for Thing {
|
||||||
|
fn combine(&self, other: &Self) -> Self {
|
||||||
|
Self
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user