Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions src/test/rustdoc-js/generics-multi-trait.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// exact-check

const QUERY = [
'Result<SomeTrait>',
'Zzzzzzzzzzzzzzzzzz',
'Nonononononononono',
];

const EXPECTED = [
// check one of the generic items
{
'in_args': [
{ 'path': 'generics_multi_trait', 'name': 'beta' },
],
'returned': [
{ 'path': 'generics_multi_trait', 'name': 'bet' },
],
},
{
'in_args': [
{ 'path': 'generics_multi_trait', 'name': 'beta' },
],
'returned': [
{ 'path': 'generics_multi_trait', 'name': 'bet' },
],
},
// ignore the name of the generic itself
{
'in_args': [],
'returned': [],
},
];
12 changes: 12 additions & 0 deletions src/test/rustdoc-js/generics-multi-trait.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
pub trait SomeTrait {}
pub trait Zzzzzzzzzzzzzzzzzz {}

pub fn bet<Nonononononononono: SomeTrait + Zzzzzzzzzzzzzzzzzz>() -> Result<Nonononononononono, ()> {
loop {}
}

pub fn beta<Nonononononononono: SomeTrait + Zzzzzzzzzzzzzzzzzz>(
_param: Result<Nonononononononono, ()>,
) {
loop {}
}