@@ -9,7 +9,7 @@ use rustc_middle::ty::{self, ParamEnvAnd, Ty, TyCtxt};
9
9
use rustc_span:: source_map:: { Span , DUMMY_SP } ;
10
10
use rustc_trait_selection:: traits:: query:: dropck_outlives:: trivial_dropck_outlives;
11
11
use rustc_trait_selection:: traits:: query:: dropck_outlives:: {
12
- DropckOutlivesResult , DtorckConstraint ,
12
+ DropckConstraint , DropckOutlivesResult ,
13
13
} ;
14
14
use rustc_trait_selection:: traits:: query:: normalize:: AtExt ;
15
15
use rustc_trait_selection:: traits:: query:: { CanonicalTyGoal , NoSolution } ;
@@ -78,7 +78,7 @@ fn dropck_outlives<'tcx>(
78
78
let mut fulfill_cx = <dyn TraitEngine < ' _ > >:: new ( infcx. tcx ) ;
79
79
80
80
let cause = ObligationCause :: dummy ( ) ;
81
- let mut constraints = DtorckConstraint :: empty ( ) ;
81
+ let mut constraints = DropckConstraint :: empty ( ) ;
82
82
while let Some ( ( ty, depth) ) = ty_stack. pop ( ) {
83
83
debug ! (
84
84
"{} kinds, {} overflows, {} ty_stack" ,
@@ -159,7 +159,7 @@ fn dtorck_constraint_for_ty<'tcx>(
159
159
for_ty : Ty < ' tcx > ,
160
160
depth : usize ,
161
161
ty : Ty < ' tcx > ,
162
- constraints : & mut DtorckConstraint < ' tcx > ,
162
+ constraints : & mut DropckConstraint < ' tcx > ,
163
163
) -> Result < ( ) , NoSolution > {
164
164
debug ! ( "dtorck_constraint_for_ty({:?}, {:?}, {:?}, {:?})" , span, for_ty, depth, ty) ;
165
165
@@ -267,7 +267,7 @@ fn dtorck_constraint_for_ty<'tcx>(
267
267
}
268
268
269
269
ty:: Adt ( def, substs) => {
270
- let DtorckConstraint { dtorck_types, outlives, overflows } =
270
+ let DropckConstraint { dtorck_types, outlives, overflows } =
271
271
tcx. at ( span) . adt_dtorck_constraint ( def. did ( ) ) ?;
272
272
// FIXME: we can try to recursively `dtorck_constraint_on_ty`
273
273
// there, but that needs some way to handle cycles.
@@ -301,7 +301,7 @@ fn dtorck_constraint_for_ty<'tcx>(
301
301
crate fn adt_dtorck_constraint (
302
302
tcx : TyCtxt < ' _ > ,
303
303
def_id : DefId ,
304
- ) -> Result < & DtorckConstraint < ' _ > , NoSolution > {
304
+ ) -> Result < & DropckConstraint < ' _ > , NoSolution > {
305
305
let def = tcx. adt_def ( def_id) ;
306
306
let span = tcx. def_span ( def_id) ;
307
307
debug ! ( "dtorck_constraint: {:?}" , def) ;
@@ -311,7 +311,7 @@ crate fn adt_dtorck_constraint(
311
311
// `PhantomData`.
312
312
let substs = InternalSubsts :: identity_for_item ( tcx, def_id) ;
313
313
assert_eq ! ( substs. len( ) , 1 ) ;
314
- let result = DtorckConstraint {
314
+ let result = DropckConstraint {
315
315
outlives : vec ! [ ] ,
316
316
dtorck_types : vec ! [ substs. type_at( 0 ) ] ,
317
317
overflows : vec ! [ ] ,
@@ -320,7 +320,7 @@ crate fn adt_dtorck_constraint(
320
320
return Ok ( tcx. arena . alloc ( result) ) ;
321
321
}
322
322
323
- let mut result = DtorckConstraint :: empty ( ) ;
323
+ let mut result = DropckConstraint :: empty ( ) ;
324
324
for field in def. all_fields ( ) {
325
325
let fty = tcx. type_of ( field. did ) ;
326
326
dtorck_constraint_for_ty ( tcx, span, fty, 0 , fty, & mut result) ?;
@@ -333,7 +333,7 @@ crate fn adt_dtorck_constraint(
333
333
Ok ( tcx. arena . alloc ( result) )
334
334
}
335
335
336
- fn dedup_dtorck_constraint ( c : & mut DtorckConstraint < ' _ > ) {
336
+ fn dedup_dtorck_constraint ( c : & mut DropckConstraint < ' _ > ) {
337
337
let mut outlives = FxHashSet :: default ( ) ;
338
338
let mut dtorck_types = FxHashSet :: default ( ) ;
339
339
0 commit comments