]> git.lizzy.rs Git - rust.git/commitdiff
Rename `strip_path` to `strip_path_generics`
authorNoah Lev <camelidcamel@gmail.com>
Sun, 3 Oct 2021 18:18:47 +0000 (11:18 -0700)
committerNoah Lev <camelidcamel@gmail.com>
Sun, 3 Oct 2021 18:20:35 +0000 (11:20 -0700)
The new name is more descriptive of what the function does.

src/librustdoc/clean/auto_trait.rs
src/librustdoc/clean/utils.rs

index e771714ed61191c3072ca42e953afd7c2e760b2d..f9d1666977134f70fda11a90096bbd3fd25d7473 100644 (file)
@@ -502,7 +502,7 @@ fn param_env_to_generics(
                         .and_then(|trait_| {
                             ty_to_traits
                                 .get(&ty)
-                                .map(|bounds| bounds.contains(&strip_path(trait_.clone())))
+                                .map(|bounds| bounds.contains(&strip_path_generics(trait_.clone())))
                         })
                         .unwrap_or(false)
                     {
index 487efdc060f09ca11fd0e020eb9e9b5927a13ed5..1449b8acf0cd74c74c63b1f8bbd7a8935ace7c12 100644 (file)
@@ -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
         .segments
         .iter()