Skip to content

Commit a90d962

Browse files
committed
---
yaml --- r: 107615 b: refs/heads/dist-snap c: b3290d3 h: refs/heads/master i: 107613: 1a07beb 107611: 5b0cc12 107607: 0947fac 107599: 961d2e6 107583: 18d954d v: v3
1 parent 6ad94f5 commit a90d962

File tree

182 files changed

+2486
-3122
lines changed

Some content is hidden

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

182 files changed

+2486
-3122
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: f64fdf524a434f0e5cd0bc91d09c144723f3c90d
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: bf9c25562da1c0e768309693617e54e998a953d1
9+
refs/heads/dist-snap: b3290d322e32a1110fd31e9a9ecd246252c1c67c
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/Makefile.in

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,11 @@ endif
124124
ifdef TRACE
125125
CFG_RUSTC_FLAGS += -Z trace
126126
endif
127+
ifndef DEBUG_BORROWS
128+
RUSTFLAGS_STAGE0 += -Z no-debug-borrows
129+
RUSTFLAGS_STAGE1 += -Z no-debug-borrows
130+
RUSTFLAGS_STAGE2 += -Z no-debug-borrows
131+
endif
127132

128133
# The executables crated during this compilation process have no need to include
129134
# static copies of libstd and libextra. We also generate dynamic versions of all
@@ -367,7 +372,7 @@ LLVM_COMPONENTS=x86 arm mips ipo bitreader bitwriter linker asmparser jit mcjit
367372
interpreter instrumentation
368373

369374
# Only build these LLVM tools
370-
LLVM_TOOLS=bugpoint llc llvm-ar llvm-as llvm-dis llvm-mc opt llvm-extract
375+
LLVM_TOOLS=bugpoint llc llvm-ar llvm-as llvm-dis llvm-mc opt
371376

372377
define DEF_LLVM_VARS
373378
# The configure script defines these variables with the target triples

branches/dist-snap/doc/guide-container.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -336,8 +336,8 @@ The `DoubleEndedIterator` trait represents an iterator able to yield elements
336336
from either end of a range. It inherits from the `Iterator` trait and extends
337337
it with the `next_back` function.
338338

339-
A `DoubleEndedIterator` can have its direction changed with the `rev` adaptor,
340-
returning another `DoubleEndedIterator` with `next` and `next_back` exchanged.
339+
A `DoubleEndedIterator` can be flipped with the `invert` adaptor, returning
340+
another `DoubleEndedIterator` with `next` and `next_back` exchanged.
341341

342342
~~~
343343
let xs = [1, 2, 3, 4, 5, 6];
@@ -347,7 +347,7 @@ println!("{:?}", it.next()); // prints `Some(&2)`
347347
println!("{:?}", it.next_back()); // prints `Some(&6)`
348348
349349
// prints `5`, `4` and `3`
350-
for &x in it.rev() {
350+
for &x in it.invert() {
351351
println!("{}", x)
352352
}
353353
~~~
@@ -366,7 +366,7 @@ let mut it = xs.iter().chain(ys.iter()).map(|&x| x * 2);
366366
println!("{:?}", it.next()); // prints `Some(2)`
367367
368368
// prints `16`, `14`, `12`, `10`, `8`, `6`, `4`
369-
for x in it.rev() {
369+
for x in it.invert() {
370370
println!("{}", x);
371371
}
372372
~~~

branches/dist-snap/doc/guide-ffi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ impl<T: Send> Drop for Unique<T> {
230230
// We need to move the object out of the box, so that
231231
// the destructor is called (at the end of this scope.)
232232
ptr::replace_ptr(self.ptr, x);
233-
free(self.ptr as *mut c_void)
233+
free(self.ptr as *c_void)
234234
}
235235
}
236236
}

branches/dist-snap/doc/tutorial.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3071,8 +3071,7 @@ The effect it has on your module hierarchy mirrors aspects of both `mod` and `us
30713071
The linkage information the binary needs to use the library `foo`.
30723072

30733073
- But like `use`, all `extern mod` statements that refer to the same library are interchangeable,
3074-
as each one really just presents an alias to an external module (the crate root of the library
3075-
you're linking against).
3074+
as each one really just presents an alias to an external module (the crate root of the library your linking against).
30763075

30773076
Remember how `use`-statements have to go before local declarations because the latter shadows the former?
30783077
Well, `extern mod` statements also have their own rules in that regard:

branches/dist-snap/man/rustc.1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ To build an executable from a source file with a main function:
122122
To build a library from a source file:
123123
$ rustc --lib hello-lib.rs
124124

125-
To build either with a crate (.rs) file:
126-
$ rustc hello.rs
125+
To build either with a crate (.rc) file:
126+
$ rustc hello.rc
127127

128128
To build an executable with debug info (experimental):
129129
$ rustc -Z debug-info -o hello hello.rs

branches/dist-snap/src/compiletest/header.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,10 @@ fn parse_exec_env(line: &str) -> Option<(~str, ~str)> {
159159
let mut strs: ~[~str] = nv.splitn('=', 1).map(|s| s.to_owned()).collect();
160160

161161
match strs.len() {
162-
1u => (strs.pop().unwrap(), ~""),
162+
1u => (strs.pop(), ~""),
163163
2u => {
164-
let end = strs.pop().unwrap();
165-
(strs.pop().unwrap(), end)
164+
let end = strs.pop();
165+
(strs.pop(), end)
166166
}
167167
n => fail!("Expected 1 or 2 strings, not {}", n)
168168
}

branches/dist-snap/src/compiletest/procsrv.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ pub fn run(lib_path: &str,
6666

6767
Some(Result {
6868
status: status,
69-
out: str::from_utf8_owned(output).unwrap(),
70-
err: str::from_utf8_owned(error).unwrap()
69+
out: str::from_utf8_owned(output),
70+
err: str::from_utf8_owned(error)
7171
})
7272
},
7373
None => None

branches/dist-snap/src/compiletest/runtest.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ fn run_pretty_test(config: &config, props: &TestProps, testfile: &Path) {
154154
match props.pp_exact { Some(_) => 1, None => 2 };
155155

156156
let src = File::open(testfile).read_to_end();
157-
let src = str::from_utf8_owned(src).unwrap();
157+
let src = str::from_utf8_owned(src);
158158
let mut srcs = ~[src];
159159

160160
let mut round = 0;
@@ -176,7 +176,7 @@ fn run_pretty_test(config: &config, props: &TestProps, testfile: &Path) {
176176
Some(ref file) => {
177177
let filepath = testfile.dir_path().join(file);
178178
let s = File::open(&filepath).read_to_end();
179-
str::from_utf8_owned(s).unwrap()
179+
str::from_utf8_owned(s)
180180
}
181181
None => { srcs[srcs.len() - 2u].clone() }
182182
};
@@ -308,7 +308,7 @@ fn run_debuginfo_test(config: &config, props: &TestProps, testfile: &Path) {
308308

309309
let adb_arg = format!("export LD_LIBRARY_PATH={}; gdbserver :5039 {}/{}",
310310
config.adb_test_dir.clone(), config.adb_test_dir.clone(),
311-
str::from_utf8(exe_file.filename().unwrap()).unwrap());
311+
str::from_utf8(exe_file.filename().unwrap()));
312312

313313
let mut process = procsrv::run_background("", config.adb_path,
314314
[~"shell",adb_arg.clone()],
@@ -788,7 +788,7 @@ fn make_run_args(config: &config, _props: &TestProps, testfile: &Path) ->
788788
let exe_file = make_exe_name(config, testfile);
789789
// FIXME (#9639): This needs to handle non-utf8 paths
790790
args.push(exe_file.as_str().unwrap().to_owned());
791-
let prog = args.shift().unwrap();
791+
let prog = args.shift();
792792
return ProcArgs {prog: prog, args: args};
793793
}
794794
@@ -917,7 +917,7 @@ fn _arm_exec_compiled_test(config: &config, props: &TestProps,
917917

918918
// get bare program string
919919
let mut tvec: ~[~str] = args.prog.split('/').map(|ts| ts.to_owned()).collect();
920-
let prog_short = tvec.pop().unwrap();
920+
let prog_short = tvec.pop();
921921

922922
// copy to target
923923
let copy_result = procsrv::run("", config.adb_path,
@@ -1100,7 +1100,7 @@ fn disassemble_extract(config: &config, _props: &TestProps,
11001100

11011101
fn count_extracted_lines(p: &Path) -> uint {
11021102
let x = File::open(&p.with_extension("ll")).read_to_end();
1103-
let x = str::from_utf8_owned(x).unwrap();
1103+
let x = str::from_utf8_owned(x);
11041104
x.lines().len()
11051105
}
11061106

branches/dist-snap/src/etc/gedit/share/gtksourceview-3.0/language-specs/rust.lang

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<language id="rust" _name="Rust" version="2.0" _section="Sources">
66
<metadata>
77
<property name="mimetypes">text/x-rust</property>
8-
<property name="globs">*.rs</property>
8+
<property name="globs">*.rs;*.rc</property>
99
<property name="line-comment-start">//</property>
1010
<property name="block-comment-start">/*</property>
1111
<property name="block-comment-end">*/</property>

branches/dist-snap/src/etc/gedit/share/mime/packages/rust.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
<mime-type type="text/x-rust">
33
<comment>Rust Source</comment>
44
<glob pattern="*.rs"/>
5+
<glob pattern="*.rc"/>
56
</mime-type>
67
</mime-info>

branches/dist-snap/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.10-pre" kateversion="2.4" section="Sources" extensions="*.rs" mimetype="text/x-rust" priority="15">
10+
<language name="Rust" version="0.10-pre" kateversion="2.4" section="Sources" extensions="*.rs;*.rc" mimetype="text/x-rust" priority="15">
1111
<highlighting>
1212
<list name="fn">
1313
<item> fn </item>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
au BufRead,BufNewFile *.rs set filetype=rust
1+
au BufRead,BufNewFile *.rs,*.rc set filetype=rust

branches/dist-snap/src/libextra/base64.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ impl<'a> FromBase64 for &'a str {
198198
* println!("base64 output: {}", hello_str);
199199
* let res = hello_str.from_base64();
200200
* if res.is_ok() {
201-
* let optBytes = str::from_utf8_owned(res.unwrap());
201+
* let optBytes = str::from_utf8_owned_opt(res.unwrap());
202202
* if optBytes.is_some() {
203203
* println!("decoded from base64: {}", optBytes.unwrap());
204204
* }

branches/dist-snap/src/libextra/bitv.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
use std::cmp;
1515
use std::iter::RandomAccessIterator;
16-
use std::iter::{Rev, Enumerate, Repeat, Map, Zip};
16+
use std::iter::{Invert, Enumerate, Repeat, Map, Zip};
1717
use std::num;
1818
use std::ops;
1919
use std::uint;
@@ -387,7 +387,7 @@ impl Bitv {
387387
}
388388
}
389389

390-
/// Flip all bits
390+
/// Invert all bits
391391
#[inline]
392392
pub fn negate(&mut self) {
393393
match self.rep {
@@ -428,8 +428,8 @@ impl Bitv {
428428
}
429429

430430
#[inline]
431-
pub fn rev_iter<'a>(&'a self) -> Rev<Bits<'a>> {
432-
self.iter().rev()
431+
pub fn rev_iter<'a>(&'a self) -> Invert<Bits<'a>> {
432+
self.iter().invert()
433433
}
434434

435435
/// Returns `true` if all bits are 0

branches/dist-snap/src/libextra/c_vec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ mod tests {
172172
let mem = malloc_raw(n);
173173

174174
CVec::new_with_dtor(mem as *mut u8, n,
175-
proc() { libc::free(mem as *mut c_void); })
175+
proc() { libc::free(mem as *c_void); })
176176
}
177177
}
178178

branches/dist-snap/src/libextra/dlist.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
use std::cast;
2626
use std::ptr;
2727
use std::util;
28-
use std::iter::Rev;
28+
use std::iter::Invert;
2929
use std::iter;
3030

3131
use container::Deque;
@@ -368,8 +368,8 @@ impl<T> DList<T> {
368368

369369
/// Provide a reverse iterator
370370
#[inline]
371-
pub fn rev_iter<'a>(&'a self) -> Rev<Items<'a, T>> {
372-
self.iter().rev()
371+
pub fn rev_iter<'a>(&'a self) -> Invert<Items<'a, T>> {
372+
self.iter().invert()
373373
}
374374

375375
/// Provide a forward iterator with mutable references
@@ -388,8 +388,8 @@ impl<T> DList<T> {
388388
}
389389
/// Provide a reverse iterator with mutable references
390390
#[inline]
391-
pub fn mut_rev_iter<'a>(&'a mut self) -> Rev<MutItems<'a, T>> {
392-
self.mut_iter().rev()
391+
pub fn mut_rev_iter<'a>(&'a mut self) -> Invert<MutItems<'a, T>> {
392+
self.mut_iter().invert()
393393
}
394394

395395

@@ -401,8 +401,8 @@ impl<T> DList<T> {
401401

402402
/// Consume the list into an iterator yielding elements by value, in reverse
403403
#[inline]
404-
pub fn move_rev_iter(self) -> Rev<MoveItems<T>> {
405-
self.move_iter().rev()
404+
pub fn move_rev_iter(self) -> Invert<MoveItems<T>> {
405+
self.move_iter().invert()
406406
}
407407
}
408408

@@ -1049,11 +1049,11 @@ mod tests {
10491049
match r % 6 {
10501050
0 => {
10511051
m.pop_back();
1052-
v.pop();
1052+
if v.len() > 0 { v.pop(); }
10531053
}
10541054
1 => {
10551055
m.pop_front();
1056-
v.shift();
1056+
if v.len() > 0 { v.shift(); }
10571057
}
10581058
2 | 4 => {
10591059
m.push_front(-i);

branches/dist-snap/src/libextra/ebml.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ impl<'doc> Doc<'doc> {
3030
}
3131

3232
pub fn as_str_slice<'a>(&'a self) -> &'a str {
33-
str::from_utf8(self.data.slice(self.start, self.end)).unwrap()
33+
str::from_utf8(self.data.slice(self.start, self.end))
3434
}
3535

3636
pub fn as_str(&self) -> ~str {
@@ -651,7 +651,7 @@ pub mod writer {
651651
}
652652

653653
pub fn end_tag(&mut self) {
654-
let last_size_pos = self.size_positions.pop().unwrap();
654+
let last_size_pos = self.size_positions.pop();
655655
let cur_pos = self.writer.tell();
656656
self.writer.seek(last_size_pos as i64, io::SeekSet);
657657
let size = (cur_pos as uint - last_size_pos - 4);

branches/dist-snap/src/libextra/flate.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ fn deflate_bytes_internal(bytes: &[u8], flags: c_int) -> ~[u8] {
5353
assert!(res as int != 0);
5454
let out = vec::raw::from_buf_raw(res as *u8,
5555
outsz as uint);
56-
libc::free(res as *mut c_void);
56+
libc::free(res);
5757
out
5858
}
5959
}
@@ -76,7 +76,7 @@ fn inflate_bytes_internal(bytes: &[u8], flags: c_int) -> ~[u8] {
7676
assert!(res as int != 0);
7777
let out = vec::raw::from_buf_raw(res as *u8,
7878
outsz as uint);
79-
libc::free(res as *mut c_void);
79+
libc::free(res);
8080
out
8181
}
8282
}

branches/dist-snap/src/libextra/glob.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ impl Iterator<Path> for Paths {
122122
return None;
123123
}
124124

125-
let (path,idx) = self.todo.pop().unwrap();
125+
let (path,idx) = self.todo.pop();
126126
let ref pattern = self.dir_patterns[idx];
127127

128128
if pattern.matches_with(match path.filename_str() {

branches/dist-snap/src/libextra/hex.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ impl<'a> FromHex for &'a str {
9696
* println!("{}", hello_str);
9797
* let bytes = hello_str.from_hex().unwrap();
9898
* println!("{:?}", bytes);
99-
* let result_str = str::from_utf8_owned(bytes).unwrap();
99+
* let result_str = str::from_utf8_owned(bytes);
100100
* println!("{}", result_str);
101101
* }
102102
* ```

0 commit comments

Comments
 (0)