Skip to content

Commit 90e4bc3

Browse files
committed
---
yaml --- r: 234971 b: refs/heads/stable c: 9b6fe6c h: refs/heads/master i: 234969: 6b1d0d9 234967: 2d472bb v: v3
1 parent 688f072 commit 90e4bc3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+357
-684
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/heads/tmp: afae2ff723393b3ab4ccffef6ac7c6d1809e2da0
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: f859507de8c410b648d934d8f5ec1c52daac971d
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: 4adcc78e00b4ae6cd37070669bc1f57111338648
32+
refs/heads/stable: 9b6fe6ca368668f3b4950c49546d3d06125b9f01
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/Makefile.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
# * tidy-basic - show file / line stats
6363
# * tidy-errors - show the highest rustc error code
6464
# * tidy-features - show the status of language and lib features
65+
# * rustc-stage$(stage) - Only build up to a specific stage
6566
#
6667
# Then mix in some of these environment variables to harness the
6768
# ultimate power of The Rust Build System.

branches/stable/src/librustc/diagnostics.rs

Lines changed: 2 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -360,40 +360,6 @@ integer type:
360360
http://doc.rust-lang.org/reference.html#ffi-attributes
361361
"##,
362362

363-
E0109: r##"
364-
You tried to give a type parameter to a type which doesn't need it. Erroneous
365-
code example:
366-
367-
```
368-
type X = u32<i32>; // error: type parameters are not allowed on this type
369-
```
370-
371-
Please check that you used the correct type and recheck its definition. Perhaps
372-
it doesn't need the type parameter.
373-
Example:
374-
375-
```
376-
type X = u32; // ok!
377-
```
378-
"##,
379-
380-
E0110: r##"
381-
You tried to give a lifetime parameter to a type which doesn't need it.
382-
Erroneous code example:
383-
384-
```
385-
type X = u32<'static>; // error: lifetime parameters are not allowed on
386-
// this type
387-
```
388-
389-
Please check that you used the correct type and recheck its definition,
390-
perhaps it doesn't need the lifetime parameter. Example:
391-
392-
```
393-
type X = u32; // ok!
394-
```
395-
"##,
396-
397363
E0133: r##"
398364
Using unsafe functionality, such as dereferencing raw pointers and calling
399365
functions via FFI or marked as unsafe, is potentially dangerous and disallowed
@@ -1089,6 +1055,8 @@ register_diagnostics! {
10891055
E0017,
10901056
E0022,
10911057
E0038,
1058+
E0109,
1059+
E0110,
10921060
E0134,
10931061
E0135,
10941062
E0136,

branches/stable/src/librustc/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@
6161
#![feature(str_match_indices)]
6262
#![feature(vec_push_all)]
6363
#![feature(wrapping)]
64-
#![feature(cell_extras)]
6564
#![cfg_attr(test, feature(test))]
6665

6766
#![allow(trivial_casts)]

branches/stable/src/librustc/middle/astencode.rs

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,7 +1027,7 @@ fn encode_side_tables_for_id(ecx: &e::EncodeContext,
10271027
})
10281028
}
10291029

1030-
if let Some(item_substs) = tcx.tables.borrow().item_substs.get(&id) {
1030+
if let Some(item_substs) = tcx.item_substs.borrow().get(&id) {
10311031
rbml_w.tag(c::tag_table_item_subst, |rbml_w| {
10321032
rbml_w.id(id);
10331033
rbml_w.emit_substs(ecx, &item_substs.substs);
@@ -1051,12 +1051,7 @@ fn encode_side_tables_for_id(ecx: &e::EncodeContext,
10511051
var_id: var_id,
10521052
closure_expr_id: id
10531053
};
1054-
let upvar_capture = tcx.tables
1055-
.borrow()
1056-
.upvar_capture_map
1057-
.get(&upvar_id)
1058-
.unwrap()
1059-
.clone();
1054+
let upvar_capture = tcx.upvar_capture_map.borrow().get(&upvar_id).unwrap().clone();
10601055
var_id.encode(rbml_w);
10611056
upvar_capture.encode(rbml_w);
10621057
})
@@ -1079,19 +1074,19 @@ fn encode_side_tables_for_id(ecx: &e::EncodeContext,
10791074
}
10801075

10811076
let method_call = MethodCall::expr(id);
1082-
if let Some(method) = tcx.tables.borrow().method_map.get(&method_call) {
1077+
if let Some(method) = tcx.method_map.borrow().get(&method_call) {
10831078
rbml_w.tag(c::tag_table_method_map, |rbml_w| {
10841079
rbml_w.id(id);
10851080
encode_method_callee(ecx, rbml_w, method_call.autoderef, method)
10861081
})
10871082
}
10881083

1089-
if let Some(adjustment) = tcx.tables.borrow().adjustments.get(&id) {
1084+
if let Some(adjustment) = tcx.adjustments.borrow().get(&id) {
10901085
match *adjustment {
10911086
ty::AdjustDerefRef(ref adj) => {
10921087
for autoderef in 0..adj.autoderefs {
10931088
let method_call = MethodCall::autoderef(id, autoderef as u32);
1094-
if let Some(method) = tcx.tables.borrow().method_map.get(&method_call) {
1089+
if let Some(method) = tcx.method_map.borrow().get(&method_call) {
10951090
rbml_w.tag(c::tag_table_method_map, |rbml_w| {
10961091
rbml_w.id(id);
10971092
encode_method_callee(ecx, rbml_w,
@@ -1109,14 +1104,14 @@ fn encode_side_tables_for_id(ecx: &e::EncodeContext,
11091104
})
11101105
}
11111106

1112-
if let Some(closure_type) = tcx.tables.borrow().closure_tys.get(&ast_util::local_def(id)) {
1107+
if let Some(closure_type) = tcx.closure_tys.borrow().get(&ast_util::local_def(id)) {
11131108
rbml_w.tag(c::tag_table_closure_tys, |rbml_w| {
11141109
rbml_w.id(id);
11151110
rbml_w.emit_closure_type(ecx, closure_type);
11161111
})
11171112
}
11181113

1119-
if let Some(closure_kind) = tcx.tables.borrow().closure_kinds.get(&ast_util::local_def(id)) {
1114+
if let Some(closure_kind) = tcx.closure_kinds.borrow().get(&ast_util::local_def(id)) {
11201115
rbml_w.tag(c::tag_table_closure_kinds, |rbml_w| {
11211116
rbml_w.id(id);
11221117
encode_closure_kind(rbml_w, *closure_kind)
@@ -1635,7 +1630,7 @@ fn decode_side_tables(dcx: &DecodeContext,
16351630
let item_substs = ty::ItemSubsts {
16361631
substs: val_dsr.read_substs(dcx)
16371632
};
1638-
dcx.tcx.tables.borrow_mut().item_substs.insert(
1633+
dcx.tcx.item_substs.borrow_mut().insert(
16391634
id, item_substs);
16401635
}
16411636
c::tag_table_freevars => {
@@ -1651,7 +1646,7 @@ fn decode_side_tables(dcx: &DecodeContext,
16511646
closure_expr_id: id
16521647
};
16531648
let ub: ty::UpvarCapture = Decodable::decode(val_dsr).unwrap();
1654-
dcx.tcx.tables.borrow_mut().upvar_capture_map.insert(upvar_id, ub.tr(dcx));
1649+
dcx.tcx.upvar_capture_map.borrow_mut().insert(upvar_id, ub.tr(dcx));
16551650
}
16561651
c::tag_table_tcache => {
16571652
let type_scheme = val_dsr.read_type_scheme(dcx);
@@ -1668,22 +1663,22 @@ fn decode_side_tables(dcx: &DecodeContext,
16681663
expr_id: id,
16691664
autoderef: autoderef
16701665
};
1671-
dcx.tcx.tables.borrow_mut().method_map.insert(method_call, method);
1666+
dcx.tcx.method_map.borrow_mut().insert(method_call, method);
16721667
}
16731668
c::tag_table_adjustments => {
16741669
let adj: ty::AutoAdjustment = val_dsr.read_auto_adjustment(dcx);
1675-
dcx.tcx.tables.borrow_mut().adjustments.insert(id, adj);
1670+
dcx.tcx.adjustments.borrow_mut().insert(id, adj);
16761671
}
16771672
c::tag_table_closure_tys => {
16781673
let closure_ty =
16791674
val_dsr.read_closure_ty(dcx);
1680-
dcx.tcx.tables.borrow_mut().closure_tys.insert(ast_util::local_def(id),
1675+
dcx.tcx.closure_tys.borrow_mut().insert(ast_util::local_def(id),
16811676
closure_ty);
16821677
}
16831678
c::tag_table_closure_kinds => {
16841679
let closure_kind =
16851680
val_dsr.read_closure_kind(dcx);
1686-
dcx.tcx.tables.borrow_mut().closure_kinds.insert(ast_util::local_def(id),
1681+
dcx.tcx.closure_kinds.borrow_mut().insert(ast_util::local_def(id),
16871682
closure_kind);
16881683
}
16891684
c::tag_table_cast_kinds => {

branches/stable/src/librustc/middle/cfg/construct.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ impl<'a, 'tcx> CFGBuilder<'a, 'tcx> {
411411
func_or_rcvr: &ast::Expr,
412412
args: I) -> CFGIndex {
413413
let method_call = ty::MethodCall::expr(call_expr.id);
414-
let fn_ty = match self.tcx.tables.borrow().method_map.get(&method_call) {
414+
let fn_ty = match self.tcx.method_map.borrow().get(&method_call) {
415415
Some(method) => method.ty,
416416
None => self.tcx.expr_ty_adjusted(func_or_rcvr)
417417
};
@@ -634,6 +634,6 @@ impl<'a, 'tcx> CFGBuilder<'a, 'tcx> {
634634

635635
fn is_method_call(&self, expr: &ast::Expr) -> bool {
636636
let method_call = ty::MethodCall::expr(expr.id);
637-
self.tcx.tables.borrow().method_map.contains_key(&method_call)
637+
self.tcx.method_map.borrow().contains_key(&method_call)
638638
}
639639
}

branches/stable/src/librustc/middle/check_const.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -283,11 +283,12 @@ impl<'a, 'tcx> CheckCrateVisitor<'a, 'tcx> {
283283

284284
fn check_static_type(&self, e: &ast::Expr) {
285285
let ty = self.tcx.node_id_to_type(e.id);
286-
let infcx = infer::new_infer_ctxt(self.tcx, &self.tcx.tables, None);
286+
let infcx = infer::new_infer_ctxt(self.tcx);
287287
let mut fulfill_cx = traits::FulfillmentContext::new(false);
288288
let cause = traits::ObligationCause::new(e.span, e.id, traits::SharedStatic);
289289
fulfill_cx.register_builtin_bound(&infcx, ty, ty::BoundSync, cause);
290-
match fulfill_cx.select_all_or_error(&infcx, &infcx.parameter_environment) {
290+
let env = self.tcx.empty_parameter_environment();
291+
match fulfill_cx.select_all_or_error(&infcx, &env) {
291292
Ok(()) => { },
292293
Err(ref errors) => {
293294
traits::report_fulfillment_errors(&infcx, errors);
@@ -543,7 +544,7 @@ fn check_expr<'a, 'tcx>(v: &mut CheckCrateVisitor<'a, 'tcx>,
543544
match e.node {
544545
ast::ExprUnary(..) |
545546
ast::ExprBinary(..) |
546-
ast::ExprIndex(..) if v.tcx.tables.borrow().method_map.contains_key(&method_call) => {
547+
ast::ExprIndex(..) if v.tcx.method_map.borrow().contains_key(&method_call) => {
547548
v.add_qualif(ConstQualif::NOT_CONST);
548549
if v.mode != Mode::Var {
549550
span_err!(v.tcx.sess, e.span, E0011,
@@ -694,7 +695,7 @@ fn check_expr<'a, 'tcx>(v: &mut CheckCrateVisitor<'a, 'tcx>,
694695
}
695696
}
696697
ast::ExprMethodCall(..) => {
697-
let method_did = match v.tcx.tables.borrow().method_map[&method_call].origin {
698+
let method_did = match v.tcx.method_map.borrow()[&method_call].origin {
698699
ty::MethodStatic(did) => Some(did),
699700
_ => None
700701
};

branches/stable/src/librustc/middle/check_match.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ impl<'a> FromIterator<Vec<&'a Pat>> for Matrix<'a> {
9898
}
9999
}
100100

101-
//NOTE: appears to be the only place other then InferCtxt to contain a ParamEnv
102101
pub struct MatchCheckCtxt<'a, 'tcx: 'a> {
103102
pub tcx: &'a ty::ctxt<'tcx>,
104103
pub param_env: ParameterEnvironment<'a, 'tcx>,

branches/stable/src/librustc/middle/const_eval.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1031,9 +1031,10 @@ fn resolve_trait_associated_const<'a, 'tcx: 'a>(tcx: &'a ty::ctxt<'tcx>,
10311031
substs: trait_substs });
10321032

10331033
tcx.populate_implementations_for_trait_if_necessary(trait_ref.def_id());
1034-
let infcx = infer::new_infer_ctxt(tcx, &tcx.tables, None);
1034+
let infcx = infer::new_infer_ctxt(tcx);
10351035

1036-
let mut selcx = traits::SelectionContext::new(&infcx, &infcx.parameter_environment);
1036+
let param_env = tcx.empty_parameter_environment();
1037+
let mut selcx = traits::SelectionContext::new(&infcx, &param_env);
10371038
let obligation = traits::Obligation::new(traits::ObligationCause::dummy(),
10381039
trait_ref.to_poly_trait_predicate());
10391040
let selection = match selcx.select(&obligation) {

branches/stable/src/librustc/middle/dead.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ impl<'a, 'tcx> MarkSymbolVisitor<'a, 'tcx> {
9696
fn lookup_and_handle_method(&mut self, id: ast::NodeId,
9797
span: codemap::Span) {
9898
let method_call = ty::MethodCall::expr(id);
99-
match self.tcx.tables.borrow().method_map.get(&method_call) {
99+
match self.tcx.method_map.borrow().get(&method_call) {
100100
Some(method) => {
101101
match method.origin {
102102
ty::MethodStatic(def_id) => {

branches/stable/src/librustc/middle/effect.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ impl<'a, 'tcx, 'v> Visitor<'v> for EffectCheckVisitor<'a, 'tcx> {
140140
match expr.node {
141141
ast::ExprMethodCall(_, _, _) => {
142142
let method_call = MethodCall::expr(expr.id);
143-
let base_type = self.tcx.tables.borrow().method_map.get(&method_call).unwrap().ty;
143+
let base_type = self.tcx.method_map.borrow().get(&method_call).unwrap().ty;
144144
debug!("effect: method call case, base type is {:?}",
145145
base_type);
146146
if type_is_unsafe_function(base_type) {

branches/stable/src/librustc/middle/expr_use_visitor.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -257,9 +257,8 @@ impl OverloadedCallType {
257257
fn from_closure(tcx: &ty::ctxt, closure_did: ast::DefId)
258258
-> OverloadedCallType {
259259
let trait_did =
260-
tcx.tables
260+
tcx.closure_kinds
261261
.borrow()
262-
.closure_kinds
263262
.get(&closure_did)
264263
.expect("OverloadedCallType::from_closure: didn't find closure id")
265264
.trait_did(tcx);
@@ -788,10 +787,8 @@ impl<'d,'t,'tcx,TYPER:mc::Typer<'tcx>> ExprUseVisitor<'d,'t,'tcx,TYPER> {
788787
// process.
789788
fn walk_adjustment(&mut self, expr: &ast::Expr) {
790789
let typer = self.typer;
791-
//NOTE(@jroesch): mixed RefCell borrow causes crash
792-
let adj = typer.adjustments().get(&expr.id).map(|x| x.clone());
793-
if let Some(adjustment) = adj {
794-
match adjustment {
790+
if let Some(adjustment) = typer.adjustments().borrow().get(&expr.id) {
791+
match *adjustment {
795792
ty::AdjustReifyFnPointer |
796793
ty::AdjustUnsafeFnPointer => {
797794
// Creating a closure/fn-pointer or unsizing consumes

0 commit comments

Comments
 (0)