Skip to content

Commit f9f3c9f

Browse files
committed
Rename strip_path to strip_path_generics
The new name is more descriptive of what the function does.
1 parent 5f744f3 commit f9f3c9f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/librustdoc/clean/auto_trait.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ impl<'a, 'tcx> AutoTraitFinder<'a, 'tcx> {
502502
.and_then(|trait_| {
503503
ty_to_traits
504504
.get(&ty)
505-
.map(|bounds| bounds.contains(&strip_path(trait_.clone())))
505+
.map(|bounds| bounds.contains(&strip_path_generics(trait_.clone())))
506506
})
507507
.unwrap_or(false)
508508
{

src/librustdoc/clean/utils.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,8 @@ pub(super) fn external_path(
156156
}
157157
}
158158

159-
crate fn strip_path(path: Path) -> Path {
159+
/// Remove the generic arguments from a path.
160+
crate fn strip_path_generics(path: Path) -> Path {
160161
let segments = path
161162
.segments
162163
.iter()

0 commit comments

Comments
 (0)