11
11
/*!
12
12
* Conversion from AST representation of types to the ty.rs
13
13
* representation. The main routine here is `ast_ty_to_ty()`: each use
14
- * is parameterized by an instance of `AstConv` and a `region_scope `.
14
+ * is parameterized by an instance of `AstConv` and a `RegionScope `.
15
15
*
16
16
* The parameterization of `ast_ty_to_ty()` is because it behaves
17
17
* somewhat differently during the collect and check phases,
23
23
* In the check phase, when the @FnCtxt is used as the `AstConv`,
24
24
* `get_item_ty()` just looks up the item type in `tcx.tcache`.
25
25
*
26
- * The `region_scope ` trait controls how region references are
26
+ * The `RegionScope ` trait controls how region references are
27
27
* handled. It has two methods which are used to resolve anonymous
28
28
* region references (e.g., `&T`) and named region references (e.g.,
29
29
* `&a.T`). There are numerous region scopes that can be used, but most
30
- * commonly you want either `empty_rscope `, which permits only the static
31
- * region, or `type_rscope `, which permits the self region if the type in
30
+ * commonly you want either `EmptyRscope `, which permits only the static
31
+ * region, or `TypeRscope `, which permits the self region if the type in
32
32
* question is parameterized by a region.
33
33
*
34
34
* Unlike the `AstConv` trait, the region scope can change as we descend
@@ -58,7 +58,7 @@ use middle::ty::{substs};
58
58
use middle:: ty:: { ty_param_substs_and_ty} ;
59
59
use middle:: ty;
60
60
use middle:: typeck:: rscope:: in_binding_rscope;
61
- use middle:: typeck:: rscope:: { region_scope , RegionError } ;
61
+ use middle:: typeck:: rscope:: { RegionScope , RegionError } ;
62
62
use middle:: typeck:: rscope:: RegionParamNames ;
63
63
use middle:: typeck:: lookup_def_tcx;
64
64
@@ -104,7 +104,7 @@ pub fn get_region_reporting_err(
104
104
}
105
105
}
106
106
107
- pub fn ast_region_to_region < AC : AstConv , RS : region_scope + Clone + ' static > (
107
+ pub fn ast_region_to_region < AC : AstConv , RS : RegionScope + Clone + ' static > (
108
108
this : & AC ,
109
109
rscope : & RS ,
110
110
default_span : span ,
@@ -129,7 +129,7 @@ pub fn ast_region_to_region<AC:AstConv,RS:region_scope + Clone + 'static>(
129
129
get_region_reporting_err ( this. tcx ( ) , span, opt_lifetime, res)
130
130
}
131
131
132
- fn ast_path_substs < AC : AstConv , RS : region_scope + Clone + ' static > (
132
+ fn ast_path_substs < AC : AstConv , RS : RegionScope + Clone + ' static > (
133
133
this : & AC ,
134
134
rscope : & RS ,
135
135
def_id : ast:: def_id ,
@@ -200,7 +200,7 @@ fn ast_path_substs<AC:AstConv,RS:region_scope + Clone + 'static>(
200
200
}
201
201
202
202
pub fn ast_path_to_substs_and_ty < AC : AstConv ,
203
- RS : region_scope + Clone + ' static > (
203
+ RS : RegionScope + Clone + ' static > (
204
204
this : & AC ,
205
205
rscope : & RS ,
206
206
did : ast:: def_id ,
@@ -217,7 +217,7 @@ pub fn ast_path_to_substs_and_ty<AC:AstConv,
217
217
ty_param_substs_and_ty { substs : substs, ty : ty }
218
218
}
219
219
220
- pub fn ast_path_to_trait_ref < AC : AstConv , RS : region_scope + Clone + ' static > (
220
+ pub fn ast_path_to_trait_ref < AC : AstConv , RS : RegionScope + Clone + ' static > (
221
221
this : & AC ,
222
222
rscope : & RS ,
223
223
trait_def_id : ast:: def_id ,
@@ -240,7 +240,7 @@ pub fn ast_path_to_trait_ref<AC:AstConv,RS:region_scope + Clone + 'static>(
240
240
return trait_ref;
241
241
}
242
242
243
- pub fn ast_path_to_ty < AC : AstConv , RS : region_scope + Clone + ' static > (
243
+ pub fn ast_path_to_ty < AC : AstConv , RS : RegionScope + Clone + ' static > (
244
244
this : & AC ,
245
245
rscope : & RS ,
246
246
did : ast:: def_id ,
@@ -262,10 +262,10 @@ pub static NO_TPS: uint = 2;
262
262
// Parses the programmer's textual representation of a type into our
263
263
// internal notion of a type. `getter` is a function that returns the type
264
264
// corresponding to a definition ID:
265
- pub fn ast_ty_to_ty < AC : AstConv , RS : region_scope + Clone + ' static > (
265
+ pub fn ast_ty_to_ty < AC : AstConv , RS : RegionScope + Clone + ' static > (
266
266
this : & AC , rscope : & RS , ast_ty : & ast:: Ty ) -> ty:: t {
267
267
268
- fn ast_mt_to_mt < AC : AstConv , RS : region_scope + Clone + ' static > (
268
+ fn ast_mt_to_mt < AC : AstConv , RS : RegionScope + Clone + ' static > (
269
269
this : & AC , rscope : & RS , mt : & ast:: mt ) -> ty:: mt {
270
270
271
271
ty:: mt { ty : ast_ty_to_ty ( this, rscope, mt. ty ) , mutbl : mt. mutbl }
@@ -274,7 +274,7 @@ pub fn ast_ty_to_ty<AC:AstConv, RS:region_scope + Clone + 'static>(
274
274
// Handle @, ~, and & being able to mean estrs and evecs.
275
275
// If a_seq_ty is a str or a vec, make it an estr/evec.
276
276
// Also handle first-class trait types.
277
- fn mk_pointer < AC : AstConv , RS : region_scope + Clone + ' static > (
277
+ fn mk_pointer < AC : AstConv , RS : RegionScope + Clone + ' static > (
278
278
this : & AC ,
279
279
rscope : & RS ,
280
280
a_seq_ty : & ast:: mt ,
@@ -540,7 +540,7 @@ pub fn ast_ty_to_ty<AC:AstConv, RS:region_scope + Clone + 'static>(
540
540
}
541
541
542
542
pub fn ty_of_arg < AC : AstConv ,
543
- RS : region_scope + Clone + ' static > (
543
+ RS : RegionScope + Clone + ' static > (
544
544
this : & AC ,
545
545
rscope : & RS ,
546
546
a : & ast:: arg ,
@@ -588,7 +588,7 @@ struct SelfInfo {
588
588
explicit_self : ast:: explicit_self
589
589
}
590
590
591
- pub fn ty_of_method < AC : AstConv , RS : region_scope + Clone + ' static > (
591
+ pub fn ty_of_method < AC : AstConv , RS : RegionScope + Clone + ' static > (
592
592
this : & AC ,
593
593
rscope : & RS ,
594
594
purity : ast:: purity ,
@@ -606,7 +606,7 @@ pub fn ty_of_method<AC:AstConv,RS:region_scope + Clone + 'static>(
606
606
( a. unwrap ( ) , b)
607
607
}
608
608
609
- pub fn ty_of_bare_fn < AC : AstConv , RS : region_scope + Clone + ' static > (
609
+ pub fn ty_of_bare_fn < AC : AstConv , RS : RegionScope + Clone + ' static > (
610
610
this : & AC ,
611
611
rscope : & RS ,
612
612
purity : ast:: purity ,
@@ -619,7 +619,7 @@ pub fn ty_of_bare_fn<AC:AstConv,RS:region_scope + Clone + 'static>(
619
619
b
620
620
}
621
621
622
- fn ty_of_method_or_bare_fn < AC : AstConv , RS : region_scope + Clone + ' static > (
622
+ fn ty_of_method_or_bare_fn < AC : AstConv , RS : RegionScope + Clone + ' static > (
623
623
this : & AC ,
624
624
rscope : & RS ,
625
625
purity : ast:: purity ,
@@ -657,7 +657,7 @@ fn ty_of_method_or_bare_fn<AC:AstConv,RS:region_scope + Clone + 'static>(
657
657
output : output_ty}
658
658
} ) ;
659
659
660
- fn transform_self_ty < AC : AstConv , RS : region_scope + Clone + ' static > (
660
+ fn transform_self_ty < AC : AstConv , RS : RegionScope + Clone + ' static > (
661
661
this : & AC ,
662
662
rscope : & RS ,
663
663
self_info : & SelfInfo ) -> Option < ty:: t >
@@ -690,7 +690,7 @@ fn ty_of_method_or_bare_fn<AC:AstConv,RS:region_scope + Clone + 'static>(
690
690
}
691
691
}
692
692
693
- pub fn ty_of_closure < AC : AstConv , RS : region_scope + Clone + ' static > (
693
+ pub fn ty_of_closure < AC : AstConv , RS : RegionScope + Clone + ' static > (
694
694
this : & AC ,
695
695
rscope : & RS ,
696
696
sigil : ast:: Sigil ,
0 commit comments