about summary refs log tree commit diff
path: root/compiler/rustc_session/src/code_stats.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_session/src/code_stats.rs')
-rw-r--r--compiler/rustc_session/src/code_stats.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/rustc_session/src/code_stats.rs b/compiler/rustc_session/src/code_stats.rs
index cbb03ffd7a0..eede4d16ea3 100644
--- a/compiler/rustc_session/src/code_stats.rs
+++ b/compiler/rustc_session/src/code_stats.rs
@@ -1,11 +1,12 @@
 use rustc_data_structures::fx::FxHashSet;
 use rustc_data_structures::sync::Lock;
+use rustc_span::Symbol;
 use rustc_target::abi::{Align, Size};
 use std::cmp::{self, Ordering};
 
 #[derive(Clone, PartialEq, Eq, Hash, Debug)]
 pub struct VariantInfo {
-    pub name: Option<String>,
+    pub name: Option<Symbol>,
     pub kind: SizeKind,
     pub size: u64,
     pub align: u64,
@@ -20,7 +21,7 @@ pub enum SizeKind {
 
 #[derive(Clone, PartialEq, Eq, Hash, Debug)]
 pub struct FieldInfo {
-    pub name: String,
+    pub name: Symbol,
     pub offset: u64,
     pub size: u64,
     pub align: u64,
@@ -119,7 +120,7 @@ impl CodeStats {
                 let VariantInfo { ref name, kind: _, align: _, size, ref fields } = *variant_info;
                 let indent = if !struct_like {
                     let name = match name.as_ref() {
-                        Some(name) => name.to_owned(),
+                        Some(name) => name.to_string(),
                         None => i.to_string(),
                     };
                     println!(