@@ -432,7 +432,7 @@ pub enum MethodOrigin<'tcx> {
432
432
// fully statically resolved method
433
433
MethodStatic ( ast:: DefId ) ,
434
434
435
- // fully statically resolved unboxed closure invocation
435
+ // fully statically resolved closure invocation
436
436
MethodStaticClosure ( ast:: DefId ) ,
437
437
438
438
// method invoked on a type parameter with a bounded trait
@@ -565,7 +565,7 @@ pub enum vtable_origin<'tcx> {
565
565
vtable_param( param_index , uint ) ,
566
566
567
567
/*
568
- Vtable automatically generated for an unboxed closure. The def ID is the
568
+ Vtable automatically generated for a closure. The def ID is the
569
569
ID of the closure expression.
570
570
*/
571
571
vtable_closure( ast:: DefId ) ,
@@ -785,8 +785,8 @@ pub struct ctxt<'tcx> {
785
785
786
786
pub dependency_formats : RefCell < dependency_format:: Dependencies > ,
787
787
788
- /// Records the type of each unboxed closure. The def ID is the ID of the
789
- /// expression defining the unboxed closure.
788
+ /// Records the type of each closure. The def ID is the ID of the
789
+ /// expression defining the closure.
790
790
pub closures : RefCell < DefIdMap < Closure < ' tcx > > > ,
791
791
792
792
pub node_lint_levels : RefCell < FnvHashMap < ( ast:: NodeId , lint:: LintId ) ,
@@ -2262,12 +2262,12 @@ pub struct ItemSubsts<'tcx> {
2262
2262
pub substs : Substs < ' tcx > ,
2263
2263
}
2264
2264
2265
- /// Records information about each unboxed closure.
2265
+ /// Records information about each closure.
2266
2266
#[ derive( Clone ) ]
2267
2267
pub struct Closure < ' tcx > {
2268
- /// The type of the unboxed closure.
2268
+ /// The type of the closure.
2269
2269
pub closure_type : ClosureTy < ' tcx > ,
2270
- /// The kind of unboxed closure this is.
2270
+ /// The kind of closure this is.
2271
2271
pub kind : ClosureKind ,
2272
2272
}
2273
2273
@@ -3416,8 +3416,7 @@ pub fn type_contents<'tcx>(cx: &ctxt<'tcx>, ty: Ty<'tcx>) -> TypeContents {
3416
3416
}
3417
3417
3418
3418
ty_closure( did, r, substs) => {
3419
- // FIXME(#14449): `borrowed_contents` below assumes `&mut`
3420
- // unboxed closure.
3419
+ // FIXME(#14449): `borrowed_contents` below assumes `&mut` closure.
3421
3420
let param_env = ty:: empty_parameter_environment ( cx) ;
3422
3421
let upvars = closure_upvars ( & param_env, did, substs) . unwrap ( ) ;
3423
3422
TypeContents :: union ( upvars. as_slice ( ) ,
@@ -3685,7 +3684,7 @@ pub fn is_instantiable<'tcx>(cx: &ctxt<'tcx>, r_ty: Ty<'tcx>) -> bool {
3685
3684
ty_infer( _) |
3686
3685
ty_closure( ..) => {
3687
3686
// this check is run on type definitions, so we don't expect to see
3688
- // inference by-products or unboxed closure types
3687
+ // inference by-products or closure types
3689
3688
cx. sess . bug ( format ! ( "requires check invoked on inapplicable type: {:?}" ,
3690
3689
ty) . as_slice ( ) )
3691
3690
}
@@ -3778,8 +3777,8 @@ pub fn is_type_representable<'tcx>(cx: &ctxt<'tcx>, sp: Span, ty: Ty<'tcx>)
3778
3777
find_nonrepresentable ( cx, sp, seen, iter)
3779
3778
}
3780
3779
ty_closure( ..) => {
3781
- // this check is run on type definitions, so we don't expect to see
3782
- // unboxed closure types
3780
+ // this check is run on type definitions, so we don't expect
3781
+ // to see closure types
3783
3782
cx. sess . bug ( format ! ( "requires check invoked on inapplicable type: {:?}" ,
3784
3783
ty) . as_slice ( ) )
3785
3784
}
0 commit comments