Skip to content

Commit b6ac572

Browse files
committed
---
yaml --- r: 142546 b: refs/heads/try2 c: 3177e63 h: refs/heads/master v: v3
1 parent 8eff176 commit b6ac572

File tree

174 files changed

+3546
-3167
lines changed

Some content is hidden

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

174 files changed

+3546
-3167
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: ee102468fae73d086f05f027178edefec28979bc
8+
refs/heads/try2: 3177e63deedb483df68692ffb4429cc9d0a44649
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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,11 @@ endif
139139

140140
# version-string calculation
141141
CFG_GIT_DIR := $(CFG_SRC_DIR).git
142-
CFG_RELEASE = 0.8-pre
142+
CFG_RELEASE = 0.7
143143
CFG_VERSION = $(CFG_RELEASE)
144144
# windows exe's need numeric versions - don't use anything but
145145
# numbers and dots here
146-
CFG_VERSION_WIN = 0.8
146+
CFG_VERSION_WIN = 0.7
147147

148148
ifneq ($(wildcard $(CFG_GIT)),)
149149
ifneq ($(wildcard $(CFG_GIT_DIR)),)

branches/try2/doc/po4a.conf

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Add here a list of target languages; po4a will automatically
2+
# generates .po for them and build .md when translated, eg:
3+
# [po4a_langs] es fr it pt_BR
4+
[po4a_langs]
5+
[po4a_paths] doc/po/$master.pot $lang:doc/po/$lang/$master.po
6+
7+
# Add here below all source documents to be translated
8+
[type: text] doc/rust.md $lang:doc/l10n/$lang/rust.md
9+
[type: text] doc/rustpkg.md $lang:doc/l10n/$lang/rustpkg.md
10+
[type: text] doc/tutorial-container.md $lang:doc/l10n/$lang/tutorial-container.md
11+
[type: text] doc/tutorial.md $lang:doc/l10n/$lang/tutorial.md
12+
[type: text] doc/tutorial-borrowed-ptr.md $lang:doc/l10n/$lang/tutorial-borrowed-ptr.md
13+
[type: text] doc/tutorial-ffi.md $lang:doc/l10n/$lang/tutorial-ffi.md
14+
[type: text] doc/tutorial-macros.md $lang:doc/l10n/$lang/tutorial-macros.md
15+
[type: text] doc/tutorial-tasks.md $lang:doc/l10n/$lang/tutorial-tasks.md

branches/try2/doc/rust.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ The keywords are the following strings:
207207
as
208208
break
209209
copy
210-
do
210+
do drop
211211
else enum extern
212212
false fn for
213213
if impl

branches/try2/mk/docs.mk

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,3 +234,8 @@ doc/version_info.html: version_info.html.template $(MKFILE_DEPS) \
234234
GENERATED += doc/version.md doc/version_info.html
235235

236236
docs: $(DOCS)
237+
238+
docs-l10n:
239+
po4a doc/po4a.conf
240+
241+
.PHONY: docs-l10n

branches/try2/mk/tests.mk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
# The names of crates that must be tested
1717
TEST_TARGET_CRATES = std extra
18-
TEST_HOST_CRATES = syntax rustc rustdoc rust rustpkg rusti
18+
TEST_HOST_CRATES = syntax rustc rustdoc rust rustpkg
1919
TEST_CRATES = $(TEST_TARGET_CRATES) $(TEST_HOST_CRATES)
2020

2121
# Markdown files under doc/ that should have their code extracted and run
@@ -157,7 +157,6 @@ check-test: cleantestlibs cleantmptestlogs all check-stage2-rfail
157157

158158
check-lite: cleantestlibs cleantmptestlogs \
159159
check-stage2-std check-stage2-extra check-stage2-rpass \
160-
check-stage2-rustpkg check-stage2-rusti \
161160
check-stage2-rfail check-stage2-cfail
162161
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
163162

branches/try2/src/etc/kate/rust.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<!ENTITY rustIdent "[a-zA-Z_][a-zA-Z_0-9]*">
88
<!ENTITY rustIntSuf "([iu](8|16|32|64)?)?">
99
]>
10-
<language name="Rust" version="0.8-pre" kateversion="2.4" section="Sources" extensions="*.rs;*.rc" mimetype="text/x-rust" priority="15">
10+
<language name="Rust" version="0.7" kateversion="2.4" section="Sources" extensions="*.rs;*.rc" mimetype="text/x-rust" priority="15">
1111
<highlighting>
1212
<list name="fn">
1313
<item> fn </item>

branches/try2/src/etc/local_stage0.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ fi
4343

4444
cp ${PREFIX}/bin/rustc ${TARG_DIR}/stage0/bin/
4545
cp ${PREFIX}/lib/rustc/${TARG_DIR}/${LIBDIR}/* ${TARG_DIR}/stage0/${LIBDIR}/
46-
cp ${PREFIX}/lib/libextra*${LIB_SUF} ${TARG_DIR}/stage0/${LIBDIR}/
4746
cp ${PREFIX}/lib/librust*${LIB_SUF} ${TARG_DIR}/stage0/${LIBDIR}/
47+
cp ${PREFIX}/lib/libcore*${LIB_SUF} ${TARG_DIR}/stage0/${LIBDIR}/
4848
cp ${PREFIX}/lib/libstd*${LIB_SUF} ${TARG_DIR}/stage0/${LIBDIR}/
4949
cp ${PREFIX}/lib/libsyntax*${LIB_SUF} ${TARG_DIR}/stage0/${LIBDIR}/

branches/try2/src/libextra/extra.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Rust extras are part of the standard Rust distribution.
2121
*/
2222

2323
#[link(name = "extra",
24-
vers = "0.8-pre",
24+
vers = "0.7",
2525
uuid = "122bed0b-c19b-4b82-b0b7-7ae8aead7297",
2626
url = "https://github.com/mozilla/rust/tree/master/src/libextra")];
2727

@@ -40,8 +40,10 @@ pub mod uv_ll;
4040

4141
// General io and system-services modules
4242

43-
#[path = "net/mod.rs"]
4443
pub mod net;
44+
pub mod net_ip;
45+
pub mod net_tcp;
46+
pub mod net_url;
4547

4648
// libuv modules
4749
pub mod uv;
@@ -72,6 +74,7 @@ pub mod deque;
7274
pub mod fun_treemap;
7375
pub mod list;
7476
pub mod priority_queue;
77+
pub mod rope;
7578
pub mod smallintmap;
7679

7780
pub mod sort;

branches/try2/src/libextra/fileinput.rs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -418,8 +418,8 @@ mod test {
418418
fn make_file(path : &Path, contents: &[~str]) {
419419
let file = io::file_writer(path, [io::Create, io::Truncate]).get();
420420

421-
for contents.iter().advance |str| {
422-
file.write_str(*str);
421+
for contents.iter().advance |&str| {
422+
file.write_str(str);
423423
file.write_char('\n');
424424
}
425425
}
@@ -445,7 +445,7 @@ mod test {
445445
|i| fmt!("tmp/lib-fileinput-test-fileinput-read-byte-%u.tmp", i)), true);
446446
447447
// 3 files containing 0\n, 1\n, and 2\n respectively
448-
for filenames.iter().enumerate().advance |(i, filename)| {
448+
for filenames.iter().enumerate().advance |(i, &filename)| {
449449
make_file(filename.get_ref(), [fmt!("%u", i)]);
450450
}
451451
@@ -475,7 +475,7 @@ mod test {
475475
|i| fmt!("tmp/lib-fileinput-test-fileinput-read-%u.tmp", i)), true);
476476
477477
// 3 files containing 1\n, 2\n, and 3\n respectively
478-
for filenames.iter().enumerate().advance |(i, filename)| {
478+
for filenames.iter().enumerate().advance |(i, &filename)| {
479479
make_file(filename.get_ref(), [fmt!("%u", i)]);
480480
}
481481
@@ -495,11 +495,10 @@ mod test {
495495
3,
496496
|i| fmt!("tmp/lib-fileinput-test-input-vec-%u.tmp", i)), true);
497497

498-
for filenames.iter().enumerate().advance |(i, filename)| {
498+
for filenames.iter().enumerate().advance |(i, &filename)| {
499499
let contents =
500500
vec::from_fn(3, |j| fmt!("%u %u", i, j));
501501
make_file(filename.get_ref(), contents);
502-
debug!("contents=%?", contents);
503502
all_lines.push_all(contents);
504503
}
505504

@@ -516,7 +515,7 @@ mod test {
516515
3,
517516
|i| fmt!("tmp/lib-fileinput-test-input-vec-state-%u.tmp", i)),true);
518517

519-
for filenames.iter().enumerate().advance |(i, filename)| {
518+
for filenames.iter().enumerate().advance |(i, &filename)| {
520519
let contents =
521520
vec::from_fn(3, |j| fmt!("%u %u", i, j + 1));
522521
make_file(filename.get_ref(), contents);
@@ -580,10 +579,10 @@ mod test {
580579
3,
581580
|i| fmt!("tmp/lib-fileinput-test-next-file-%u.tmp", i)),true);
582581
583-
for filenames.iter().enumerate().advance |(i, filename)| {
582+
for filenames.iter().enumerate().advance |(i, &filename)| {
584583
let contents =
585584
vec::from_fn(3, |j| fmt!("%u %u", i, j + 1));
586-
make_file(filename.get_ref(), contents);
585+
make_file(&filename.get(), contents);
587586
}
588587
589588
let in = FileInput::from_vec(filenames);

branches/try2/src/libextra/getopts.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ fn name_str(nm: &Name) -> ~str {
176176
}
177177

178178
fn find_opt(opts: &[Opt], nm: Name) -> Option<uint> {
179-
opts.iter().position(|opt| opt.name == nm)
179+
opts.iter().position_(|opt| opt.name == nm)
180180
}
181181

182182
/**

branches/try2/src/libextra/json.rs

Lines changed: 9 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -481,30 +481,22 @@ pub fn to_pretty_str(json: &Json) -> ~str {
481481
io::with_str_writer(|wr| to_pretty_writer(wr, json))
482482
}
483483

484-
static BUF_SIZE : uint = 64000;
485-
486484
#[allow(missing_doc)]
487485
pub struct Parser {
488486
priv rdr: @io::Reader,
489-
priv buf: ~[char],
490-
priv buf_idx: uint,
491487
priv ch: char,
492488
priv line: uint,
493489
priv col: uint,
494490
}
495491

496492
/// Decode a json value from an io::reader
497493
pub fn Parser(rdr: @io::Reader) -> Parser {
498-
let mut p = Parser {
494+
Parser {
499495
rdr: rdr,
500-
buf: rdr.read_chars(BUF_SIZE),
501-
buf_idx: 0,
502-
ch: 0 as char,
496+
ch: rdr.read_char(),
503497
line: 1,
504-
col: 0,
505-
};
506-
p.bump();
507-
p
498+
col: 1,
499+
}
508500
}
509501

510502
impl Parser {
@@ -529,26 +521,13 @@ impl Parser {
529521
fn eof(&self) -> bool { self.ch == -1 as char }
530522

531523
fn bump(&mut self) {
532-
if self.eof() {
533-
return;
534-
}
535-
536-
self.col += 1u;
537-
538-
if self.buf_idx >= self.buf.len() {
539-
self.buf = self.rdr.read_chars(BUF_SIZE);
540-
if self.buf.len() == 0 {
541-
self.ch = -1 as char;
542-
return;
543-
}
544-
self.buf_idx = 0;
545-
}
546-
self.ch = self.buf[self.buf_idx];
547-
self.buf_idx += 1;
524+
self.ch = self.rdr.read_char();
548525

549526
if self.ch == '\n' {
550527
self.line += 1u;
551528
self.col = 1u;
529+
} else {
530+
self.col += 1u;
552531
}
553532
}
554533

@@ -971,7 +950,7 @@ impl serialize::Decoder for Decoder {
971950
}
972951
ref json => fail!("invalid variant: %?", *json),
973952
};
974-
let idx = match names.iter().position(|n| str::eq_slice(*n, name)) {
953+
let idx = match names.iter().position_(|n| str::eq_slice(*n, name)) {
975954
Some(idx) => idx,
976955
None => fail!("Unknown variant name: %?", name),
977956
};
@@ -1744,7 +1723,7 @@ mod tests {
17441723
assert_eq!(v, 0.4e-01f);
17451724
}
17461725
1747-
// FIXME: #7611: xfailed for now
1726+
#[test]
17481727
fn test_read_str() {
17491728
assert_eq!(from_str("\""),
17501729
Err(Error {line: 1u, col: 2u, msg: @~"EOF while parsing string"

branches/try2/src/libextra/net/mod.rs renamed to branches/try2/src/libextra/net.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ Top-level module for network-related functionality.
1313
1414
Basically, including this module gives you:
1515
16-
* `tcp`
17-
* `ip`
18-
* `url`
16+
* `net_tcp`
17+
* `net_ip`
18+
* `net_url`
1919
2020
See each of those three modules for documentation on what they do.
2121
*/
2222

23-
pub mod tcp;
24-
pub mod ip;
25-
pub mod url;
23+
pub use tcp = net_tcp;
24+
pub use ip = net_ip;
25+
pub use url = net_url;

branches/try2/src/libextra/net/ip.rs renamed to branches/try2/src/libextra/net_ip.rs

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,20 @@ use std::str;
2222
use iotask = uv::iotask::IoTask;
2323
use interact = uv::iotask::interact;
2424

25-
use sockaddr_in = uv_ll::sockaddr_in;
26-
use sockaddr_in6 = uv_ll::sockaddr_in6;
27-
use addrinfo = uv_ll::addrinfo;
28-
use uv_getaddrinfo_t = uv_ll::uv_getaddrinfo_t;
29-
use uv_ip4_name = uv_ll::ip4_name;
30-
use uv_ip4_port = uv_ll::ip4_port;
31-
use uv_ip6_name = uv_ll::ip6_name;
32-
use uv_ip6_port = uv_ll::ip6_port;
33-
use uv_getaddrinfo = uv_ll::getaddrinfo;
34-
use uv_freeaddrinfo = uv_ll::freeaddrinfo;
35-
use create_uv_getaddrinfo_t = uv_ll::getaddrinfo_t;
36-
use set_data_for_req = uv_ll::set_data_for_req;
37-
use get_data_for_req = uv_ll::get_data_for_req;
38-
use ll = uv_ll;
25+
use sockaddr_in = super::uv_ll::sockaddr_in;
26+
use sockaddr_in6 = super::uv_ll::sockaddr_in6;
27+
use addrinfo = super::uv_ll::addrinfo;
28+
use uv_getaddrinfo_t = super::uv_ll::uv_getaddrinfo_t;
29+
use uv_ip4_name = super::uv_ll::ip4_name;
30+
use uv_ip4_port = super::uv_ll::ip4_port;
31+
use uv_ip6_name = super::uv_ll::ip6_name;
32+
use uv_ip6_port = super::uv_ll::ip6_port;
33+
use uv_getaddrinfo = super::uv_ll::getaddrinfo;
34+
use uv_freeaddrinfo = super::uv_ll::freeaddrinfo;
35+
use create_uv_getaddrinfo_t = super::uv_ll::getaddrinfo_t;
36+
use set_data_for_req = super::uv_ll::set_data_for_req;
37+
use get_data_for_req = super::uv_ll::get_data_for_req;
38+
use ll = super::uv_ll;
3939

4040
/// An IP address
4141
pub enum IpAddr {
@@ -203,7 +203,7 @@ pub mod v4 {
203203
}).collect();
204204
if parts.len() != 4 {
205205
Err(fmt!("'%s' doesn't have 4 parts", ip))
206-
} else if parts.iter().any(|x| *x == 256u) {
206+
} else if parts.iter().any_(|x| *x == 256u) {
207207
Err(fmt!("invalid octal in addr '%s'", ip))
208208
} else {
209209
Ok(Ipv4Rep {
@@ -363,9 +363,9 @@ extern fn get_addr_cb(handle: *uv_getaddrinfo_t,
363363
#[cfg(test)]
364364
mod test {
365365

366-
use net::ip::*;
367-
use net::ip::v4;
368-
use net::ip::v6;
366+
use net_ip::*;
367+
use net_ip::v4;
368+
use net_ip::v6;
369369
use uv;
370370

371371
use std::result;

branches/try2/src/libextra/net/tcp.rs renamed to branches/try2/src/libextra/net_tcp.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
use future;
1818
use future_spawn = future::spawn;
19-
use ip = net::ip;
19+
use ip = net_ip;
2020
use uv;
2121
use uv::iotask;
2222
use uv::iotask::IoTask;

branches/try2/src/libextra/net/url.rs renamed to branches/try2/src/libextra/net_url.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ fn get_authority(rawurl: &str) ->
522522
let host_is_end_plus_one: &fn() -> bool = || {
523523
let xs = ['?', '#', '/'];
524524
end+1 == len
525-
&& !xs.iter().any(|x| *x == (rawurl[end] as char))
525+
&& !xs.iter().any_(|x| *x == (rawurl[end] as char))
526526
};
527527

528528
// finish up
@@ -800,7 +800,7 @@ fn test_get_path() {
800800
#[cfg(test)]
801801
mod tests {
802802
803-
use net::url::*;
803+
use net_url::*;
804804
805805
use std::hashmap::HashMap;
806806

0 commit comments

Comments
 (0)