Skip to content

Commit 6753604

Browse files
committed
---
yaml --- r: 80758 b: refs/heads/try c: 462dcc8 h: refs/heads/master v: v3
1 parent 191672b commit 6753604

30 files changed

+905
-569
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 4c6bf4872012c010f84dc7fa2cdfe87522533f89
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: cbd1eefbd350797b783df119fed7956d7e1c74ad
5-
refs/heads/try: c62919f6074c1ddf766139e5d484fbd7c6f899e1
5+
refs/heads/try: 462dcc8e7a44972b57cb3060a48970c0499d5dee
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/doc/rustpkg.md

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,11 @@ A valid workspace must contain each of the following subdirectories:
5252
rustpkg will install libraries for bar to `foo/lib/x86_64-apple-darwin/`.
5353
The libraries will have names of the form `foo/lib/x86_64-apple-darwin/libbar-[hash].dylib`,
5454
where [hash] is a hash of the package ID.
55-
* 'bin/': `rustpkg install` installs executable binaries into a target-specific subdirectory of this directory.
55+
* 'bin/': `rustpkg install` installs executable binaries into this directory.
5656

57-
For example, on a 64-bit machine running Mac OS X,
58-
if `foo` is a workspace, containing the package `bar`,
59-
rustpkg will install executables for `bar` to
60-
`foo/bin/x86_64-apple-darwin/`.
61-
The executables will have names of the form `foo/bin/x86_64-apple-darwin/bar`.
57+
For example, rustpkg will install executables for `bar` to
58+
`foo/bin`.
59+
The executables will have names of the form `foo/bin/bar`.
6260
* 'build/': `rustpkg build` stores temporary build artifacts in a target-specific subdirectory of this directory.
6361

6462
For example, on a 64-bit machine running Mac OS X,
@@ -85,6 +83,12 @@ rustpkg also interprets any dependencies on such a package ID literally
8583
Thus, `github.com/mozilla/rust#5c4cd30f80` is also a valid package ID,
8684
since git can deduce that 5c4cd30f80 refers to a revision of the desired repository.
8785

86+
A package identifier can name a subdirectory of another package.
87+
For example, if `foo` is a workspace, and `foo/src/bar/lib.rs` exists,
88+
as well as `foo/src/bar/extras/baz/lib.rs`,
89+
then both `bar` and `bar/extras/baz` are valid package identifiers
90+
in the workspace `foo`.
91+
8892
## Source files
8993

9094
rustpkg searches for four different fixed filenames in order to determine the crates to build:
@@ -140,9 +144,11 @@ but not in their `lib` or `bin` directories.
140144

141145
## install
142146

143-
`rustpkg install foo` builds the libraries and/or executables that are targets for `foo`,
144-
and then installs them either into `foo`'s `lib` and `bin` directories,
145-
or into the `lib` and `bin` subdirectories of the first entry in `RUST_PATH`.
147+
`rustpkg install foo` builds the libraries and/or executables that are targets for `foo`.
148+
If `RUST_PATH` is declared as an environment variable, then rustpkg installs the
149+
libraries and executables into the `lib` and `bin` subdirectories
150+
of the first entry in `RUST_PATH`.
151+
Otherwise, it installs them into `foo`'s `lib` and `bin` directories.
146152

147153
## test
148154

branches/try/mk/rt.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ RUNTIME_CXXS_$(1)_$(2) := \
7575
rt/rust_rng.cpp \
7676
rt/rust_upcall.cpp \
7777
rt/rust_uv.cpp \
78-
rt/rust_crate_map.cpp \
7978
rt/isaac/randport.cpp \
8079
rt/miniz.cpp \
8180
rt/memory_region.cpp \

branches/try/src/etc/emacs/README.md

Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,29 @@
1-
rust-mode: A major emacs mode for editing Rust source code
2-
==========================================================
1+
`rust-mode`: A major Emacs mode for editing Rust source code
2+
============================================================
33

4-
`rust-mode` makes editing [Rust](http://rust-lang.org) code with emacs
4+
`rust-mode` makes editing [Rust](http://rust-lang.org) code with Emacs
55
enjoyable.
66

77

88
### Manual Installation
99

10-
To install manually, check out this repository and add this to your .emacs
11-
file:
10+
To install manually, check out this repository and add this to your
11+
`.emacs` file:
1212

13-
(add-to-list 'load-path "/path/to/rust-mode/")
14-
(require 'rust-mode)
13+
```lisp
14+
(add-to-list 'load-path "/path/to/rust-mode/")
15+
(require 'rust-mode)
16+
```
1517

16-
Rust mode will automatically be associated with .rs files. To enable it
17-
explicitly, do `M-x rust-mode`.
18+
`rust-mode` will automatically be associated with `.rs` files. To enable it
19+
explicitly, do <kbd>M-x rust-mode</kbd>.
1820

19-
### package.el installation via Marmalade or MELPA
21+
### `package.el` installation via Marmalade or MELPA
2022

2123
It can be more convenient to use Emacs's package manager to handle
2224
installation for you if you use many elisp libraries. If you have
23-
package.el but haven't added Marmalade or MELPA, the community package source,
24-
yet, add this to ~/.emacs.d/init.el:
25+
`package.el` but haven't added Marmalade or MELPA, the community
26+
package source, yet, add this to `~/.emacs.d/init.el`:
2527

2628
Using Marmalade:
2729

@@ -47,32 +49,33 @@ Then do this to load the package listing:
4749
* <kbd>M-x package-refresh-contents</kbd>
4850

4951
If you use a version of Emacs prior to 24 that doesn't include
50-
package.el, you can get it from http://bit.ly/pkg-el23.
52+
`package.el`, you can get it from [here](http://bit.ly/pkg-el23).
5153

52-
If you have an older ELPA package.el installed from tromey.com, you
54+
If you have an older ELPA `package.el` installed from tromey.com, you
5355
should upgrade in order to support installation from multiple sources.
5456
The ELPA archive is deprecated and no longer accepting new packages,
5557
so the version there (1.7.1) is very outdated.
5658

57-
#### Install rust-mode
59+
#### Install `rust-mode`
5860

59-
From there you can install rust-mode or any other modes by choosing
60-
them from a list:
61+
One you have `package.el`, you can install `rust-mode` or any other
62+
modes by choosing them from a list:
6163

6264
* <kbd>M-x package-list-packages</kbd>
6365

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/).
66+
Now, to install packages, move your cursor to them and press
67+
<kbd>i</kbd>. This will mark the packages for installation. When
68+
you're done with marking, press <kbd>x</kbd>, and ELPA will install
69+
the packages for you (under `~/.emacs.d/elpa/`).
6870

69-
* or using <kbd>M-x package-install rust-mode
71+
* or using <kbd>M-x package-install rust-mode</kbd>
7072

7173
### Tests via ERT
7274

73-
The file `rust-mode-tests.el` contains tests that can be run via ERT. You can
74-
use `run_rust_emacs_tests.sh` to run them in batch mode, if emacs is somewhere
75-
in your `$PATH`.
75+
The file `rust-mode-tests.el` contains tests that can be run via
76+
[ERT](http://www.gnu.org/software/emacs/manual/html_node/ert/index.html).
77+
You can use `run_rust_emacs_tests.sh` to run them in batch mode, if
78+
Emacs is somewhere in your `$PATH`.
7679

7780
### Known bugs
7881

branches/try/src/libextra/fileinput.rs

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -417,20 +417,23 @@ mod test {
417417

418418
use super::{FileInput, make_path_option_vec, input_vec, input_vec_state};
419419

420-
use std::io;
420+
use std::rt::io;
421+
use std::rt::io::Writer;
422+
use std::rt::io::file;
421423
use std::uint;
422424
use std::vec;
423425

424426
fn make_file(path : &Path, contents: &[~str]) {
425-
let file = io::file_writer(path, [io::Create, io::Truncate]).unwrap();
427+
let mut file = file::open(path, io::CreateOrTruncate, io::Write).unwrap();
426428

427429
for str in contents.iter() {
428-
file.write_str(*str);
429-
file.write_char('\n');
430+
file.write(str.as_bytes());
431+
file.write(['\n' as u8]);
430432
}
431433
}
432434

433435
#[test]
436+
#[ignore(cfg(windows))] // FIXME(#8810): rt::io::file and windows don't agree
434437
fn test_make_path_option_vec() {
435438
let strs = [~"some/path",
436439
~"some/other/path"];
@@ -445,6 +448,7 @@ mod test {
445448
}
446449
447450
#[test]
451+
#[ignore(cfg(windows))] // FIXME(#8810): rt::io::file and windows don't agree
448452
fn test_fileinput_read_byte() {
449453
let filenames = make_path_option_vec(vec::from_fn(
450454
3,
@@ -475,6 +479,7 @@ mod test {
475479
}
476480
477481
#[test]
482+
#[ignore(cfg(windows))] // FIXME(#8810): rt::io::file and windows don't agree
478483
fn test_fileinput_read() {
479484
let filenames = make_path_option_vec(vec::from_fn(
480485
3,
@@ -495,6 +500,7 @@ mod test {
495500
}
496501

497502
#[test]
503+
#[ignore(cfg(windows))] // FIXME(#8810): rt::io::file and windows don't agree
498504
fn test_input_vec() {
499505
let mut all_lines = ~[];
500506
let filenames = make_path_option_vec(vec::from_fn(
@@ -518,6 +524,7 @@ mod test {
518524
}
519525

520526
#[test]
527+
#[ignore(cfg(windows))] // FIXME(#8810): rt::io::file and windows don't agree
521528
fn test_input_vec_state() {
522529
let filenames = make_path_option_vec(vec::from_fn(
523530
3,
@@ -540,6 +547,7 @@ mod test {
540547
}
541548

542549
#[test]
550+
#[ignore(cfg(windows))] // FIXME(#8810): rt::io::file and windows don't agree
543551
fn test_empty_files() {
544552
let filenames = make_path_option_vec(vec::from_fn(
545553
3,
@@ -564,18 +572,21 @@ mod test {
564572
}
565573
566574
#[test]
575+
#[ignore(cfg(windows))] // FIXME(#8810): rt::io::file and windows don't agree
567576
fn test_no_trailing_newline() {
568577
let f1 =
569578
Some(Path("tmp/lib-fileinput-test-no-trailing-newline-1.tmp"));
570579
let f2 =
571580
Some(Path("tmp/lib-fileinput-test-no-trailing-newline-2.tmp"));
572581
573-
let wr = io::file_writer(f1.get_ref(),
574-
[io::Create, io::Truncate]).unwrap();
575-
wr.write_str("1\n2");
576-
let wr = io::file_writer(f2.get_ref(),
577-
[io::Create, io::Truncate]).unwrap();
578-
wr.write_str("3\n4");
582+
{
583+
let mut wr = file::open(f1.get_ref(), io::CreateOrTruncate,
584+
io::Write).unwrap();
585+
wr.write("1\n2".as_bytes());
586+
let mut wr = file::open(f2.get_ref(), io::CreateOrTruncate,
587+
io::Write).unwrap();
588+
wr.write("3\n4".as_bytes());
589+
}
579590
580591
let mut lines = ~[];
581592
do input_vec(~[f1, f2]) |line| {
@@ -587,6 +598,7 @@ mod test {
587598
588599
589600
#[test]
601+
#[ignore(cfg(windows))] // FIXME(#8810): rt::io::file and windows don't agree
590602
fn test_next_file() {
591603
let filenames = make_path_option_vec(vec::from_fn(
592604
3,
@@ -618,6 +630,7 @@ mod test {
618630
619631
#[test]
620632
#[should_fail]
633+
#[ignore(cfg(windows))] // FIXME(#8810): rt::io::file and windows don't agree
621634
fn test_input_vec_missing_file() {
622635
do input_vec(make_path_option_vec([~"this/file/doesnt/exist"], true)) |line| {
623636
println(line);

0 commit comments

Comments
 (0)