about summary refs log tree commit diff
path: root/src/librustdoc/html
diff options
context:
space:
mode:
authorMichael Howell <michael@notriddle.com>2022-08-16 12:48:04 -0700
committerMichael Howell <michael@notriddle.com>2022-08-16 12:48:04 -0700
commit2aa4aa70ddd11ebc56667dbb3907c93a5a0176c2 (patch)
treeaed8324936a1f72c5286fe25e883f52eaca33025 /src/librustdoc/html
parenta39bdb1d6b9eaf23f2636baee0949d67890abcd8 (diff)
downloadrust-2aa4aa70ddd11ebc56667dbb3907c93a5a0176c2.tar.gz
rust-2aa4aa70ddd11ebc56667dbb3907c93a5a0176c2.zip
rustdoc: factor Type::QPath out into its own box
This reduces the size of Type.
Diffstat (limited to 'src/librustdoc/html')
-rw-r--r--src/librustdoc/html/format.rs7
-rw-r--r--src/librustdoc/html/render/mod.rs4
2 files changed, 8 insertions, 3 deletions
diff --git a/src/librustdoc/html/format.rs b/src/librustdoc/html/format.rs
index 3dee4d1acc8..b023792e95a 100644
--- a/src/librustdoc/html/format.rs
+++ b/src/librustdoc/html/format.rs
@@ -1079,7 +1079,12 @@ fn fmt_type<'cx>(
                 write!(f, "impl {}", print_generic_bounds(bounds, cx))
             }
         }
-        clean::QPath { ref assoc, ref self_type, ref trait_, should_show_cast } => {
+        clean::QPath(box clean::QPathData {
+            ref assoc,
+            ref self_type,
+            ref trait_,
+            should_show_cast,
+        }) => {
             if f.alternate() {
                 if should_show_cast {
                     write!(f, "<{:#} as {:#}>::", self_type.print(cx), trait_.print(cx))?
diff --git a/src/librustdoc/html/render/mod.rs b/src/librustdoc/html/render/mod.rs
index 5ed5299e09b..1ac5186f9f6 100644
--- a/src/librustdoc/html/render/mod.rs
+++ b/src/librustdoc/html/render/mod.rs
@@ -2623,8 +2623,8 @@ fn collect_paths_for_type(first_ty: clean::Type, cache: &Cache) -> Vec<String> {
             clean::Type::BorrowedRef { type_, .. } => {
                 work.push_back(*type_);
             }
-            clean::Type::QPath { self_type, trait_, .. } => {
-                work.push_back(*self_type);
+            clean::Type::QPath(box clean::QPathData { self_type, trait_, .. }) => {
+                work.push_back(self_type);
                 process_path(trait_.def_id());
             }
             _ => {}