Skip to content

Commit 37978a2

Browse files
committed
---
yaml --- r: 67015 b: refs/heads/master c: 93fa7a4 h: refs/heads/master i: 67013: b590b95 67011: 12b07d2 67007: e888bd1 v: v3
1 parent cea0e51 commit 37978a2

File tree

10 files changed

+195
-115
lines changed

10 files changed

+195
-115
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 874eb1939b2adeef7c9e7181d3b839948ab3cfe7
2+
refs/heads/master: 93fa7a4b09d755e1dba3a71f56b3dc34d900776f
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 18e3db7392d2d0697b7e27d6d986139960144d85
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9

trunk/doc/tutorial.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ supported build environments that are most likely to work.
8484
> know.
8585
8686
[bug-3319]: https://github.com/mozilla/rust/issues/3319
87-
[wiki-start]: https://github.com/mozilla/rust/wiki/Note-getting-started-developing-Rust
87+
[wiki-start]: https://github.com/mozilla/rust/wiki/Note-getting-started-developing-Rust
8888

8989
To build from source you will also need the following prerequisite
9090
packages:
@@ -118,6 +118,7 @@ API-documentation tool; `rustpkg`, the Rust package manager;
118118
`rusti`, the Rust REPL; and `rust`, a tool which acts both as a unified
119119
interface for them, and for a few common command line scenarios.
120120

121+
[wiki-start]: https://github.com/mozilla/rust/wiki/Note-getting-started-developing-Rust
121122
[tarball]: http://static.rust-lang.org/dist/rust-0.7.tar.gz
122123
[win-exe]: http://static.rust-lang.org/dist/rust-0.7-install.exe
123124

@@ -409,6 +410,8 @@ println(fmt!("what is this thing: %?", mystery_object));
409410

410411
You can define your own syntax extensions with the macro system. For details, see the [macro tutorial][macros].
411412

413+
[macros]: tutorial-macros.html
414+
412415
# Control structures
413416

414417
## Conditionals
@@ -1514,6 +1517,8 @@ closures, but they also own them: that is, no other code can access
15141517
them. Owned closures are used in concurrent code, particularly
15151518
for spawning [tasks][tasks].
15161519

1520+
[tasks]: tutorial-tasks.html
1521+
15171522
## Closure compatibility
15181523

15191524
Rust closures have a convenient subtyping property: you can pass any kind of
@@ -2538,4 +2543,9 @@ There is further documentation on the [wiki].
25382543
[ffi]: tutorial-ffi.html
25392544

25402545
[wiki]: https://github.com/mozilla/rust/wiki/Docs
2546+
[unit testing]: https://github.com/mozilla/rust/wiki/Doc-unit-testing
2547+
[rustdoc]: https://github.com/mozilla/rust/wiki/Doc-using-rustdoc
2548+
[cargo]: https://github.com/mozilla/rust/wiki/Doc-using-cargo-to-manage-packages
2549+
[attributes]: https://github.com/mozilla/rust/wiki/Doc-attributes
25412550

2551+
[pound-rust]: http://chat.mibbit.com/?server=irc.mozilla.org&channel=%23rust

trunk/src/libextra/json.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1086,8 +1086,9 @@ impl serialize::Decoder for Decoder {
10861086
debug!("read_map()");
10871087
let len = match self.stack.pop() {
10881088
Object(obj) => {
1089+
let mut obj = obj;
10891090
let len = obj.len();
1090-
for obj.consume().advance |(key, value)| {
1091+
do obj.consume |key, value| {
10911092
self.stack.push(value);
10921093
self.stack.push(String(key));
10931094
}

trunk/src/librustc/middle/borrowck/check_loans.rs

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,11 @@ use syntax::codemap::span;
3131
use syntax::visit;
3232
use util::ppaux::Repr;
3333

34+
#[deriving(Clone)]
3435
struct CheckLoanCtxt<'self> {
3536
bccx: @BorrowckCtxt,
3637
dfcx_loans: &'self LoanDataFlow,
37-
move_data: move_data::FlowedMoveData,
38+
move_data: @move_data::FlowedMoveData,
3839
all_loans: &'self [Loan],
3940
reported: @mut HashSet<ast::node_id>,
4041
}
@@ -46,10 +47,10 @@ pub fn check_loans(bccx: @BorrowckCtxt,
4647
body: &ast::blk) {
4748
debug!("check_loans(body id=%?)", body.id);
4849

49-
let clcx = @mut CheckLoanCtxt {
50+
let clcx = CheckLoanCtxt {
5051
bccx: bccx,
5152
dfcx_loans: dfcx_loans,
52-
move_data: move_data,
53+
move_data: @move_data,
5354
all_loans: all_loans,
5455
reported: @mut HashSet::new(),
5556
};
@@ -139,7 +140,7 @@ impl<'self> CheckLoanCtxt<'self> {
139140
return result;
140141
}
141142

142-
pub fn check_for_conflicting_loans(&mut self, scope_id: ast::node_id) {
143+
pub fn check_for_conflicting_loans(&self, scope_id: ast::node_id) {
143144
//! Checks to see whether any of the loans that are issued
144145
//! by `scope_id` conflict with loans that have already been
145146
//! issued when we enter `scope_id` (for example, we do not
@@ -596,7 +597,7 @@ impl<'self> CheckLoanCtxt<'self> {
596597
MoveOk
597598
}
598599

599-
pub fn check_call(&mut self,
600+
pub fn check_call(&self,
600601
_expr: @ast::expr,
601602
_callee: Option<@ast::expr>,
602603
_callee_id: ast::node_id,
@@ -617,8 +618,8 @@ fn check_loans_in_fn<'a>(fk: &visit::fn_kind,
617618
body: &ast::blk,
618619
sp: span,
619620
id: ast::node_id,
620-
(this, visitor): (@mut CheckLoanCtxt<'a>,
621-
visit::vt<@mut CheckLoanCtxt<'a>>)) {
621+
(this, visitor): (CheckLoanCtxt<'a>,
622+
visit::vt<CheckLoanCtxt<'a>>)) {
622623
match *fk {
623624
visit::fk_item_fn(*) |
624625
visit::fk_method(*) => {
@@ -634,7 +635,7 @@ fn check_loans_in_fn<'a>(fk: &visit::fn_kind,
634635

635636
visit::visit_fn(fk, decl, body, sp, id, (this, visitor));
636637

637-
fn check_captured_variables(this: @mut CheckLoanCtxt,
638+
fn check_captured_variables(this: CheckLoanCtxt,
638639
closure_id: ast::node_id,
639640
span: span) {
640641
let cap_vars = this.bccx.capture_map.get(&closure_id);
@@ -652,7 +653,7 @@ fn check_loans_in_fn<'a>(fk: &visit::fn_kind,
652653
}
653654
return;
654655

655-
fn check_by_move_capture(this: @mut CheckLoanCtxt,
656+
fn check_by_move_capture(this: CheckLoanCtxt,
656657
closure_id: ast::node_id,
657658
cap_var: &moves::CaptureVar,
658659
move_path: @LoanPath) {
@@ -676,14 +677,14 @@ fn check_loans_in_fn<'a>(fk: &visit::fn_kind,
676677
}
677678

678679
fn check_loans_in_local<'a>(local: @ast::local,
679-
(this, vt): (@mut CheckLoanCtxt<'a>,
680-
visit::vt<@mut CheckLoanCtxt<'a>>)) {
680+
(this, vt): (CheckLoanCtxt<'a>,
681+
visit::vt<CheckLoanCtxt<'a>>)) {
681682
visit::visit_local(local, (this, vt));
682683
}
683684

684685
fn check_loans_in_expr<'a>(expr: @ast::expr,
685-
(this, vt): (@mut CheckLoanCtxt<'a>,
686-
visit::vt<@mut CheckLoanCtxt<'a>>)) {
686+
(this, vt): (CheckLoanCtxt<'a>,
687+
visit::vt<CheckLoanCtxt<'a>>)) {
687688
visit::visit_expr(expr, (this, vt));
688689

689690
debug!("check_loans_in_expr(expr=%s)",
@@ -736,17 +737,17 @@ fn check_loans_in_expr<'a>(expr: @ast::expr,
736737
}
737738

738739
fn check_loans_in_pat<'a>(pat: @ast::pat,
739-
(this, vt): (@mut CheckLoanCtxt<'a>,
740-
visit::vt<@mut CheckLoanCtxt<'a>>))
740+
(this, vt): (CheckLoanCtxt<'a>,
741+
visit::vt<CheckLoanCtxt<'a>>))
741742
{
742743
this.check_for_conflicting_loans(pat.id);
743744
this.check_move_out_from_id(pat.id, pat.span);
744745
visit::visit_pat(pat, (this, vt));
745746
}
746747

747748
fn check_loans_in_block<'a>(blk: &ast::blk,
748-
(this, vt): (@mut CheckLoanCtxt<'a>,
749-
visit::vt<@mut CheckLoanCtxt<'a>>))
749+
(this, vt): (CheckLoanCtxt<'a>,
750+
visit::vt<CheckLoanCtxt<'a>>))
750751
{
751752
visit::visit_block(blk, (this, vt));
752753
this.check_for_conflicting_loans(blk.id);

0 commit comments

Comments
 (0)