Skip to content

Commit dac7f20

Browse files
committed
Add test for Self not being a generic in search index
1 parent b4f77df commit dac7f20

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed
+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// exact-check
2+
3+
const EXPECTED = [
4+
{
5+
'query': 'A -> A',
6+
'others': [
7+
{ 'path': 'self_is_not_generic::Thing', 'name': 'from' }
8+
],
9+
},
10+
{
11+
'query': 'A -> B',
12+
'others': [
13+
{ 'path': 'self_is_not_generic::Thing', 'name': 'try_from' }
14+
],
15+
},
16+
{
17+
'query': 'Combine -> Combine',
18+
'others': [
19+
{ 'path': 'self_is_not_generic::Combine', 'name': 'combine' }
20+
],
21+
}
22+
];
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
pub trait Combine {
2+
fn combine(&self, other: &Self) -> Self;
3+
}
4+
5+
pub struct Thing;
6+
7+
impl Combine for Thing {
8+
fn combine(&self, other: &Self) -> Self {
9+
Self
10+
}
11+
}

0 commit comments

Comments
 (0)