Rename strip_path to strip_path_generics
The new name is more descriptive of what the function does.
This commit is contained in:
@@ -502,7 +502,7 @@ impl<'a, 'tcx> AutoTraitFinder<'a, 'tcx> {
|
|||||||
.and_then(|trait_| {
|
.and_then(|trait_| {
|
||||||
ty_to_traits
|
ty_to_traits
|
||||||
.get(&ty)
|
.get(&ty)
|
||||||
.map(|bounds| bounds.contains(&strip_path(trait_.clone())))
|
.map(|bounds| bounds.contains(&strip_path_generics(trait_.clone())))
|
||||||
})
|
})
|
||||||
.unwrap_or(false)
|
.unwrap_or(false)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -156,7 +156,8 @@ pub(super) fn external_path(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
crate fn strip_path(path: Path) -> Path {
|
/// Remove the generic arguments from a path.
|
||||||
|
crate fn strip_path_generics(path: Path) -> Path {
|
||||||
let segments = path
|
let segments = path
|
||||||
.segments
|
.segments
|
||||||
.iter()
|
.iter()
|
||||||
|
|||||||
Reference in New Issue
Block a user