diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2021-11-26 22:41:39 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-26 22:41:39 +0100 |
| commit | fcbbdaf2092ad2dee5763389ad89f89cbf560906 (patch) | |
| tree | 14a404a01d19a5cdd2c76310d373fd8c83dc73ff /src/librustdoc/html/render/cache.rs | |
| parent | 10743f0f6823b2a122cc4d552ed8aa0cabb9f088 (diff) | |
| parent | 79c718f1d5916318b5d55e6c1391a438cae1f763 (diff) | |
| download | rust-fcbbdaf2092ad2dee5763389ad89f89cbf560906.tar.gz rust-fcbbdaf2092ad2dee5763389ad89f89cbf560906.zip | |
Rollup merge of #91197 - camelid:rename-resolvedpath, r=GuillaumeGomez,jyn514
rustdoc: Rename `Type::ResolvedPath` to `Type::Path` and don't re-export it The new name is shorter, simpler, and consistent with `hir::Ty`. It can't be re-exported since the name would conflict with the `clean::Path` struct. But usually enum variants are referred to using their qualified names in Rust anyway (and parts of rustdoc already do that with `clean::Type`), so this is also more consistent with the language. r? `@GuillaumeGomez` cc `@jyn514`
Diffstat (limited to 'src/librustdoc/html/render/cache.rs')
| -rw-r--r-- | src/librustdoc/html/render/cache.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustdoc/html/render/cache.rs b/src/librustdoc/html/render/cache.rs index c114edf1e70..d12667c9e5c 100644 --- a/src/librustdoc/html/render/cache.rs +++ b/src/librustdoc/html/render/cache.rs @@ -218,7 +218,7 @@ fn get_index_type(clean_type: &clean::Type, generics: Vec<TypeWithKind>) -> Rend fn get_index_type_name(clean_type: &clean::Type, accept_generic: bool) -> Option<Symbol> { match *clean_type { - clean::ResolvedPath { ref path, .. } => { + clean::Type::Path { ref path, .. } => { let path_segment = path.segments.last().unwrap(); Some(path_segment.name) } @@ -371,7 +371,7 @@ crate fn get_real_types<'tcx>( let mut ty_generics = Vec::new(); for bound in bound.get_bounds().unwrap_or(&[]) { if let Some(path) = bound.get_trait_path() { - let ty = Type::ResolvedPath { path }; + let ty = Type::Path { path }; get_real_types(generics, &ty, tcx, recurse + 1, &mut ty_generics, cache); } } |
