Skip to content

Commit deb4df9

Browse files
committed
---
yaml --- r: 161053 b: refs/heads/try c: 6f422c4 h: refs/heads/master i: 161051: 364a758 v: v3
1 parent 194307f commit deb4df9

File tree

139 files changed

+2061
-3998
lines changed

Some content is hidden

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

139 files changed

+2061
-3998
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 4eb72d268f337a8f117c86a2ac1b98336cab9e9d
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: c9f6d696420107f82304b992cf623b806995fe18
5-
refs/heads/try: c8d6e3b2c2a780eff92299da5d1c02e081617088
5+
refs/heads/try: 6f422c4c05f4d108ba6429a174aa0c2ef3b183fa
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
88
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try/src/doc/reference.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2513,6 +2513,11 @@ The currently implemented features of the reference compiler are:
25132513
closure as `once` is unlikely to be supported going forward. So
25142514
they are hidden behind this feature until they are to be removed.
25152515

2516+
* `overloaded_calls` - Allow implementing the `Fn*` family of traits on user
2517+
types, allowing overloading the call operator (`()`).
2518+
This feature may still undergo changes before being
2519+
stabilized.
2520+
25162521
* `phase` - Usage of the `#[phase]` attribute allows loading compiler plugins
25172522
for custom lints or syntax extensions. The implementation is
25182523
considered unwholesome and in need of overhaul, and it is not clear
@@ -2555,8 +2560,11 @@ The currently implemented features of the reference compiler are:
25552560
* `trace_macros` - Allows use of the `trace_macros` macro, which is a nasty
25562561
hack that will certainly be removed.
25572562

2558-
* `unboxed_closures` - Rust's new closure design, which is currently a work in
2559-
progress feature with many known bugs.
2563+
* `unboxed_closure_sugar` - Allows using `|Foo| -> Bar` as a trait bound
2564+
meaning one of the `Fn` traits. Still
2565+
experimental.
2566+
2567+
* `unboxed_closures` - A work in progress feature with many known bugs.
25602568

25612569
* `unsafe_destructor` - Allows use of the `#[unsafe_destructor]` attribute,
25622570
which is considered wildly unsafe and will be

branches/try/src/librustc/diagnostics.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,5 @@ register_diagnostics!(
144144
E0165,
145145
E0166,
146146
E0167,
147-
E0168,
148-
E0169
147+
E0168
149148
)

branches/try/src/librustc/metadata/filesearch.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ pub fn rust_path() -> Vec<Path> {
219219
}
220220
None => Vec::new()
221221
};
222-
let mut cwd = os::getcwd();
222+
let mut cwd = os::getcwd().unwrap();
223223
// now add in default entries
224224
let cwd_dot_rust = cwd.join(".rust");
225225
if !env_rust_path.contains(&cwd_dot_rust) {

branches/try/src/librustc/metadata/tydecode.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ fn parse_region(st: &mut PState, conv: conv_did) -> ty::Region {
294294
match next(st) {
295295
'b' => {
296296
assert_eq!(next(st), '[');
297-
let id = ty::DebruijnIndex::new(parse_uint(st));
297+
let id = parse_uint(st) as ast::NodeId;
298298
assert_eq!(next(st), '|');
299299
let br = parse_bound_region(st, |x,y| conv(x,y));
300300
assert_eq!(next(st), ']');
@@ -579,6 +579,8 @@ fn parse_bare_fn_ty(st: &mut PState, conv: conv_did) -> ty::BareFnTy {
579579

580580
fn parse_sig(st: &mut PState, conv: conv_did) -> ty::FnSig {
581581
assert_eq!(next(st), '[');
582+
let id = parse_uint(st) as ast::NodeId;
583+
assert_eq!(next(st), '|');
582584
let mut inputs = Vec::new();
583585
while peek(st) != ']' {
584586
inputs.push(parse_ty(st, |x,y| conv(x,y)));
@@ -596,7 +598,8 @@ fn parse_sig(st: &mut PState, conv: conv_did) -> ty::FnSig {
596598
}
597599
_ => ty::FnConverging(parse_ty(st, |x,y| conv(x,y)))
598600
};
599-
ty::FnSig {inputs: inputs,
601+
ty::FnSig {binder_id: id,
602+
inputs: inputs,
600603
output: output,
601604
variadic: variadic}
602605
}

branches/try/src/librustc/metadata/tyencode.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ fn enc_region_substs(w: &mut SeekableMemWriter, cx: &ctxt, substs: &subst::Regio
130130
pub fn enc_region(w: &mut SeekableMemWriter, cx: &ctxt, r: ty::Region) {
131131
match r {
132132
ty::ReLateBound(id, br) => {
133-
mywrite!(w, "b[{}|", id.depth);
133+
mywrite!(w, "b[{}|", id);
134134
enc_bound_region(w, cx, br);
135135
mywrite!(w, "]");
136136
}
@@ -331,7 +331,7 @@ pub fn enc_closure_ty(w: &mut SeekableMemWriter, cx: &ctxt, ft: &ty::ClosureTy)
331331
}
332332

333333
fn enc_fn_sig(w: &mut SeekableMemWriter, cx: &ctxt, fsig: &ty::FnSig) {
334-
mywrite!(w, "[");
334+
mywrite!(w, "[{}|", fsig.binder_id);
335335
for ty in fsig.inputs.iter() {
336336
enc_ty(w, cx, *ty);
337337
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -483,8 +483,8 @@ impl tr for def::Def {
483483
impl tr for ty::Region {
484484
fn tr(&self, dcx: &DecodeContext) -> ty::Region {
485485
match *self {
486-
ty::ReLateBound(debruijn, br) => {
487-
ty::ReLateBound(debruijn, br.tr(dcx))
486+
ty::ReLateBound(id, br) => {
487+
ty::ReLateBound(dcx.tr_id(id), br.tr(dcx))
488488
}
489489
ty::ReEarlyBound(id, space, index, ident) => {
490490
ty::ReEarlyBound(dcx.tr_id(id), space, index, ident)

branches/try/src/librustc/middle/borrowck/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ pub type LoanDataFlow<'a, 'tcx> = DataFlowContext<'a, 'tcx, LoanDataFlowOperator
6565

6666
impl<'a, 'tcx, 'v> Visitor<'v> for BorrowckCtxt<'a, 'tcx> {
6767
fn visit_fn(&mut self, fk: FnKind<'v>, fd: &'v FnDecl,
68-
b: &'v Block, s: Span, id: ast::NodeId) {
69-
borrowck_fn(self, fk, fd, b, s, id);
68+
b: &'v Block, s: Span, n: NodeId) {
69+
borrowck_fn(self, fk, fd, b, s, n);
7070
}
7171

7272
fn visit_item(&mut self, item: &ast::Item) {

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ impl<'a, 'tcx, 'v> Visitor<'v> for MatchCheckCtxt<'a, 'tcx> {
139139
check_local(self, l);
140140
}
141141
fn visit_fn(&mut self, fk: FnKind<'v>, fd: &'v FnDecl,
142-
b: &'v Block, s: Span, n: NodeId) {
143-
check_fn(self, fk, fd, b, s, n);
142+
b: &'v Block, s: Span, _: NodeId) {
143+
check_fn(self, fk, fd, b, s);
144144
}
145145
}
146146

@@ -920,8 +920,7 @@ fn check_fn(cx: &mut MatchCheckCtxt,
920920
kind: FnKind,
921921
decl: &FnDecl,
922922
body: &Block,
923-
sp: Span,
924-
_: NodeId) {
923+
sp: Span) {
925924
visit::walk_fn(cx, kind, decl, body, sp);
926925
for input in decl.inputs.iter() {
927926
is_refutable(cx, &*input.pat, |pat| {

branches/try/src/librustc/middle/liveness.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,9 @@ fn live_node_kind_to_string(lnk: LiveNodeKind, cx: &ty::ctxt) -> String {
187187
}
188188

189189
impl<'a, 'tcx, 'v> Visitor<'v> for IrMaps<'a, 'tcx> {
190-
fn visit_fn(&mut self, fk: FnKind<'v>, fd: &'v FnDecl, b: &'v Block, s: Span, id: ast::NodeId) {
191-
visit_fn(self, fk, fd, b, s, id);
190+
fn visit_fn(&mut self, fk: FnKind<'v>, fd: &'v FnDecl,
191+
b: &'v Block, s: Span, n: NodeId) {
192+
visit_fn(self, fk, fd, b, s, n);
192193
}
193194
fn visit_local(&mut self, l: &ast::Local) { visit_local(self, l); }
194195
fn visit_expr(&mut self, ex: &Expr) { visit_expr(self, ex); }
@@ -373,8 +374,9 @@ fn visit_fn(ir: &mut IrMaps,
373374
decl: &FnDecl,
374375
body: &Block,
375376
sp: Span,
376-
id: ast::NodeId) {
377-
debug!("visit_fn");
377+
id: NodeId) {
378+
debug!("visit_fn: id={}", id);
379+
let _i = ::util::common::indenter();
378380

379381
// swap in a new set of IR maps for this function body:
380382
let mut fn_maps = IrMaps::new(ir.tcx);

branches/try/src/librustc/middle/resolve.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5038,10 +5038,10 @@ impl<'a> Resolver<'a> {
50385038
visit::walk_ty(self, ty);
50395039
}
50405040

5041-
TyPolyTraitRef(ref bounds) => {
5042-
self.resolve_type_parameter_bounds(
5041+
TyPolyTraitRef(ref poly_trait_ref) => {
5042+
self.resolve_poly_trait_reference(
50435043
ty.id,
5044-
bounds,
5044+
&**poly_trait_ref,
50455045
TraitObject);
50465046
visit::walk_ty(self, ty);
50475047
}

0 commit comments

Comments
 (0)