@@ -81,9 +81,10 @@ pub trait ast_conv {
81
81
fn ty_infer ( span : span ) -> ty:: t ;
82
82
}
83
83
84
- fn get_region_reporting_err ( tcx : ty:: ctxt ,
85
- span : span ,
86
- res : Result < ty:: Region , ~str > ) -> ty:: Region {
84
+ pub fn get_region_reporting_err ( tcx : ty:: ctxt ,
85
+ span : span ,
86
+ res : Result < ty:: Region , ~str > )
87
+ -> ty:: Region {
87
88
88
89
match res {
89
90
result:: Ok ( r) => r,
@@ -94,7 +95,7 @@ fn get_region_reporting_err(tcx: ty::ctxt,
94
95
}
95
96
}
96
97
97
- fn ast_region_to_region < AC : ast_conv , RS : region_scope Copy Durable > (
98
+ pub fn ast_region_to_region < AC : ast_conv , RS : region_scope Copy Durable > (
98
99
self : AC , rscope : RS , span : span , a_r : @ast:: region ) -> ty:: Region {
99
100
100
101
let res = match a_r. node {
@@ -107,7 +108,7 @@ fn ast_region_to_region<AC: ast_conv, RS: region_scope Copy Durable>(
107
108
get_region_reporting_err ( self . tcx ( ) , span, res)
108
109
}
109
110
110
- fn ast_path_to_substs_and_ty < AC : ast_conv , RS : region_scope Copy Durable > (
111
+ pub fn ast_path_to_substs_and_ty < AC : ast_conv , RS : region_scope Copy Durable > (
111
112
self : AC , rscope : RS , did : ast:: def_id ,
112
113
path : @ast:: path ) -> ty_param_substs_and_ty {
113
114
@@ -174,13 +175,13 @@ pub fn ast_path_to_ty<AC: ast_conv, RS: region_scope Copy Durable>(
174
175
return { substs: substs, ty: ty} ;
175
176
}
176
177
177
- const NO_REGIONS : uint = 1 ;
178
- const NO_TPS : uint = 2 ;
178
+ pub const NO_REGIONS : uint = 1 ;
179
+ pub const NO_TPS : uint = 2 ;
179
180
180
181
// Parses the programmer's textual representation of a type into our
181
182
// internal notion of a type. `getter` is a function that returns the type
182
183
// corresponding to a definition ID:
183
- fn ast_ty_to_ty< AC : ast_conv , RS : region_scope Copy Durable > (
184
+ pub fn ast_ty_to_ty< AC : ast_conv , RS : region_scope Copy Durable > (
184
185
self : AC , rscope : RS , & & ast_ty: @ast:: Ty ) -> ty:: t {
185
186
186
187
fn ast_mt_to_mt < AC : ast_conv , RS : region_scope Copy Durable > (
@@ -405,7 +406,7 @@ fn ast_ty_to_ty<AC: ast_conv, RS: region_scope Copy Durable>(
405
406
return typ;
406
407
}
407
408
408
- fn ty_of_arg < AC : ast_conv , RS : region_scope Copy Durable > (
409
+ pub fn ty_of_arg < AC : ast_conv , RS : region_scope Copy Durable > (
409
410
self : AC , rscope : RS , a : ast:: arg ,
410
411
expected_ty : Option < ty:: arg > ) -> ty:: arg {
411
412
@@ -451,10 +452,10 @@ fn ty_of_arg<AC: ast_conv, RS: region_scope Copy Durable>(
451
452
arg { mode : mode, ty : ty}
452
453
}
453
454
454
- type expected_tys = Option < { inputs: ~[ ty:: arg] ,
455
- output : ty:: t } > ;
455
+ pub type expected_tys = Option < { inputs: ~[ ty:: arg] ,
456
+ output : ty:: t } > ;
456
457
457
- fn ty_of_fn_decl < AC : ast_conv , RS : region_scope Copy Durable > (
458
+ pub fn ty_of_fn_decl < AC : ast_conv , RS : region_scope Copy Durable > (
458
459
self : AC , rscope : RS ,
459
460
ast_proto : ast:: Proto ,
460
461
purity : ast:: purity ,
@@ -463,8 +464,7 @@ fn ty_of_fn_decl<AC: ast_conv, RS: region_scope Copy Durable>(
463
464
opt_region : Option < @ast:: region > ,
464
465
decl : ast:: fn_decl ,
465
466
expected_tys : expected_tys ,
466
- span : span ) -> ty:: FnTy
467
- {
467
+ span : span ) -> ty:: FnTy {
468
468
debug ! ( "ty_of_fn_decl" ) ;
469
469
do indent {
470
470
// resolve the function bound region in the original region
0 commit comments