ty: remove obsolete printer
This commit removes the obsolete printer and replaces all uses of it with `FmtPrinter`. Of the replaced uses, all but one use was in `debug!` logging, two cases were notable: - `MonoItem::to_string` is used in `-Z print-mono-items` and therefore affects the output of all codegen-units tests. - `DefPathBasedNames` was used in `librustc_codegen_llvm/type_of.rs` with `LLVMStructCreateNamed` and that'll now get different values, but this should result in no functional change. Signed-off-by: David Wood <david@davidtw.co>
This commit is contained in:
parent
85fbf49ce0
commit
6ff471b1cf
44 changed files with 385 additions and 664 deletions
|
@ -4,7 +4,6 @@ use crate::type_::Type;
|
|||
use rustc_codegen_ssa::traits::*;
|
||||
use rustc_middle::bug;
|
||||
use rustc_middle::ty::layout::{FnAbiExt, TyAndLayout};
|
||||
use rustc_middle::ty::print::obsolete::DefPathBasedNames;
|
||||
use rustc_middle::ty::{self, Ty, TypeFoldable};
|
||||
use rustc_target::abi::{Abi, AddressSpace, Align, FieldsShape};
|
||||
use rustc_target::abi::{Int, Pointer, F32, F64};
|
||||
|
@ -60,9 +59,7 @@ fn uncached_llvm_type<'a, 'tcx>(
|
|||
// ty::Dynamic(..) |
|
||||
ty::Foreign(..) |
|
||||
ty::Str => {
|
||||
let mut name = String::with_capacity(32);
|
||||
let printer = DefPathBasedNames::new(cx.tcx, true, true);
|
||||
printer.push_type_name(layout.ty, &mut name, false);
|
||||
let mut name = layout.ty.to_string();
|
||||
if let (&ty::Adt(def, _), &Variants::Single { index })
|
||||
= (&layout.ty.kind, &layout.variants)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue