Overcome Sync issues with non-parallel compiler
Per Mark's recommendation at: https://github.com/rust-lang/rust/pull/78963#issuecomment-725790071
This commit is contained in:
parent
bd0eb07af2
commit
eb9f2bb3b0
2 changed files with 22 additions and 9 deletions
|
@ -611,6 +611,18 @@ pub struct TyS<'tcx> {
|
|||
outer_exclusive_binder: ty::DebruijnIndex,
|
||||
}
|
||||
|
||||
impl<'tcx> TyS<'tcx> {
|
||||
/// A constructor used only for internal testing.
|
||||
#[allow(rustc::usage_of_ty_tykind)]
|
||||
pub fn make_for_test(
|
||||
kind: TyKind<'tcx>,
|
||||
flags: TypeFlags,
|
||||
outer_exclusive_binder: ty::DebruijnIndex,
|
||||
) -> TyS<'tcx> {
|
||||
TyS { kind, flags, outer_exclusive_binder }
|
||||
}
|
||||
}
|
||||
|
||||
// `TyS` is used a lot. Make sure it doesn't unintentionally get bigger.
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
static_assert_size!(TyS<'_>, 32);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue