Rollup merge of #105743 - nnethercote:SimplifiedType-cleanups, r=lcnr

`SimplifiedType` cleanups

r? `@lcnr`
This commit is contained in:
Matthias Krüger 2022-12-15 22:03:01 +01:00 committed by GitHub
commit 0f90ea9a61
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 15 additions and 55 deletions

View file

@ -325,7 +325,7 @@ pub(crate) fn build_impls(
// * https://github.com/rust-lang/rust/pull/99917 — where the feature got used
// * https://github.com/rust-lang/rust/issues/53487 — overall tracking issue for Error
if tcx.has_attr(did, sym::rustc_has_incoherent_inherent_impls) {
use rustc_middle::ty::fast_reject::SimplifiedTypeGen::*;
use rustc_middle::ty::fast_reject::SimplifiedType::*;
let type_ =
if tcx.is_trait(did) { TraitSimplifiedType(did) } else { AdtSimplifiedType(did) };
for &did in tcx.incoherent_impls(type_) {

View file

@ -1870,7 +1870,7 @@ impl PrimitiveType {
}
pub(crate) fn simplified_types() -> &'static SimplifiedTypes {
use ty::fast_reject::SimplifiedTypeGen::*;
use ty::fast_reject::SimplifiedType::*;
use ty::{FloatTy, IntTy, UintTy};
use PrimitiveType::*;
static CELL: OnceCell<SimplifiedTypes> = OnceCell::new();