diff options
| author | bors <bors@rust-lang.org> | 2022-07-16 20:31:42 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-07-16 20:31:42 +0000 |
| commit | d5e7f4782e4b699728d0a08200ecd1a54d56a85d (patch) | |
| tree | 2ecfa500407be289cf19a91c39d2ce7bdd511731 /compiler/rustc_session/src | |
| parent | 7210e46dc69a4b197a313d093fe145722c248b7d (diff) | |
| parent | 6277ac2fb8bf97cd910a0a841c6924b246d32c44 (diff) | |
| download | rust-d5e7f4782e4b699728d0a08200ecd1a54d56a85d.tar.gz rust-d5e7f4782e4b699728d0a08200ecd1a54d56a85d.zip | |
Auto merge of #99346 - matthiaskrgr:rollup-p4dl1qt, r=matthiaskrgr
Rollup of 10 pull requests Successful merges: - #98582 (Allow destructuring opaque types in their defining scopes) - #99213 (migrate some of `rustc_passes::check_attr`'s diagnostics and derive improvements) - #99258 (Provide structured suggestion for dropped temp value) - #99259 (interpret/visitor: support visiting with a PlaceTy) - #99287 ([rustdoc-json] JSON no longer inlines) - #99290 (Revert "Highlight conflicting param-env candidates") - #99316 (docs: add missing word) - #99317 (Borrow Vec<T, A> as [T]) - #99323 (Fix flakyness of GUI tests) - #99342 (Avoid some `Symbol` to `String` conversions) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_session/src')
| -rw-r--r-- | compiler/rustc_session/src/code_stats.rs | 7 |
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!( |
