Skip to content

Commit 5cbb5d0

Browse files
committed
rename OpaqueHiddenType
1 parent ad20e5c commit 5cbb5d0

File tree

10 files changed

+50
-46
lines changed

10 files changed

+50
-46
lines changed

compiler/rustc_borrowck/src/region_infer/opaque_types/mod.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ use rustc_macros::extension;
1111
use rustc_middle::mir::{Body, ConstraintCategory};
1212
use rustc_middle::ty::{
1313
self, DefiningScopeKind, DefinitionSiteHiddenType, FallibleTypeFolder, GenericArg,
14-
GenericArgsRef, OpaqueHiddenType, OpaqueTypeKey, Region, RegionVid, Ty, TyCtxt, TypeFoldable,
15-
TypeSuperFoldable, TypeVisitableExt, fold_regions,
14+
GenericArgsRef, OpaqueTypeKey, ProvisionalHiddenType, Region, RegionVid, Ty, TyCtxt,
15+
TypeFoldable, TypeSuperFoldable, TypeVisitableExt, fold_regions,
1616
};
1717
use rustc_mir_dataflow::points::DenseLocationMap;
1818
use rustc_span::Span;
@@ -48,7 +48,7 @@ pub(crate) enum DeferredOpaqueTypeError<'tcx> {
4848
/// The opaque type.
4949
opaque_type_key: OpaqueTypeKey<'tcx>,
5050
/// The hidden type containing the member region.
51-
hidden_type: OpaqueHiddenType<'tcx>,
51+
hidden_type: ProvisionalHiddenType<'tcx>,
5252
/// The unexpected region.
5353
member_region: Region<'tcx>,
5454
},
@@ -67,7 +67,7 @@ pub(crate) fn clone_and_resolve_opaque_types<'tcx>(
6767
infcx: &BorrowckInferCtxt<'tcx>,
6868
universal_region_relations: &Frozen<UniversalRegionRelations<'tcx>>,
6969
constraints: &mut MirTypeckRegionConstraints<'tcx>,
70-
) -> (OpaqueTypeStorageEntries, Vec<(OpaqueTypeKey<'tcx>, OpaqueHiddenType<'tcx>)>) {
70+
) -> (OpaqueTypeStorageEntries, Vec<(OpaqueTypeKey<'tcx>, ProvisionalHiddenType<'tcx>)>) {
7171
let opaque_types = infcx.clone_opaque_types();
7272
let opaque_types_storage_num_entries = infcx.inner.borrow_mut().opaque_types().num_entries();
7373
let opaque_types = opaque_types
@@ -161,7 +161,7 @@ struct DefiningUse<'tcx> {
161161
/// to interact with code outside of `rustc_borrowck`.
162162
opaque_type_key: OpaqueTypeKey<'tcx>,
163163
arg_regions: Vec<RegionVid>,
164-
hidden_type: OpaqueHiddenType<'tcx>,
164+
hidden_type: ProvisionalHiddenType<'tcx>,
165165
}
166166

167167
/// This computes the actual hidden types of the opaque types and maps them to their
@@ -181,7 +181,7 @@ pub(crate) fn compute_definition_site_hidden_types<'tcx>(
181181
constraints: &MirTypeckRegionConstraints<'tcx>,
182182
location_map: Rc<DenseLocationMap>,
183183
hidden_types: &mut FxIndexMap<LocalDefId, ty::DefinitionSiteHiddenType<'tcx>>,
184-
opaque_types: &[(OpaqueTypeKey<'tcx>, OpaqueHiddenType<'tcx>)],
184+
opaque_types: &[(OpaqueTypeKey<'tcx>, ProvisionalHiddenType<'tcx>)],
185185
) -> Vec<DeferredOpaqueTypeError<'tcx>> {
186186
let mut errors = Vec::new();
187187
// When computing the hidden type we need to track member constraints.
@@ -216,7 +216,7 @@ pub(crate) fn compute_definition_site_hidden_types<'tcx>(
216216
fn collect_defining_uses<'tcx>(
217217
rcx: &mut RegionCtxt<'_, 'tcx>,
218218
hidden_types: &mut FxIndexMap<LocalDefId, ty::DefinitionSiteHiddenType<'tcx>>,
219-
opaque_types: &[(OpaqueTypeKey<'tcx>, OpaqueHiddenType<'tcx>)],
219+
opaque_types: &[(OpaqueTypeKey<'tcx>, ProvisionalHiddenType<'tcx>)],
220220
errors: &mut Vec<DeferredOpaqueTypeError<'tcx>>,
221221
) -> Vec<DefiningUse<'tcx>> {
222222
let infcx = rcx.infcx;
@@ -302,7 +302,7 @@ fn compute_definition_site_hidden_types_from_defining_uses<'tcx>(
302302
hidden_type.span,
303303
"opaque type with non-universal region args",
304304
);
305-
ty::OpaqueHiddenType::new_error(tcx, guar)
305+
ty::ProvisionalHiddenType::new_error(tcx, guar)
306306
}
307307
};
308308

@@ -489,7 +489,7 @@ pub(crate) fn apply_definition_site_hidden_types<'tcx>(
489489
known_type_outlives_obligations: &[ty::PolyTypeOutlivesPredicate<'tcx>],
490490
constraints: &mut MirTypeckRegionConstraints<'tcx>,
491491
hidden_types: &mut FxIndexMap<LocalDefId, ty::DefinitionSiteHiddenType<'tcx>>,
492-
opaque_types: &[(OpaqueTypeKey<'tcx>, OpaqueHiddenType<'tcx>)],
492+
opaque_types: &[(OpaqueTypeKey<'tcx>, ProvisionalHiddenType<'tcx>)],
493493
) -> Vec<DeferredOpaqueTypeError<'tcx>> {
494494
let tcx = infcx.tcx;
495495
let mut errors = Vec::new();
@@ -679,7 +679,7 @@ impl<'tcx> InferCtxt<'tcx> {
679679
fn infer_opaque_definition_from_instantiation(
680680
&self,
681681
opaque_type_key: OpaqueTypeKey<'tcx>,
682-
instantiated_ty: OpaqueHiddenType<'tcx>,
682+
instantiated_ty: ProvisionalHiddenType<'tcx>,
683683
) -> Result<ty::DefinitionSiteHiddenType<'tcx>, NonDefiningUseReason<'tcx>> {
684684
opaque_type_has_defining_use_args(
685685
self,

compiler/rustc_hir_analysis/src/check/check.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ fn best_definition_site_of_opaque<'tcx>(
493493
fn sanity_check_found_hidden_type<'tcx>(
494494
tcx: TyCtxt<'tcx>,
495495
key: ty::OpaqueTypeKey<'tcx>,
496-
mut ty: ty::OpaqueHiddenType<'tcx>,
496+
mut ty: ty::ProvisionalHiddenType<'tcx>,
497497
) -> Result<(), ErrorGuaranteed> {
498498
if ty.ty.is_ty_var() {
499499
// Nothing was actually constrained.
@@ -529,7 +529,7 @@ fn sanity_check_found_hidden_type<'tcx>(
529529
Ok(())
530530
} else {
531531
let span = tcx.def_span(key.def_id);
532-
let other = ty::OpaqueHiddenType { ty: hidden_ty, span };
532+
let other = ty::ProvisionalHiddenType { ty: hidden_ty, span };
533533
Err(ty.build_mismatch_error(&other, tcx)?.emit())
534534
}
535535
}

compiler/rustc_hir_typeck/src/method/probe.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -584,8 +584,8 @@ pub(crate) fn method_autoderef_steps<'tcx>(
584584
value: query::MethodAutoderefSteps { predefined_opaques_in_body, self_ty },
585585
} = goal;
586586
for (key, ty) in predefined_opaques_in_body {
587-
let prev =
588-
infcx.register_hidden_type_in_storage(key, ty::OpaqueHiddenType { span: DUMMY_SP, ty });
587+
let prev = infcx
588+
.register_hidden_type_in_storage(key, ty::ProvisionalHiddenType { span: DUMMY_SP, ty });
589589
// It may be possible that two entries in the opaque type storage end up
590590
// with the same key after resolving contained inference variables.
591591
//

compiler/rustc_hir_typeck/src/opaque_types.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use rustc_hir::def::DefKind;
22
use rustc_infer::traits::ObligationCause;
33
use rustc_middle::ty::{
4-
self, DefiningScopeKind, DefinitionSiteHiddenType, OpaqueHiddenType, OpaqueTypeKey,
4+
self, DefiningScopeKind, DefinitionSiteHiddenType, OpaqueTypeKey, ProvisionalHiddenType,
55
TypeVisitableExt, TypingMode,
66
};
77
use rustc_trait_selection::error_reporting::infer::need_type_info::TypeAnnotationNeeded;
@@ -57,8 +57,8 @@ impl<'tcx> FnCtxt<'_, 'tcx> {
5757
#[derive(Copy, Clone, Debug)]
5858
enum UsageKind<'tcx> {
5959
None,
60-
NonDefiningUse(OpaqueTypeKey<'tcx>, OpaqueHiddenType<'tcx>),
61-
UnconstrainedHiddenType(OpaqueHiddenType<'tcx>),
60+
NonDefiningUse(OpaqueTypeKey<'tcx>, ProvisionalHiddenType<'tcx>),
61+
UnconstrainedHiddenType(ProvisionalHiddenType<'tcx>),
6262
HasDefiningUse(DefinitionSiteHiddenType<'tcx>),
6363
}
6464

@@ -88,7 +88,7 @@ impl<'tcx> UsageKind<'tcx> {
8888
impl<'tcx> FnCtxt<'_, 'tcx> {
8989
fn compute_definition_site_hidden_types(
9090
&mut self,
91-
mut opaque_types: Vec<(OpaqueTypeKey<'tcx>, OpaqueHiddenType<'tcx>)>,
91+
mut opaque_types: Vec<(OpaqueTypeKey<'tcx>, ProvisionalHiddenType<'tcx>)>,
9292
error_on_missing_defining_use: bool,
9393
) {
9494
for entry in opaque_types.iter_mut() {
@@ -200,7 +200,7 @@ impl<'tcx> FnCtxt<'_, 'tcx> {
200200
fn consider_opaque_type_use(
201201
&self,
202202
opaque_type_key: OpaqueTypeKey<'tcx>,
203-
hidden_type: OpaqueHiddenType<'tcx>,
203+
hidden_type: ProvisionalHiddenType<'tcx>,
204204
) -> UsageKind<'tcx> {
205205
if let Err(err) = opaque_type_has_defining_use_args(
206206
&self,
@@ -232,7 +232,7 @@ impl<'tcx> FnCtxt<'_, 'tcx> {
232232
Ok(hidden_type) => hidden_type,
233233
Err(errors) => {
234234
let guar = self.err_ctxt().report_fulfillment_errors(errors);
235-
OpaqueHiddenType::new_error(self.tcx, guar)
235+
ProvisionalHiddenType::new_error(self.tcx, guar)
236236
}
237237
};
238238
let hidden_type = hidden_type.remap_generic_params_to_declaration_params(

compiler/rustc_infer/src/infer/context.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ impl<'tcx> rustc_type_ir::InferCtxtLike for InferCtxt<'tcx> {
314314
) -> Option<Ty<'tcx>> {
315315
self.register_hidden_type_in_storage(
316316
opaque_type_key,
317-
ty::OpaqueHiddenType { span, ty: hidden_ty },
317+
ty::ProvisionalHiddenType { span, ty: hidden_ty },
318318
)
319319
}
320320
fn add_duplicate_opaque_type(
@@ -326,7 +326,7 @@ impl<'tcx> rustc_type_ir::InferCtxtLike for InferCtxt<'tcx> {
326326
self.inner
327327
.borrow_mut()
328328
.opaque_types()
329-
.add_duplicate(opaque_type_key, ty::OpaqueHiddenType { span, ty: hidden_ty })
329+
.add_duplicate(opaque_type_key, ty::ProvisionalHiddenType { span, ty: hidden_ty })
330330
}
331331

332332
fn reset_opaque_types(&self) {

compiler/rustc_infer/src/infer/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ use rustc_middle::traits::solve::Goal;
2828
use rustc_middle::ty::error::{ExpectedFound, TypeError};
2929
use rustc_middle::ty::{
3030
self, BoundVarReplacerDelegate, ConstVid, FloatVid, GenericArg, GenericArgKind, GenericArgs,
31-
GenericArgsRef, GenericParamDefKind, InferConst, IntVid, OpaqueHiddenType, OpaqueTypeKey,
31+
GenericArgsRef, GenericParamDefKind, InferConst, IntVid, OpaqueTypeKey, ProvisionalHiddenType,
3232
PseudoCanonicalInput, Term, TermKind, Ty, TyCtxt, TyVid, TypeFoldable, TypeFolder,
3333
TypeSuperFoldable, TypeVisitable, TypeVisitableExt, TypingEnv, TypingMode, fold_regions,
3434
};
@@ -978,12 +978,12 @@ impl<'tcx> InferCtxt<'tcx> {
978978
}
979979

980980
#[instrument(level = "debug", skip(self), ret)]
981-
pub fn take_opaque_types(&self) -> Vec<(OpaqueTypeKey<'tcx>, OpaqueHiddenType<'tcx>)> {
981+
pub fn take_opaque_types(&self) -> Vec<(OpaqueTypeKey<'tcx>, ProvisionalHiddenType<'tcx>)> {
982982
self.inner.borrow_mut().opaque_type_storage.take_opaque_types().collect()
983983
}
984984

985985
#[instrument(level = "debug", skip(self), ret)]
986-
pub fn clone_opaque_types(&self) -> Vec<(OpaqueTypeKey<'tcx>, OpaqueHiddenType<'tcx>)> {
986+
pub fn clone_opaque_types(&self) -> Vec<(OpaqueTypeKey<'tcx>, ProvisionalHiddenType<'tcx>)> {
987987
self.inner.borrow_mut().opaque_type_storage.iter_opaque_types().collect()
988988
}
989989

compiler/rustc_infer/src/infer/opaque_types/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use rustc_middle::traits::ObligationCause;
55
use rustc_middle::traits::solve::Goal;
66
use rustc_middle::ty::error::{ExpectedFound, TypeError};
77
use rustc_middle::ty::{
8-
self, BottomUpFolder, OpaqueHiddenType, OpaqueTypeKey, Ty, TyCtxt, TypeFoldable,
8+
self, BottomUpFolder, OpaqueTypeKey, ProvisionalHiddenType, Ty, TyCtxt, TypeFoldable,
99
TypeVisitableExt,
1010
};
1111
use rustc_span::Span;
@@ -199,7 +199,7 @@ impl<'tcx> InferCtxt<'tcx> {
199199
pub fn register_hidden_type_in_storage(
200200
&self,
201201
opaque_type_key: OpaqueTypeKey<'tcx>,
202-
hidden_ty: OpaqueHiddenType<'tcx>,
202+
hidden_ty: ProvisionalHiddenType<'tcx>,
203203
) -> Option<Ty<'tcx>> {
204204
self.inner.borrow_mut().opaque_types().register(opaque_type_key, hidden_ty)
205205
}
@@ -237,7 +237,7 @@ impl<'tcx> InferCtxt<'tcx> {
237237
.inner
238238
.borrow_mut()
239239
.opaque_types()
240-
.register(opaque_type_key, OpaqueHiddenType { ty: hidden_ty, span });
240+
.register(opaque_type_key, ProvisionalHiddenType { ty: hidden_ty, span });
241241
if let Some(prev) = prev {
242242
goals.extend(
243243
self.at(&ObligationCause::dummy_with_span(span), param_env)
@@ -253,7 +253,7 @@ impl<'tcx> InferCtxt<'tcx> {
253253
.inner
254254
.borrow_mut()
255255
.opaque_types()
256-
.register(opaque_type_key, OpaqueHiddenType { ty: hidden_ty, span });
256+
.register(opaque_type_key, ProvisionalHiddenType { ty: hidden_ty, span });
257257

258258
// We either equate the new hidden type with the previous entry or with the type
259259
// inferred by HIR typeck.

compiler/rustc_infer/src/infer/opaque_types/table.rs

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ use std::ops::Deref;
33
use rustc_data_structures::fx::FxIndexMap;
44
use rustc_data_structures::undo_log::UndoLogs;
55
use rustc_middle::bug;
6-
use rustc_middle::ty::{self, OpaqueHiddenType, OpaqueTypeKey, Ty};
6+
use rustc_middle::ty::{self, OpaqueTypeKey, ProvisionalHiddenType, Ty};
77
use tracing::instrument;
88

99
use crate::infer::snapshot::undo_log::{InferCtxtUndoLogs, UndoLog};
1010

1111
#[derive(Default, Debug, Clone)]
1212
pub struct OpaqueTypeStorage<'tcx> {
13-
opaque_types: FxIndexMap<OpaqueTypeKey<'tcx>, OpaqueHiddenType<'tcx>>,
14-
duplicate_entries: Vec<(OpaqueTypeKey<'tcx>, OpaqueHiddenType<'tcx>)>,
13+
opaque_types: FxIndexMap<OpaqueTypeKey<'tcx>, ProvisionalHiddenType<'tcx>>,
14+
duplicate_entries: Vec<(OpaqueTypeKey<'tcx>, ProvisionalHiddenType<'tcx>)>,
1515
}
1616

1717
/// The number of entries in the opaque type storage at a given point.
@@ -35,7 +35,7 @@ impl<'tcx> OpaqueTypeStorage<'tcx> {
3535
pub(crate) fn remove(
3636
&mut self,
3737
key: OpaqueTypeKey<'tcx>,
38-
prev: Option<OpaqueHiddenType<'tcx>>,
38+
prev: Option<ProvisionalHiddenType<'tcx>>,
3939
) {
4040
if let Some(prev) = prev {
4141
*self.opaque_types.get_mut(&key).unwrap() = prev;
@@ -60,7 +60,7 @@ impl<'tcx> OpaqueTypeStorage<'tcx> {
6060

6161
pub(crate) fn take_opaque_types(
6262
&mut self,
63-
) -> impl Iterator<Item = (OpaqueTypeKey<'tcx>, OpaqueHiddenType<'tcx>)> {
63+
) -> impl Iterator<Item = (OpaqueTypeKey<'tcx>, ProvisionalHiddenType<'tcx>)> {
6464
let OpaqueTypeStorage { opaque_types, duplicate_entries } = self;
6565
std::mem::take(opaque_types).into_iter().chain(std::mem::take(duplicate_entries))
6666
}
@@ -75,7 +75,7 @@ impl<'tcx> OpaqueTypeStorage<'tcx> {
7575
pub fn opaque_types_added_since(
7676
&self,
7777
prev_entries: OpaqueTypeStorageEntries,
78-
) -> impl Iterator<Item = (OpaqueTypeKey<'tcx>, OpaqueHiddenType<'tcx>)> {
78+
) -> impl Iterator<Item = (OpaqueTypeKey<'tcx>, ProvisionalHiddenType<'tcx>)> {
7979
self.opaque_types
8080
.iter()
8181
.skip(prev_entries.opaque_types)
@@ -90,7 +90,7 @@ impl<'tcx> OpaqueTypeStorage<'tcx> {
9090
/// to also consider duplicate entries.
9191
pub fn iter_lookup_table(
9292
&self,
93-
) -> impl Iterator<Item = (OpaqueTypeKey<'tcx>, OpaqueHiddenType<'tcx>)> {
93+
) -> impl Iterator<Item = (OpaqueTypeKey<'tcx>, ProvisionalHiddenType<'tcx>)> {
9494
self.opaque_types.iter().map(|(k, v)| (*k, *v))
9595
}
9696

@@ -101,13 +101,13 @@ impl<'tcx> OpaqueTypeStorage<'tcx> {
101101
/// accesses them.
102102
pub fn iter_duplicate_entries(
103103
&self,
104-
) -> impl Iterator<Item = (OpaqueTypeKey<'tcx>, OpaqueHiddenType<'tcx>)> {
104+
) -> impl Iterator<Item = (OpaqueTypeKey<'tcx>, ProvisionalHiddenType<'tcx>)> {
105105
self.duplicate_entries.iter().copied()
106106
}
107107

108108
pub fn iter_opaque_types(
109109
&self,
110-
) -> impl Iterator<Item = (OpaqueTypeKey<'tcx>, OpaqueHiddenType<'tcx>)> {
110+
) -> impl Iterator<Item = (OpaqueTypeKey<'tcx>, ProvisionalHiddenType<'tcx>)> {
111111
let OpaqueTypeStorage { opaque_types, duplicate_entries } = self;
112112
opaque_types.iter().map(|(k, v)| (*k, *v)).chain(duplicate_entries.iter().copied())
113113
}
@@ -146,7 +146,7 @@ impl<'a, 'tcx> OpaqueTypeTable<'a, 'tcx> {
146146
pub fn register(
147147
&mut self,
148148
key: OpaqueTypeKey<'tcx>,
149-
hidden_type: OpaqueHiddenType<'tcx>,
149+
hidden_type: ProvisionalHiddenType<'tcx>,
150150
) -> Option<Ty<'tcx>> {
151151
if let Some(entry) = self.storage.opaque_types.get_mut(&key) {
152152
let prev = std::mem::replace(entry, hidden_type);
@@ -158,7 +158,11 @@ impl<'a, 'tcx> OpaqueTypeTable<'a, 'tcx> {
158158
None
159159
}
160160

161-
pub fn add_duplicate(&mut self, key: OpaqueTypeKey<'tcx>, hidden_type: OpaqueHiddenType<'tcx>) {
161+
pub fn add_duplicate(
162+
&mut self,
163+
key: OpaqueTypeKey<'tcx>,
164+
hidden_type: ProvisionalHiddenType<'tcx>,
165+
) {
162166
self.storage.duplicate_entries.push((key, hidden_type));
163167
self.undo_log.push(UndoLog::DuplicateOpaqueType);
164168
}

compiler/rustc_infer/src/infer/snapshot/undo_log.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use std::marker::PhantomData;
33

44
use rustc_data_structures::undo_log::{Rollback, UndoLogs};
55
use rustc_data_structures::{snapshot_vec as sv, unify as ut};
6-
use rustc_middle::ty::{self, OpaqueHiddenType, OpaqueTypeKey};
6+
use rustc_middle::ty::{self, OpaqueTypeKey, ProvisionalHiddenType};
77
use tracing::debug;
88

99
use crate::infer::unify_key::{ConstVidKey, RegionVidKey};
@@ -19,7 +19,7 @@ pub struct Snapshot<'tcx> {
1919
#[derive(Clone)]
2020
pub(crate) enum UndoLog<'tcx> {
2121
DuplicateOpaqueType,
22-
OpaqueTypes(OpaqueTypeKey<'tcx>, Option<OpaqueHiddenType<'tcx>>),
22+
OpaqueTypes(OpaqueTypeKey<'tcx>, Option<ProvisionalHiddenType<'tcx>>),
2323
TypeVariables(type_variable::UndoLog<'tcx>),
2424
ConstUnificationTable(sv::UndoLog<ut::Delegate<ConstVidKey<'tcx>>>),
2525
IntUnificationTable(sv::UndoLog<ut::Delegate<ty::IntVid>>),

compiler/rustc_middle/src/ty/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,7 @@ impl<'a, 'tcx> IntoIterator for &'a InstantiatedPredicates<'tcx> {
725725
}
726726

727727
#[derive(Copy, Clone, Debug, TypeFoldable, TypeVisitable, HashStable, TyEncodable, TyDecodable)]
728-
pub struct OpaqueHiddenType<'tcx> {
728+
pub struct ProvisionalHiddenType<'tcx> {
729729
/// The span of this particular definition of the opaque type. So
730730
/// for example:
731731
///
@@ -767,9 +767,9 @@ pub enum DefiningScopeKind {
767767
MirBorrowck,
768768
}
769769

770-
impl<'tcx> OpaqueHiddenType<'tcx> {
771-
pub fn new_error(tcx: TyCtxt<'tcx>, guar: ErrorGuaranteed) -> OpaqueHiddenType<'tcx> {
772-
OpaqueHiddenType { span: DUMMY_SP, ty: Ty::new_error(tcx, guar) }
770+
impl<'tcx> ProvisionalHiddenType<'tcx> {
771+
pub fn new_error(tcx: TyCtxt<'tcx>, guar: ErrorGuaranteed) -> ProvisionalHiddenType<'tcx> {
772+
ProvisionalHiddenType { span: DUMMY_SP, ty: Ty::new_error(tcx, guar) }
773773
}
774774

775775
pub fn build_mismatch_error(

0 commit comments

Comments
 (0)