Skip to content

Commit f5c7f71

Browse files
committed
---
yaml --- r: 23231 b: refs/heads/master c: 476aae1 h: refs/heads/master i: 23229: 04fb9ed 23227: 962950f 23223: 84adc6c 23215: 3919965 23199: 6b198a0 23167: 9bc134b v: v3
1 parent e66c776 commit f5c7f71

File tree

108 files changed

+909
-1553
lines changed

Some content is hidden

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

108 files changed

+909
-1553
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: 11258310e2b67f734d4d520e6f995342892ecc3a
2+
refs/heads/master: 476aae16af195363393cbcab413ae018267f2b97
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
55
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be

trunk/src/cargo/cargo.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import rustc::metadata::filesearch::{get_cargo_root, get_cargo_root_nearest,
88
import syntax::diagnostic;
99

1010
import result::{ok, err};
11-
import io::WriterUtil;
11+
import io::writer_util;
1212
import std::{map, json, tempfile, term, sort, getopts};
1313
import map::hashmap;
1414
import to_str::to_str;

trunk/src/compiletest/procsrv.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import run::spawn_process;
2-
import io::WriterUtil;
2+
import io::writer_util;
33
import libc::{c_int, pid_t};
44

55
import pipes::chan;
@@ -45,8 +45,8 @@ fn run(lib_path: ~str,
4545
let pipe_out = os::pipe();
4646
let pipe_err = os::pipe();
4747
let pid = spawn_process(prog, args,
48-
&some(env + target_env(lib_path, prog)),
49-
&none, pipe_in.in, pipe_out.out, pipe_err.out);
48+
some(env + target_env(lib_path, prog)),
49+
none, pipe_in.in, pipe_out.out, pipe_err.out);
5050

5151
os::close(pipe_in.in);
5252
os::close(pipe_out.out);

trunk/src/compiletest/runtest.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import io::WriterUtil;
1+
import io::writer_util;
22

33
import common::mode_run_pass;
44
import common::mode_run_fail;
@@ -339,7 +339,7 @@ fn compose_and_run_compiler(
339339
config.compile_lib_path, input)
340340
}
341341

342-
fn ensure_dir(path: Path) {
342+
fn ensure_dir(path: path) {
343343
if os::path_is_dir(path) { return; }
344344
if !os::make_dir(path, 0x1c0i32) {
345345
fail fmt!{"can't make dir %s", path};
@@ -455,7 +455,7 @@ fn dump_output_file(config: config, testfile: ~str,
455455
out: ~str, extension: ~str) {
456456
let outfile = make_out_name(config, testfile, extension);
457457
let writer = result::get(
458-
io::file_writer(outfile, ~[io::Create, io::Truncate]));
458+
io::file_writer(outfile, ~[io::create, io::truncate]));
459459
writer.write_str(out);
460460
}
461461

trunk/src/etc/combine-tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def scrub(b):
5454
d.write("use std;\n")
5555
d.write("use run_pass_stage2;\n")
5656
d.write("import run_pass_stage2::*;\n")
57-
d.write("import io::WriterUtil;\n");
57+
d.write("import io::writer_util;\n");
5858
d.write("fn main() {\n");
5959
d.write(" let out = io::stdout();\n");
6060
i = 0

trunk/src/etc/emacs/README.md

Lines changed: 1 addition & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@ rust-mode: A major emacs mode for editing Rust source code
44
`rust-mode` makes editing [Rust](http://rust-lang.org) code with emacs
55
enjoyable.
66

7-
8-
### Manual Installation
9-
10-
To install manually, check out this repository and add this to your .emacs
7+
To install, check out this repository and add this to your .emacs
118
file:
129

1310
(add-to-list 'load-path "/path/to/rust-mode/")
@@ -28,60 +25,3 @@ it, and pressing `C-j`:
2825

2926
Rust mode will automatically be associated with .rs and .rc files. To
3027
enable it explicitly, do `M-x rust-mode`.
31-
32-
### package.el installation via Marmalade
33-
34-
It can be more convenient to use Emacs's package manager to handle
35-
installation for you if you use many elisp libraries. If you have
36-
package.el but haven't added Marmalade, the community package source,
37-
yet, add this to ~/.emacs.d/init.el:
38-
39-
```lisp
40-
(require 'package)
41-
(add-to-list 'package-archives
42-
'("marmalade" . "http://marmalade-repo.org/packages/"))
43-
(package-initialize)
44-
```
45-
46-
Then do this to load the package listing:
47-
48-
* <kbd>M-x eval-buffer</kbd>
49-
* <kbd>M-x package-refresh-contents</kbd>
50-
51-
If you use a version of Emacs prior to 24 that doesn't include
52-
package.el, you can get it from http://bit.ly/pkg-el23.
53-
54-
If you have an older ELPA package.el installed from tromey.com, you
55-
should upgrade in order to support installation from multiple sources.
56-
The ELPA archive is deprecated and no longer accepting new packages,
57-
so the version there (1.7.1) is very outdated.
58-
59-
From there you can install rust-mode or any other modes by choosing
60-
them from a list:
61-
62-
* <kbd>M-x package-list-packages</kbd>
63-
64-
Now, to install packages, move your cursor to them and press i. This
65-
will mark the packages for installation. When you're done with
66-
marking, press x, and ELPA will install the packages for you (under
67-
~/.emacs.d/elpa/).
68-
69-
* or using <kbd>M-x package-install rust-mode
70-
71-
#### Important
72-
73-
In order to have cm-mode properly initialized after compilation prior
74-
to rust-mode.el compilation you will need to add these `advices` to
75-
your init file or if you are a melpa user install the `melpa` package.
76-
77-
```lisp
78-
(defadvice package-download-tar
79-
(after package-download-tar-initialize activate compile)
80-
"initialize the package after compilation"
81-
(package-initialize))
82-
83-
(defadvice package-download-single
84-
(after package-download-single-initialize activate compile)
85-
"initialize the package after compilation"
86-
(package-initialize))
87-
```

trunk/src/etc/emacs/cm-mode.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
;;; cm-mode.el --- Wrapper for CodeMirror-style Emacs modes
22

33
;; Version: 0.1.0
4-
;; Author: Mozilla
54
;; Url: https://github.com/mozilla/rust
5+
66
;; Highlighting is done by running a stateful parser (with first-class
77
;; state object) over the buffer, line by line, using the output to
88
;; add 'face properties, and storing the parser state at the end of

trunk/src/etc/emacs/rust-mode.el

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
;;; rust-mode.el --- A major emacs mode for editing Rust source code
22

33
;; Version: 0.1.0
4-
;; Author: Mozilla
54
;; Package-Requires: ((cm-mode "0.1.0"))
65
;; Url: https://github.com/mozilla/rust
76

trunk/src/fuzzer/fuzzer.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import io::WriterUtil;
1+
import io::writer_util;
22

33
import syntax::{ast, ast_util, fold, visit, codemap};
44
import syntax::parse;
@@ -10,7 +10,7 @@ type context = { mode: test_mode }; // + rng
1010

1111
fn write_file(filename: ~str, content: ~str) {
1212
result::get(
13-
io::file_writer(filename, ~[io::Create, io::Truncate]))
13+
io::file_writer(filename, ~[io::create, io::truncate]))
1414
.write_str(content);
1515
}
1616

@@ -216,9 +216,9 @@ fn under(n: uint, it: fn(uint)) {
216216
while i < n { it(i); i += 1u; }
217217
}
218218

219-
fn devnull() -> io::Writer { io::mem_buffer_writer(io::mem_buffer()) }
219+
fn devnull() -> io::writer { io::mem_buffer_writer(io::mem_buffer()) }
220220

221-
fn as_str(f: fn@(io::Writer)) -> ~str {
221+
fn as_str(f: fn@(io::writer)) -> ~str {
222222
let buf = io::mem_buffer();
223223
f(io::mem_buffer_writer(buf));
224224
io::mem_buffer_str(buf)

trunk/src/libcore/comm.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// NB: transitionary, de-mode-ing.
2-
#[forbid(deprecated_mode)];
3-
#[forbid(deprecated_pattern)];
41
/*!
52
* Communication between tasks
63
*
@@ -165,7 +162,7 @@ fn chan<T: send>(p: port<T>) -> chan<T> {
165162
* Sends data over a channel. The sent data is moved into the channel,
166163
* whereupon the caller loses access to it.
167164
*/
168-
fn send<T: send>(ch: chan<T>, +data: T) {
165+
fn send<T: send>(ch: chan<T>, -data: T) {
169166
let chan_t(p) = ch;
170167
let data_ptr = ptr::addr_of(data) as *();
171168
let res = rustrt::rust_port_id_send(p, data_ptr);

trunk/src/libcore/core.rc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ export send_map;
5454
export hash;
5555
export cmp;
5656
export num;
57-
export path;
5857

5958
// NDM seems to be necessary for resolve to work
6059
export option_iter;
@@ -215,16 +214,11 @@ mod pipes;
215214

216215
// Runtime and language-primitive support
217216

218-
#[warn(non_camel_case_types)]
219217
mod io;
220218
mod libc;
221-
#[warn(non_camel_case_types)]
222219
mod os;
223-
#[warn(non_camel_case_types)]
224220
mod path;
225-
#[warn(non_camel_case_types)]
226221
mod rand;
227-
#[warn(non_camel_case_types)]
228222
mod run;
229223
#[warn(non_camel_case_types)]
230224
mod sys;

trunk/src/libcore/core.rs

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

55
import option::{some, none};
66
import option = option::option;
7-
import Path = path::Path;
7+
import path = path::path;
88
import tuple::{TupleOps, ExtendedTupleOps};
99
import str::{str_slice, unique_str};
1010
import vec::{const_vector, copyable_vector, immutable_vector};
@@ -14,7 +14,7 @@ import num::Num;
1414
import ptr::ptr;
1515
import to_str::ToStr;
1616

17-
export Path, option, some, none, unreachable;
17+
export path, option, some, none, unreachable;
1818
export extensions;
1919
// The following exports are the extension impls for numeric types
2020
export Num, times, timesi;

trunk/src/libcore/hash.rs

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
// NB: transitionary, de-mode-ing.
2-
#[forbid(deprecated_mode)];
3-
#[forbid(deprecated_pattern)];
4-
51
/*!
62
* Implementation of SipHash 2-4
73
*
@@ -13,8 +9,8 @@
139
* CPRNG like rand::rng.
1410
*/
1511

16-
import io::Writer;
17-
import io::WriterUtil;
12+
import io::writer;
13+
import io::writer_util;
1814

1915
export Streaming, State;
2016
export default_state;
@@ -126,7 +122,7 @@ fn SipState(key0: u64, key1: u64) -> SipState {
126122
}
127123

128124

129-
impl &SipState : io::Writer {
125+
impl &SipState : io::writer {
130126

131127
// Methods for io::writer
132128
fn write(msg: &[const u8]) {
@@ -209,7 +205,7 @@ impl &SipState : io::Writer {
209205
self.ntail = left;
210206
}
211207

212-
fn seek(_x: int, _s: io::SeekStyle) {
208+
fn seek(_x: int, _s: io::seek_style) {
213209
fail;
214210
}
215211
fn tell() -> uint {
@@ -218,8 +214,8 @@ impl &SipState : io::Writer {
218214
fn flush() -> int {
219215
0
220216
}
221-
fn get_type() -> io::WriterType {
222-
io::File
217+
fn get_type() -> io::writer_type {
218+
io::file
223219
}
224220
}
225221

@@ -366,9 +362,9 @@ fn test_siphash() {
366362
let stream_inc = &State(k0,k1);
367363
let stream_full = &State(k0,k1);
368364

369-
fn to_hex_str(r: &[u8]/8) -> ~str {
365+
fn to_hex_str(r:[u8]/8) -> ~str {
370366
let mut s = ~"";
371-
for vec::each(*r) |b| { s += uint::to_str(b as uint, 16u); }
367+
for vec::each(r) |b| { s += uint::to_str(b as uint, 16u); }
372368
return s;
373369
}
374370

@@ -383,7 +379,7 @@ fn test_siphash() {
383379
stream_full.input(buf);
384380
let f = stream_full.result_str();
385381
let i = stream_inc.result_str();
386-
let v = to_hex_str(&vecs[t]);
382+
let v = to_hex_str(vecs[t]);
387383
debug!{"%d: (%s) => inc=%s full=%s", t, v, i, f};
388384

389385
assert f == i && f == v;

0 commit comments

Comments
 (0)