Workaround issue #107747
Only required until fix #107803 is merged into stage0 compiler, expected when beta 1.69.0 is released on 2023-03-09, then this commit can be reverted.
This commit is contained in:
parent
36d09e3906
commit
b409329c62
5 changed files with 17 additions and 3 deletions
|
@ -7,8 +7,10 @@ use rustc_arena::DroplessArena;
|
|||
use rustc_hir::def::DefKind;
|
||||
use rustc_hir::def_id::{DefId, LocalDefId};
|
||||
use rustc_middle::ty::query::Providers;
|
||||
#[cfg(not(bootstrap))]
|
||||
use rustc_middle::ty::TypeVisitable;
|
||||
use rustc_middle::ty::{self, CrateVariancesMap, SubstsRef, Ty, TyCtxt};
|
||||
use rustc_middle::ty::{DefIdTree, TypeSuperVisitable, TypeVisitable};
|
||||
use rustc_middle::ty::{DefIdTree, TypeSuperVisitable};
|
||||
use std::ops::ControlFlow;
|
||||
|
||||
/// Defines the `TermsContext` basically houses an arena where we can
|
||||
|
|
|
@ -1120,6 +1120,13 @@ impl From<call::AdjustForForeignAbiError> for FnAbiError<'_> {
|
|||
|
||||
impl<'tcx> fmt::Display for FnAbiError<'tcx> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
#[cfg(bootstrap)]
|
||||
match self {
|
||||
Self::Layout(err) => fmt::Display::fmt(err, f),
|
||||
Self::AdjustForForeignAbi(err) => fmt::Display::fmt(err, f),
|
||||
}
|
||||
|
||||
#[cfg(not(bootstrap))]
|
||||
match self {
|
||||
Self::Layout(err) => err.fmt(f),
|
||||
Self::AdjustForForeignAbi(err) => err.fmt(f),
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
use crate::error::ConstNotUsedTraitAlias;
|
||||
use crate::ty::fold::{ir::TypeFolder, TypeSuperFoldable};
|
||||
use crate::ty::subst::{GenericArg, GenericArgKind};
|
||||
use crate::ty::{self, Ty, TyCtxt, TypeFoldable};
|
||||
#[cfg(not(bootstrap))]
|
||||
use crate::ty::TypeFoldable;
|
||||
use crate::ty::{self, Ty, TyCtxt};
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_span::def_id::DefId;
|
||||
use rustc_span::Span;
|
||||
|
|
|
@ -9,6 +9,7 @@ use crate::infer::InferCtxt;
|
|||
use crate::traits::project::ProjectAndUnifyResult;
|
||||
use rustc_middle::mir::interpret::ErrorHandled;
|
||||
use rustc_middle::ty::fold::{ir::TypeFolder, TypeSuperFoldable};
|
||||
#[cfg(not(bootstrap))]
|
||||
use rustc_middle::ty::visit::TypeVisitable;
|
||||
use rustc_middle::ty::{ImplPolarity, Region, RegionVid};
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
use rustc_data_structures::fx::FxHashSet;
|
||||
use rustc_hir as hir;
|
||||
use rustc_middle::ty::{self, ir::TypeVisitor, Ty, TyCtxt, TypeSuperVisitable, TypeVisitable};
|
||||
#[cfg(not(bootstrap))]
|
||||
use rustc_middle::ty::TypeVisitable;
|
||||
use rustc_middle::ty::{self, ir::TypeVisitor, Ty, TyCtxt, TypeSuperVisitable};
|
||||
use rustc_span::Span;
|
||||
use std::ops::ControlFlow;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue