diff options
| author | David Wood <david@davidtw.co> | 2020-12-17 16:06:24 +0000 |
|---|---|---|
| committer | David Wood <david@davidtw.co> | 2020-12-17 16:40:47 +0000 |
| commit | 88dc58fc9bb3dddccb99fc0e9f7a917c2052f8d0 (patch) | |
| tree | c14493409cc0317a6b2393d9bb7cc5f99c5247cb | |
| parent | caeb3335c052f286f6e7257ac0ff21e4f73fd8c5 (diff) | |
| download | rust-88dc58fc9bb3dddccb99fc0e9f7a917c2052f8d0.tar.gz rust-88dc58fc9bb3dddccb99fc0e9f7a917c2052f8d0.zip | |
Revert "cg_llvm: `fewer_names` in `uncached_llvm_type`"
This reverts commit fa01ce802f1b403a2140fd945b43af86ec3998a1.
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/type_of.rs | 10 | ||||
| -rw-r--r-- | src/test/ui/issues/issue-75763.rs | 3 |
2 files changed, 3 insertions, 10 deletions
diff --git a/compiler/rustc_codegen_llvm/src/type_of.rs b/compiler/rustc_codegen_llvm/src/type_of.rs index 8ea4768f77d..0876907e119 100644 --- a/compiler/rustc_codegen_llvm/src/type_of.rs +++ b/compiler/rustc_codegen_llvm/src/type_of.rs @@ -40,9 +40,7 @@ fn uncached_llvm_type<'a, 'tcx>( // FIXME(eddyb) producing readable type names for trait objects can result // in problematically distinct types due to HRTB and subtyping (see #47638). // ty::Dynamic(..) | - ty::Adt(..) | ty::Closure(..) | ty::Foreign(..) | ty::Generator(..) | ty::Str - if !cx.sess().fewer_names() => - { + ty::Adt(..) | ty::Closure(..) | ty::Foreign(..) | ty::Generator(..) | ty::Str => { let mut name = with_no_trimmed_paths(|| layout.ty.to_string()); if let (&ty::Adt(def, _), &Variants::Single { index }) = (layout.ty.kind(), &layout.variants) @@ -58,12 +56,6 @@ fn uncached_llvm_type<'a, 'tcx>( } Some(name) } - ty::Adt(..) => { - // If `Some` is returned then a named struct is created in LLVM. Name collisions are - // avoided by LLVM (with increasing suffixes). If rustc doesn't generate names then that - // can improve perf. - Some(String::new()) - } _ => None, }; diff --git a/src/test/ui/issues/issue-75763.rs b/src/test/ui/issues/issue-75763.rs index 2fd9f9a60de..c311de05a1c 100644 --- a/src/test/ui/issues/issue-75763.rs +++ b/src/test/ui/issues/issue-75763.rs @@ -1,4 +1,5 @@ -// build-pass +// ignore-test +// FIXME(const_generics): This test causes an ICE after reverting #76030. #![allow(incomplete_features)] #![feature(const_generics)] |
