Correctly handle paths from foreign items

This commit is contained in:
Guillaume Gomez 2023-09-02 23:04:37 +02:00
parent 36fa557a5e
commit e161fa1a6b
3 changed files with 65 additions and 11 deletions

View file

@ -22,4 +22,22 @@ const EXPECTED = [
{ 'path': 'full_path_function::b::Sac', 'name': 'bar2' },
],
},
{
'query': 'string::string -> u32',
'others': [
{ 'path': 'full_path_function::b::Sac', 'name': 'string' },
],
},
{
'query': 'alloc::string::string -> u32',
'others': [
{ 'path': 'full_path_function::b::Sac', 'name': 'string' },
],
},
{
'query': 'alloc::string -> u32',
'others': [
{ 'path': 'full_path_function::b::Sac', 'name': 'string' },
],
},
];

View file

@ -12,5 +12,6 @@ pub mod b {
pub fn len(&self) -> usize { 0 }
pub fn bar(&self, w: u32) -> usize { 0 }
pub fn bar2(&self, w: u32) -> u32 { 0 }
pub fn string(w: String) -> u32 { 0 }
}
}