Skip to content

Commit 577314b

Browse files
committed
---
yaml --- r: 15343 b: refs/heads/try c: d621ada h: refs/heads/master i: 15341: 2e36b5f 15339: c576ff7 15335: b30a524 15327: 2962ee9 v: v3
1 parent 6229f91 commit 577314b

Some content is hidden

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

67 files changed

+234
-1005
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
refs/heads/master: 61b1875c16de39c166b0f4d54bba19f9c6777d1a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5-
refs/heads/try: 051f24da25a485f9702590f9c7f5095ebd0fbb58
5+
refs/heads/try: d621ada003cd3464d52fb65f95f6767e62befa6f
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/try/doc/rust.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1617,9 +1617,9 @@ is bounds-checked at run-time. When the check fails, it will put the
16171617
task in a _failing state_.
16181618

16191619
~~~~
1620-
# let buildr = task::builder();
1621-
# task::unsupervise(buildr);
1622-
# task::run(buildr) {||
1620+
# let builder = task::task_builder();
1621+
# task::unsupervise(builder);
1622+
# task::run(builder) {||
16231623
16241624
[1, 2, 3, 4][0];
16251625
[mut 'x', 'y'][1] = 'z';

branches/try/doc/tutorial.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1686,7 +1686,6 @@ purpose, you create a `.rc` crate file, which references any number of
16861686

16871687
~~~~ {.ignore}
16881688
#[link(name = "farm", vers = "2.5", author = "mjh")];
1689-
#[crate_type = "lib"];
16901689
mod cow;
16911690
mod chicken;
16921691
mod horse;
@@ -1695,9 +1694,7 @@ mod horse;
16951694
Compiling this file will cause `rustc` to look for files named
16961695
`cow.rs`, `chicken.rs`, `horse.rs` in the same directory as the `.rc`
16971696
file, compile them all together, and, depending on the presence of the
1698-
`crate_type = "lib"` attribute, output a shared library or an executable.
1699-
(If the line `#[crate_type = "lib"];` was omitted, `rustc` would create an
1700-
executable.)
1697+
`--lib` switch, output a shared library or an executable.
17011698

17021699
The `#[link(...)]` part provides meta information about the module,
17031700
which other crates can use to load the right module. More about that
@@ -1720,9 +1717,9 @@ content to the `poultry` module itself.
17201717

17211718
## Using other crates
17221719

1723-
Having compiled a crate that contains the `#[crate_type = "lib"]` attribute,
1724-
you can use it in another crate with a `use` directive. We've already seen
1725-
`use std` in several of the examples, which loads in the [standard library][std].
1720+
Having compiled a crate with `--lib`, you can use it in another crate
1721+
with a `use` directive. We've already seen `use std` in several of the
1722+
examples, which loads in the [standard library][std].
17261723

17271724
[std]: http://doc.rust-lang.org/doc/std/index/General.html
17281725

branches/try/src/cargo/cargo.rc

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,4 @@
1717

1818
#[crate_type = "bin"];
1919

20-
#[no_core];
21-
22-
use core(vers = "0.2");
23-
use std(vers = "0.2");
24-
use rustc(vers = "0.2");
25-
26-
import core::*;
27-
2820
mod pgp;

branches/try/src/cargo/cargo.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
// cargo.rs - Rust package manager
22

3+
use rustc;
4+
use std;
5+
36
import rustc::syntax::{ast, codemap};
47
import rustc::syntax::parse::parser;
58
import rustc::util::filesearch::{get_cargo_root, get_cargo_root_nearest,

branches/try/src/cargo/pgp.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
use std;
2+
13
fn gpg(args: [str]) -> { status: int, out: str, err: str } {
24
ret run::program_output("gpg", args);
35
}

branches/try/src/compiletest/compiletest.rc

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
#[crate_type = "bin"];
22

3-
#[no_core];
4-
5-
use core(vers = "0.2");
6-
use std(vers = "0.2");
7-
8-
import core::*;
3+
use std;
94

105
mod procsrv;
116
mod util;

branches/try/src/compiletest/runtest.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ fn check_expected_errors(expected_errors: [errors::expected_error],
246246
// is the ending point, and * represents ANSI color codes.
247247
for line: str in str::split_char(procres.stderr, '\n') {
248248
let mut was_expected = false;
249-
for vec::eachi(expected_errors) {|i, ee|
249+
vec::iteri(expected_errors) {|i, ee|
250250
if !found_flags[i] {
251251
#debug["prefix=%s ee.kind=%s ee.msg=%s line=%s",
252252
prefixes[i], ee.kind, ee.msg, line];
@@ -255,7 +255,6 @@ fn check_expected_errors(expected_errors: [errors::expected_error],
255255
str::contains(line, ee.msg)) {
256256
found_flags[i] = true;
257257
was_expected = true;
258-
break;
259258
}
260259
}
261260
}

branches/try/src/etc/indenter

Lines changed: 0 additions & 17 deletions
This file was deleted.

branches/try/src/fuzzer/fuzzer.rc

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,8 @@
22

33
#[crate_type = "bin"];
44

5-
#[no_core];
6-
7-
use core(vers = "0.2");
8-
use std(vers = "0.2");
9-
use rustc(vers = "0.2");
10-
11-
import core::*;
5+
use std;
6+
use rustc;
127

138
// Local Variables:
149
// fill-column: 78;

branches/try/src/libcore/core.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ mod core {
4040
// Similar to above. Some magic to make core testable.
4141
#[cfg(test)]
4242
mod std {
43-
use std(vers = "0.2");
43+
use std;
4444
import std::test;
4545
}
4646

branches/try/src/libcore/os.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,7 @@ mod tests {
849849
};
850850
assert (ostream as uint != 0u);
851851
let s = "hello";
852-
let mut buf = vec::to_mut(str::bytes(s) + [0 as u8]);
852+
let mut buf = str::bytes(s) + [0 as u8];
853853
vec::as_mut_buf(buf) {|b|
854854
assert (libc::fwrite(b as *c_void, 1u, str::len(s) + 1u, ostream) ==
855855
buf.len())};

branches/try/src/libcore/str.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1658,7 +1658,7 @@ mod unsafe {
16581658
Does not verify that the vector contains valid UTF-8.
16591659
"]
16601660
unsafe fn from_bytes(v: [const u8]) -> str unsafe {
1661-
let vcopy = v + [0u8];
1661+
let mut vcopy: [u8] = v + [0u8];
16621662
let scopy: str = ::unsafe::reinterpret_cast(vcopy);
16631663
::unsafe::forget(vcopy);
16641664
ret scopy;
@@ -1783,6 +1783,9 @@ impl extensions for str {
17831783
"]
17841784
#[inline]
17851785
fn is_whitespace() -> bool { is_whitespace(self) }
1786+
#[inline]
1787+
#[doc ="Returns the size in bytes not counting the null terminator"]
1788+
fn len() -> uint { len(self) }
17861789
#[doc = "
17871790
Returns a slice of the given string from the byte range [`begin`..`end`)
17881791

0 commit comments

Comments
 (0)