Skip to content

Commit 87d4d82

Browse files
committed
---
yaml --- r: 147580 b: refs/heads/try2 c: a5f4a40 h: refs/heads/master v: v3
1 parent 806fd2a commit 87d4d82

File tree

14 files changed

+100
-104
lines changed

14 files changed

+100
-104
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: ff2d16e119093d98ab2d8fa1802e7e200475c729
8+
refs/heads/try2: a5f4a40f24109f94b4c1e568bf312105f07b1734
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/librustc/middle/typeck/check/method.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1326,7 +1326,7 @@ impl<'a> LookupContext<'a> {
13261326
ty::item_path_str(self.tcx(), did)));
13271327
}
13281328

1329-
fn infcx(&self) -> @mut infer::InferCtxt {
1329+
fn infcx(&self) -> @infer::InferCtxt {
13301330
self.fcx.inh.infcx
13311331
}
13321332

branches/try2/src/librustc/middle/typeck/check/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ pub struct SelfInfo {
157157
/// `bar()` will each have their own `FnCtxt`, but they will
158158
/// share the inherited fields.
159159
pub struct Inherited {
160-
infcx: @mut infer::InferCtxt,
160+
infcx: @infer::InferCtxt,
161161
locals: @mut HashMap<ast::NodeId, ty::t>,
162162
param_env: ty::ParameterEnvironment,
163163

@@ -1045,7 +1045,7 @@ impl AstConv for FnCtxt {
10451045
}
10461046

10471047
impl FnCtxt {
1048-
pub fn infcx(&self) -> @mut infer::InferCtxt {
1048+
pub fn infcx(&self) -> @infer::InferCtxt {
10491049
self.inh.infcx
10501050
}
10511051

@@ -1061,7 +1061,7 @@ impl FnCtxt {
10611061
}
10621062
}
10631063

1064-
impl RegionScope for @mut infer::InferCtxt {
1064+
impl RegionScope for @infer::InferCtxt {
10651065
fn anon_regions(&self,
10661066
span: Span,
10671067
count: uint) -> Result<~[ty::Region], ()> {

branches/try2/src/librustc/middle/typeck/check/vtable.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ pub struct LocationInfo {
7070
/// A vtable context includes an inference context, a crate context, and a
7171
/// callback function to call in case of type error.
7272
pub struct VtableContext<'a> {
73-
infcx: @mut infer::InferCtxt,
73+
infcx: @infer::InferCtxt,
7474
param_env: &'a ty::ParameterEnvironment,
7575
}
7676

branches/try2/src/librustc/middle/typeck/coherence.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ pub struct UniversalQuantificationResult {
5555
type_param_defs: @~[ty::TypeParameterDef]
5656
}
5757

58-
pub fn get_base_type(inference_context: @mut InferCtxt,
58+
pub fn get_base_type(inference_context: @InferCtxt,
5959
span: Span,
6060
original_type: t)
6161
-> Option<t> {
@@ -118,7 +118,7 @@ pub fn type_is_defined_in_local_crate(original_type: t) -> bool {
118118
}
119119

120120
// Returns the def ID of the base type, if there is one.
121-
pub fn get_base_type_def_id(inference_context: @mut InferCtxt,
121+
pub fn get_base_type_def_id(inference_context: @InferCtxt,
122122
span: Span,
123123
original_type: t)
124124
-> Option<DefId> {
@@ -151,7 +151,7 @@ pub fn CoherenceChecker(crate_context: @CrateCtxt) -> CoherenceChecker {
151151

152152
pub struct CoherenceChecker {
153153
crate_context: @CrateCtxt,
154-
inference_context: @mut InferCtxt,
154+
inference_context: @InferCtxt,
155155
}
156156

157157
struct CoherenceCheckVisitor { cc: CoherenceChecker }

branches/try2/src/librustc/middle/typeck/infer/combine.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ use syntax::opt_vec;
6767
use syntax::abi::AbiSet;
6868

6969
pub trait Combine {
70-
fn infcx(&self) -> @mut InferCtxt;
70+
fn infcx(&self) -> @InferCtxt;
7171
fn tag(&self) -> ~str;
7272
fn a_is_expected(&self) -> bool;
7373
fn trace(&self) -> TypeTrace;
@@ -328,7 +328,7 @@ pub trait Combine {
328328
}
329329

330330
pub struct CombineFields {
331-
infcx: @mut InferCtxt,
331+
infcx: @InferCtxt,
332332
a_is_expected: bool,
333333
trace: TypeTrace,
334334
}

branches/try2/src/librustc/middle/typeck/infer/error_reporting.rs

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -77,33 +77,33 @@ use util::ppaux::bound_region_to_str;
7777
use util::ppaux::note_and_explain_region;
7878

7979
pub trait ErrorReporting {
80-
fn report_region_errors(@mut self,
80+
fn report_region_errors(@self,
8181
errors: &OptVec<RegionResolutionError>);
8282

83-
fn report_and_explain_type_error(@mut self,
83+
fn report_and_explain_type_error(@self,
8484
trace: TypeTrace,
8585
terr: &ty::type_err);
8686

87-
fn values_str(@mut self, values: &ValuePairs) -> Option<~str>;
87+
fn values_str(@self, values: &ValuePairs) -> Option<~str>;
8888

8989
fn expected_found_str<T:UserString+Resolvable>(
90-
@mut self,
90+
@self,
9191
exp_found: &ty::expected_found<T>)
9292
-> Option<~str>;
9393

94-
fn report_concrete_failure(@mut self,
94+
fn report_concrete_failure(@self,
9595
origin: SubregionOrigin,
9696
sub: Region,
9797
sup: Region);
9898

99-
fn report_sub_sup_conflict(@mut self,
99+
fn report_sub_sup_conflict(@self,
100100
var_origin: RegionVariableOrigin,
101101
sub_origin: SubregionOrigin,
102102
sub_region: Region,
103103
sup_origin: SubregionOrigin,
104104
sup_region: Region);
105105

106-
fn report_sup_sup_conflict(@mut self,
106+
fn report_sup_sup_conflict(@self,
107107
var_origin: RegionVariableOrigin,
108108
origin1: SubregionOrigin,
109109
region1: Region,
@@ -112,15 +112,15 @@ pub trait ErrorReporting {
112112
}
113113

114114
trait ErrorReportingHelpers {
115-
fn report_inference_failure(@mut self,
115+
fn report_inference_failure(@self,
116116
var_origin: RegionVariableOrigin);
117117

118-
fn note_region_origin(@mut self,
118+
fn note_region_origin(@self,
119119
origin: SubregionOrigin);
120120
}
121121

122122
impl ErrorReporting for InferCtxt {
123-
fn report_region_errors(@mut self,
123+
fn report_region_errors(@self,
124124
errors: &OptVec<RegionResolutionError>) {
125125
for error in errors.iter() {
126126
match *error {
@@ -147,7 +147,7 @@ impl ErrorReporting for InferCtxt {
147147
}
148148
}
149149

150-
fn report_and_explain_type_error(@mut self,
150+
fn report_and_explain_type_error(@self,
151151
trace: TypeTrace,
152152
terr: &ty::type_err) {
153153
let tcx = self.tcx;
@@ -179,7 +179,7 @@ impl ErrorReporting for InferCtxt {
179179
ty::note_and_explain_type_err(self.tcx, terr);
180180
}
181181

182-
fn values_str(@mut self, values: &ValuePairs) -> Option<~str> {
182+
fn values_str(@self, values: &ValuePairs) -> Option<~str> {
183183
/*!
184184
* Returns a string of the form "expected `{}` but found `{}`",
185185
* or None if this is a derived error.
@@ -195,7 +195,7 @@ impl ErrorReporting for InferCtxt {
195195
}
196196

197197
fn expected_found_str<T:UserString+Resolvable>(
198-
@mut self,
198+
@self,
199199
exp_found: &ty::expected_found<T>)
200200
-> Option<~str>
201201
{
@@ -214,7 +214,7 @@ impl ErrorReporting for InferCtxt {
214214
found.user_string(self.tcx)))
215215
}
216216

217-
fn report_concrete_failure(@mut self,
217+
fn report_concrete_failure(@self,
218218
origin: SubregionOrigin,
219219
sub: Region,
220220
sup: Region) {
@@ -400,7 +400,7 @@ impl ErrorReporting for InferCtxt {
400400
}
401401
}
402402

403-
fn report_sub_sup_conflict(@mut self,
403+
fn report_sub_sup_conflict(@self,
404404
var_origin: RegionVariableOrigin,
405405
sub_origin: SubregionOrigin,
406406
sub_region: Region,
@@ -425,7 +425,7 @@ impl ErrorReporting for InferCtxt {
425425
self.note_region_origin(sub_origin);
426426
}
427427

428-
fn report_sup_sup_conflict(@mut self,
428+
fn report_sup_sup_conflict(@self,
429429
var_origin: RegionVariableOrigin,
430430
origin1: SubregionOrigin,
431431
region1: Region,
@@ -452,7 +452,7 @@ impl ErrorReporting for InferCtxt {
452452
}
453453

454454
impl ErrorReportingHelpers for InferCtxt {
455-
fn report_inference_failure(@mut self,
455+
fn report_inference_failure(@self,
456456
var_origin: RegionVariableOrigin) {
457457
let var_description = match var_origin {
458458
infer::MiscVariable(_) => ~"",
@@ -484,8 +484,7 @@ impl ErrorReportingHelpers for InferCtxt {
484484
var_description));
485485
}
486486

487-
fn note_region_origin(@mut self,
488-
origin: SubregionOrigin) {
487+
fn note_region_origin(@self, origin: SubregionOrigin) {
489488
match origin {
490489
infer::Subtype(ref trace) => {
491490
let desc = match trace.origin {
@@ -612,12 +611,12 @@ impl ErrorReportingHelpers for InferCtxt {
612611
}
613612

614613
trait Resolvable {
615-
fn resolve(&self, infcx: @mut InferCtxt) -> Self;
614+
fn resolve(&self, infcx: @InferCtxt) -> Self;
616615
fn contains_error(&self) -> bool;
617616
}
618617

619618
impl Resolvable for ty::t {
620-
fn resolve(&self, infcx: @mut InferCtxt) -> ty::t {
619+
fn resolve(&self, infcx: @InferCtxt) -> ty::t {
621620
infcx.resolve_type_vars_if_possible(*self)
622621
}
623622
fn contains_error(&self) -> bool {
@@ -626,7 +625,7 @@ impl Resolvable for ty::t {
626625
}
627626

628627
impl Resolvable for @ty::TraitRef {
629-
fn resolve(&self, infcx: @mut InferCtxt) -> @ty::TraitRef {
628+
fn resolve(&self, infcx: @InferCtxt) -> @ty::TraitRef {
630629
@infcx.resolve_type_vars_in_trait_ref_if_possible(*self)
631630
}
632631
fn contains_error(&self) -> bool {

branches/try2/src/librustc/middle/typeck/infer/glb.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ use util::ppaux::mt_to_str;
3030
pub struct Glb(CombineFields); // "greatest lower bound" (common subtype)
3131

3232
impl Combine for Glb {
33-
fn infcx(&self) -> @mut InferCtxt { self.infcx }
33+
fn infcx(&self) -> @InferCtxt { self.infcx }
3434
fn tag(&self) -> ~str { ~"glb" }
3535
fn a_is_expected(&self) -> bool { self.a_is_expected }
3636
fn trace(&self) -> TypeTrace { self.trace }

branches/try2/src/librustc/middle/typeck/infer/lub.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ impl Lub {
3636
}
3737

3838
impl Combine for Lub {
39-
fn infcx(&self) -> @mut InferCtxt { self.infcx }
39+
fn infcx(&self) -> @InferCtxt { self.infcx }
4040
fn tag(&self) -> ~str { ~"lub" }
4141
fn a_is_expected(&self) -> bool { self.a_is_expected }
4242
fn trace(&self) -> TypeTrace { self.trace }

0 commit comments

Comments
 (0)