Skip to content

Commit 36160b7

Browse files
---
yaml --- r: 149367 b: refs/heads/try2 c: 5611463 h: refs/heads/master i: 149365: 9381265 149363: 716a372 149359: 1479abd v: v3
1 parent fb720fc commit 36160b7

Some content is hidden

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

44 files changed

+304
-1350
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: ace204a74548947914d08a7feca694941106175d
8+
refs/heads/try2: 56114633e88ecb6621ffdd9d69ec0efc32140c60
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/Makefile.in

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,13 @@
1919
#
2020
# First, start with one of these build targets:
2121
#
22-
# * all - The default. Build a complete, bootstrapped compiler.
22+
# * all - The default. Builds a complete, bootstrapped compiler.
2323
# `rustc` will be in `${target-triple}/stage2/bin/`. Run it
2424
# directly from the build directory if you like. This also
2525
# comes with docs in `doc/`.
2626
#
2727
# * check - Run the complete test suite
2828
#
29-
# * clean - Clean the build repertory. It is advised to run this
30-
# command if you want to build Rust again, after an update
31-
# of the git repository.
32-
#
3329
# * install - Install Rust. Note that installation is not necessary
3430
# to use the compiler.
3531
#
@@ -107,7 +103,7 @@
107103
#
108104
# </tips>
109105
#
110-
# <nitty-gritty>
106+
# <nittygritty>
111107
#
112108
# # The Rust Build System
113109
#
@@ -156,12 +152,12 @@
156152
# libraries are managed and versioned without polluting the common
157153
# areas of the filesystem.
158154
#
159-
# General rust binaries may still live in the host bin directory; they
155+
# General rust binaries may stil live in the host bin directory; they
160156
# will just link against the libraries in the target lib directory.
161157
#
162158
# Admittedly this is a little convoluted.
163159
#
164-
# </nitty-gritty>
160+
# </nittygritty>
165161
#
166162

167163
######################################################################

branches/try2/mk/main.mk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -446,13 +446,13 @@ all: $(ALL_TARGET_RULES) $(GENERATED) docs
446446
# $(1) is the name of the doc <section> in Makefile.in
447447
# pick everything between tags | remove first line | remove last line
448448
# | remove extra (?) line | strip leading `#` from lines
449-
SHOW_DOCS = $(Q)awk '/<$(1)>/,/<\/$(1)>/' $(S)/Makefile.in | sed '1d' | sed '$$d' | sed 's/^\# \?//'
449+
SHOW_DOCS = $(Q)awk '/$(1)/,/<\/$(1)>/' $(S)/Makefile.in | sed '1d' | sed '$$d' | sed 's/^\# \?//'
450450

451451
help:
452452
$(call SHOW_DOCS,help)
453453

454-
tips:
455-
$(call SHOW_DOCS,tips)
454+
hot-tips:
455+
$(call SHOW_DOCS,hottips)
456456

457457
nitty-gritty:
458-
$(call SHOW_DOCS,nitty-gritty)
458+
$(call SHOW_DOCS,nittygritty)

branches/try2/src/compiler-rt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Subproject commit f4b221571ce6f05714c1f1c6fa48f1393499989c
1+
Subproject commit d4606f1818dd8dfeaa3e509cd1cbac4482c3513e

branches/try2/src/doc/tutorial.md

Lines changed: 39 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1750,24 +1750,6 @@ closures, but they also own them: that is, no other code can access
17501750
them. Owned closures are used in concurrent code, particularly
17511751
for spawning [tasks][tasks].
17521752
1753-
Closures can be used to spawn tasks.
1754-
A practical example of this pattern is found when using the `spawn` function,
1755-
which starts a new task.
1756-
1757-
~~~~
1758-
use std::task::spawn;
1759-
1760-
// proc is the closure which will be spawned.
1761-
spawn(proc() {
1762-
debug!("I'm a new task")
1763-
});
1764-
~~~~
1765-
1766-
> ***Note:*** If you want to see the output of `debug!` statements, you will need to turn on
1767-
> `debug!` logging. To enable `debug!` logging, set the RUST_LOG environment
1768-
> variable to the name of your crate, which, for a file named `foo.rs`, will be
1769-
> `foo` (e.g., with bash, `export RUST_LOG=foo`).
1770-
17711753
## Closure compatibility
17721754
17731755
Rust closures have a convenient subtyping property: you can pass any kind of
@@ -1789,6 +1771,45 @@ call_twice(function);
17891771
> in small ways. At the moment they can be unsound in some
17901772
> scenarios, particularly with non-copyable types.
17911773
1774+
## Do syntax
1775+
1776+
The `do` expression makes it easier to call functions that take procedures
1777+
as arguments.
1778+
1779+
Consider this function that takes a procedure:
1780+
1781+
~~~~
1782+
fn call_it(op: proc(v: int)) {
1783+
op(10)
1784+
}
1785+
~~~~
1786+
1787+
As a caller, if we use a closure to provide the final operator
1788+
argument, we can write it in a way that has a pleasant, block-like
1789+
structure.
1790+
1791+
~~~~
1792+
# fn call_it(op: proc(v: int)) { }
1793+
call_it(proc(n) {
1794+
println!("{}", n);
1795+
});
1796+
~~~~
1797+
1798+
A practical example of this pattern is found when using the `spawn` function,
1799+
which starts a new task.
1800+
1801+
~~~~
1802+
use std::task::spawn;
1803+
spawn(proc() {
1804+
debug!("I'm a new task")
1805+
});
1806+
~~~~
1807+
1808+
If you want to see the output of `debug!` statements, you will need to turn on
1809+
`debug!` logging. To enable `debug!` logging, set the RUST_LOG environment
1810+
variable to the name of your crate, which, for a file named `foo.rs`, will be
1811+
`foo` (e.g., with bash, `export RUST_LOG=foo`).
1812+
17921813
# Methods
17931814
17941815
Methods are like functions except that they always begin with a special argument,

branches/try2/src/libextra/json.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ the code for these traits: `#[deriving(Decodable, Encodable)]`
5959
To encode using Encodable :
6060
6161
```rust
62-
extern crate extra;
6362
extern crate serialize;
6463
use extra::json;
6564
use std::io;
@@ -99,7 +98,6 @@ A basic `ToJson` example using a TreeMap of attribute name / attribute value:
9998
10099
101100
```rust
102-
extern crate extra;
103101
extern crate collections;
104102
105103
use extra::json;
@@ -130,7 +128,6 @@ fn main() {
130128
To decode a JSON string using `Decodable` trait :
131129
132130
```rust
133-
extern crate extra;
134131
extern crate serialize;
135132
use serialize::Decodable;
136133
@@ -157,7 +154,6 @@ Create a struct called TestStruct1 and serialize and deserialize it to and from
157154
using the serialization API, using the derived serialization code.
158155
159156
```rust
160-
extern crate extra;
161157
extern crate serialize;
162158
use extra::json;
163159
use serialize::{Encodable, Decodable};
@@ -190,7 +186,6 @@ This example use the ToJson impl to deserialize the JSON string.
190186
Example of `ToJson` trait implementation for TestStruct1.
191187
192188
```rust
193-
extern crate extra;
194189
extern crate serialize;
195190
extern crate collections;
196191

branches/try2/src/libnative/io/file.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -571,9 +571,7 @@ pub fn readdir(p: &CString) -> IoResult<~[Path]> {
571571
else {
572572
let fp_vec = vec::from_buf(
573573
fp_buf, wcslen(fp_buf) as uint);
574-
let fp_trimmed = str::truncate_utf16_at_nul(fp_vec);
575-
let fp_str = str::from_utf16(fp_trimmed)
576-
.expect("rust_list_dir_wfd_fp_buf returned invalid UTF-16");
574+
let fp_str = str::from_utf16(fp_vec);
577575
paths.push(Path::new(fp_str));
578576
}
579577
more_files = FindNextFileW(find_handle, wfd_ptr as HANDLE);

0 commit comments

Comments
 (0)