Skip to content

Commit c472f93

Browse files
committed
---
yaml --- r: 123676 b: refs/heads/try c: ec3efa8 h: refs/heads/master v: v3
1 parent 5719cf7 commit c472f93

File tree

380 files changed

+6189
-4483
lines changed

Some content is hidden

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

380 files changed

+6189
-4483
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: da4e4e4e0a7778a85748aa4a303b13f603e96b4b
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 8ddd286ea4ba4384a0dc9eae393ed515460a986e
5-
refs/heads/try: 11c64f162ff5b3f8bf2fd978ab268395b285b067
5+
refs/heads/try: ec3efa8055069e285a4bfcba892f8463ce925d68
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/RELEASES.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ Version 0.9 (January 2014)
306306
* A new facility for enabling experimental features (feature gating) has
307307
been added, using the crate-level `#[feature(foo)]` attribute.
308308
* Managed boxes (@) are now behind a feature gate
309-
(`#[feature(managed_boxes)]`) in preperation for future removal. Use the
309+
(`#[feature(managed_boxes)]`) in preparation for future removal. Use the
310310
standard library's `Gc` or `Rc` types instead.
311311
* `@mut` has been removed. Use `std::cell::{Cell, RefCell}` instead.
312312
* Jumping back to the top of a loop is now done with `continue` instead of
@@ -398,7 +398,7 @@ Version 0.9 (January 2014)
398398
* std: `fmt::Default` can be implemented for any type to provide default
399399
formatting to the `format!` macro, as in `format!("{}", myfoo)`.
400400
* std: The `rand` API continues to be tweaked.
401-
* std: The `rust_begin_unwind` function, useful for insterting breakpoints
401+
* std: The `rust_begin_unwind` function, useful for inserting breakpoints
402402
on failure in gdb, is now named `rust_fail`.
403403
* std: The `each_key` and `each_value` methods on `HashMap` have been
404404
replaced by the `keys` and `values` iterators.
@@ -429,7 +429,7 @@ Version 0.9 (January 2014)
429429
extensible interfaces and is now implemented by two different crates:
430430
libnative, for native threading and I/O; and libgreen, for green threading
431431
and I/O. This paves the way for using the standard library in more limited
432-
embeded environments.
432+
embedded environments.
433433
* std: The `comm` module has been rewritten to be much faster, have a
434434
simpler, more consistent API, and to work for both native and green
435435
threading.

branches/try/configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ opt ccache 0 "invoke gcc/clang via ccache to reuse object files between builds"
418418
opt local-rust 0 "use an installed rustc rather than downloading a snapshot"
419419
opt inject-std-version 1 "inject the current compiler version of libstd into programs"
420420
opt llvm-static-stdcpp 0 "statically link to libstdc++ for LLVM"
421-
opt rpath 1 "build rpaths into rustc itself"
421+
opt rpath 0 "build rpaths into rustc itself"
422422
opt nightly 0 "build nightly packages"
423423
opt verify-install 1 "verify installed binaries work"
424424
opt jemalloc 1 "build liballoc with jemalloc"

branches/try/man/rustc.1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,8 @@ A space-separated list of arguments to pass through to LLVM.
138138
If specified, the compiler will save more files (.bc, .o, .no-opt.bc) generated
139139
throughout compilation in the output directory.
140140
.TP
141-
\fBno-rpath\fR
142-
If specified, then the rpath value for dynamic libraries will not be set in
141+
\fBrpath\fR
142+
If specified, then the rpath value for dynamic libraries will be set in
143143
either dynamic library or executable outputs.
144144
.TP
145145
\fBno-prepopulate-passes\fR

branches/try/mk/main.mk

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
CFG_RELEASE_NUM=0.11.0
1717
CFG_RELEASE_LABEL=
1818

19+
CFG_FILENAME_EXTRA=4e7c5e5c
20+
1921
ifndef CFG_ENABLE_NIGHTLY
2022
# This is the normal version string
2123
CFG_RELEASE=$(CFG_RELEASE_NUM)$(CFG_RELEASE_LABEL)
@@ -120,8 +122,8 @@ endif
120122
ifdef TRACE
121123
CFG_RUSTC_FLAGS += -Z trace
122124
endif
123-
ifdef CFG_DISABLE_RPATH
124-
CFG_RUSTC_FLAGS += -C no-rpath
125+
ifdef CFG_ENABLE_RPATH
126+
CFG_RUSTC_FLAGS += -C rpath
125127
endif
126128

127129
# The executables crated during this compilation process have no need to include

branches/try/mk/target.mk

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,15 @@ $(foreach host,$(CFG_HOST), \
6868
# $(4) is the crate name
6969
define RUST_TARGET_STAGE_N
7070

71+
# NOTE: after a stage0 snap this should be just EXTRA_FILENAME, not with a stage
72+
# or target bound
73+
EXTRA_FILENAME_$(1)_$(2) = -C extra-filename=-$$(CFG_FILENAME_EXTRA)
74+
ifeq ($(1),0)
75+
ifeq ($$(CFG_BUILD),$(2))
76+
EXTRA_FILENAME_$(1)_$(2) =
77+
endif
78+
endif
79+
7180
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$(4): CFG_COMPILER_HOST_TRIPLE = $(2)
7281
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$(4): \
7382
$$(CRATEFILE_$(4)) \
@@ -85,7 +94,9 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$(4): \
8594
-L "$$(LLVM_LIBDIR_$(2))" \
8695
-L "$$(dir $$(LLVM_STDCPP_LOCATION_$(2)))" \
8796
$$(RUSTFLAGS_$(4)) \
88-
--out-dir $$(@D) $$<
97+
--out-dir $$(@D) \
98+
$$(EXTRA_FILENAME_$(1)_$(2)) \
99+
$$<
89100
@touch $$@
90101
$$(call LIST_ALL_OLD_GLOB_MATCHES,\
91102
$$(dir $$@)$$(call CFG_LIB_GLOB_$(2),$(4)))

branches/try/mk/tests.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ endif
171171
# Main test targets
172172
######################################################################
173173

174-
check: cleantmptestlogs cleantestlibs tidy check-notidy
174+
check: cleantmptestlogs cleantestlibs check-notidy tidy
175175

176176
check-notidy: cleantmptestlogs cleantestlibs all check-stage2
177177
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log

branches/try/src/compiletest/compiletest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ pub fn log_config(config: &Config) {
187187
opt_str(&config.filter
188188
.as_ref()
189189
.map(|re| {
190-
re.to_str().into_string()
190+
re.to_string().into_string()
191191
}))));
192192
logv(c, format!("runtool: {}", opt_str(&config.runtool)));
193193
logv(c, format!("host-rustcflags: {}",

branches/try/src/compiletest/errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pub fn load_errors(re: &Regex, testfile: &Path) -> Vec<ExpectedError> {
3131
fn parse_expected(line_num: uint, line: &str, re: &Regex) -> Option<ExpectedError> {
3232
re.captures(line).and_then(|caps| {
3333
let adjusts = caps.name("adjusts").len();
34-
let kind = caps.name("kind").to_ascii().to_lower().into_str();
34+
let kind = caps.name("kind").to_ascii().to_lower().into_string();
3535
let msg = caps.name("msg").trim().to_string();
3636

3737
debug!("line={} kind={} msg={}", line_num, kind, msg);

branches/try/src/compiletest/util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ pub fn make_new_path(path: &str) -> String {
4141
Some(curr) => {
4242
format!("{}{}{}", path, path_div(), curr)
4343
}
44-
None => path.to_str()
44+
None => path.to_string()
4545
}
4646
}
4747

branches/try/src/doc/guide-tasks.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ fn stringifier(channel: &DuplexStream<String, uint>) {
465465
let mut value: uint;
466466
loop {
467467
value = channel.recv();
468-
channel.send(value.to_str());
468+
channel.send(value.to_string());
469469
if value == 0 { break; }
470470
}
471471
}
@@ -478,7 +478,7 @@ send strings (the first type parameter) and receive `uint` messages
478478
(the second type parameter). The body itself simply loops, reading
479479
from the channel and then sending its response back. The actual
480480
response itself is simply the stringified version of the received value,
481-
`uint::to_str(value)`.
481+
`uint::to_string(value)`.
482482

483483
Here is the code for the parent task:
484484

@@ -492,7 +492,7 @@ use std::comm::duplex;
492492
# let mut value: uint;
493493
# loop {
494494
# value = channel.recv();
495-
# channel.send(value.to_str());
495+
# channel.send(value.to_string());
496496
# if value == 0u { break; }
497497
# }
498498
# }

branches/try/src/doc/guide.md

Lines changed: 51 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ You should see some output that looks something like this:
9191

9292
```{ignore}
9393
rustc 0.11.0-pre (443a1cd 2014-06-08 14:56:52 -0700)
94-
host: x86_64-unknown-linux-gnu
9594
```
9695

9796
If you did, Rust has been installed successfully! Congrats!
@@ -737,10 +736,10 @@ let x = (let y = 5i); // found `let` in ident position
737736
The compiler is telling us here that it was expecting to see the beginning of
738737
an expression, and a `let` can only begin a statement, not an expression.
739738

740-
However, re-assigning to a mutable binding is an expression:
739+
However, assigning to a variable binding is an expression:
741740

742741
```{rust}
743-
let mut x = 0i;
742+
let x;
744743
let y = x = 5i;
745744
```
746745

@@ -895,13 +894,14 @@ fn add_one(x: int) -> int {
895894
We would get an error:
896895

897896
```{ignore,notrust}
898-
note: consider removing this semicolon:
899-
x + 1;
900-
^
901897
error: not all control paths return a value
902898
fn add_one(x: int) -> int {
903899
x + 1;
904900
}
901+
902+
note: consider removing this semicolon:
903+
x + 1;
904+
^
905905
```
906906

907907
Remember our earlier discussions about semicolons and `()`? Our function claims
@@ -940,11 +940,54 @@ fn foo(x: int) -> int {
940940
There are some additional ways to define functions, but they involve features
941941
that we haven't learned about yet, so let's just leave it at that for now.
942942

943+
943944
## Comments
944945

945-
return
946+
Now that we have some functions, it's a good idea to learn about comments.
947+
Comments are notes that you leave to other programmers to help explain things
948+
about your code. The compiler mostly ignores them.
949+
950+
Rust has two kinds of comments that you should care about: **line comment**s
951+
and **doc comment**s.
952+
953+
```{rust}
954+
// Line comments are anything after '//' and extend to the end of the line.
955+
956+
let x = 5i; // this is also a line comment.
957+
958+
// If you have a long explanation for something, you can put line comments next
959+
// to each other. Put a space between the // and your comment so that it's
960+
// more readable.
961+
```
962+
963+
The other kind of comment is a doc comment. Doc comments use `///` instead of
964+
`//`, and support Markdown notation inside:
965+
966+
```{rust}
967+
/// `hello` is a function that prints a greeting that is personalized based on
968+
/// the name given.
969+
///
970+
/// # Arguments
971+
///
972+
/// * `name` - The name of the person you'd like to greet.
973+
///
974+
/// # Example
975+
///
976+
/// ```rust
977+
/// let name = "Steve";
978+
/// hello(name); // prints "Hello, Steve!"
979+
/// ```
980+
fn hello(name: &str) {
981+
println!("Hello, {}!", name);
982+
}
983+
```
984+
985+
When writing doc comments, adding sections for any arguments, return values,
986+
and providing some examples of usage is very, very helpful.
946987

947-
comments
988+
You can use the `rustdoc` tool to generate HTML documentation from these doc
989+
comments. We will talk more about `rustdoc` when we get to modules, as
990+
generally, you want to export documentation for a full module.
948991

949992
## Compound Data Types
950993

branches/try/src/doc/po/ja/complement-cheatsheet.md.po

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ msgstr ""
2323
#| "[tarball]: http://static.rust-lang.org/dist/rust-nightly.tar.gz [win-exe]: "
2424
#| "http://static.rust-lang.org/dist/rust-nightly-install.exe"
2525
msgid ""
26-
"Use [`ToStr`](http://static.rust-lang.org/doc/master/std/to_str/trait.ToStr."
26+
"Use [`ToString`](http://static.rust-lang.org/doc/master/std/to_str/trait.ToString."
2727
"html)."
2828
msgstr ""
2929
"[tarball]: http://static.rust-lang.org/dist/rust-nightly.tar.gz\n"
@@ -34,7 +34,7 @@ msgstr ""
3434
#, fuzzy
3535
#| msgid ""
3636
#| "~~~~ let x: f64 = 4.0; let y: uint = x as uint; assert!(y == 4u); ~~~~"
37-
msgid "~~~ let x: int = 42; let y: String = x.to_str(); ~~~"
37+
msgid "~~~ let x: int = 42; let y: String = x.to_string(); ~~~"
3838
msgstr ""
3939
"~~~~\n"
4040
"let x: f64 = 4.0;\n"

branches/try/src/doc/po/ja/rust.md.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1656,7 +1656,7 @@ msgstr ""
16561656
#| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
16571657
msgid ""
16581658
"impl Printable for int {\n"
1659-
" fn to_string(&self) -> String { self.to_str() }\n"
1659+
" fn to_string(&self) -> String { self.to_string() }\n"
16601660
"}\n"
16611661
msgstr ""
16621662
"~~~~ {.ignore}\n"

branches/try/src/doc/po/ja/tutorial.md.po

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4410,9 +4410,9 @@ msgstr ""
44104410

44114411
#. type: Plain text
44124412
#: src/doc/tutorial.md:2528
4413-
msgid "#[deriving(Rand, ToStr)] enum ABC { A, B, C } ~~~"
4413+
msgid "#[deriving(Rand, ToString)] enum ABC { A, B, C } ~~~"
44144414
msgstr ""
4415-
"#[deriving(Rand, ToStr)]\n"
4415+
"#[deriving(Rand, ToString)]\n"
44164416
"enum ABC { A, B, C }\n"
44174417
"~~~"
44184418

@@ -4422,15 +4422,15 @@ msgstr ""
44224422
#| msgid ""
44234423
#| "The full list of derivable traits is `Eq`, `TotalEq`, `Ord`, `TotalOrd`, "
44244424
#| "`Encodable` `Decodable`, `Clone`, `DeepClone`, `Hash`, `Rand`, "
4425-
#| "`Zero`, and `ToStr`."
4425+
#| "`Zero`, and `ToString`."
44264426
msgid ""
44274427
"The full list of derivable traits is `Eq`, `TotalEq`, `Ord`, `TotalOrd`, "
44284428
"`Encodable` `Decodable`, `Clone`, `DeepClone`, `Hash`, `Rand`, "
4429-
"`Default`, `Zero`, and `ToStr`."
4429+
"`Default`, `Zero`, and `ToString`."
44304430
msgstr ""
44314431
"実装を自動的に導出可能なトレイトは、 `Eq`, `TotalEq`, `Ord`, `TotalOrd`, "
44324432
"`Encodable` `Decodable`, `Clone`, `DeepClone`, `Hash`, `Rand`, `Zero`, "
4433-
"および `ToStr` です。."
4433+
"および `ToString` です。."
44344434

44354435
#. type: Plain text
44364436
#: src/doc/tutorial.md:2534

branches/try/src/doc/rust.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3671,15 +3671,15 @@ An example of an object type:
36713671

36723672
~~~~
36733673
trait Printable {
3674-
fn to_string(&self) -> String;
3674+
fn stringify(&self) -> String;
36753675
}
36763676
36773677
impl Printable for int {
3678-
fn to_string(&self) -> String { self.to_str() }
3678+
fn stringify(&self) -> String { self.to_string() }
36793679
}
36803680
36813681
fn print(a: Box<Printable>) {
3682-
println!("{}", a.to_string());
3682+
println!("{}", a.stringify());
36833683
}
36843684
36853685
fn main() {
@@ -3889,12 +3889,11 @@ by the prefix operator `box`. When the standard library is in use, the type of a
38893889
An example of an owned box type and value:
38903890

38913891
~~~~
3892-
38933892
let x: Box<int> = box 10;
38943893
~~~~
38953894

3896-
Owned box values exist in 1:1 correspondence with their heap allocation
3897-
copying an owned box value makes a shallow copy of the pointer
3895+
Owned box values exist in 1:1 correspondence with their heap allocation,
3896+
copying an owned box value makes a shallow copy of the pointer.
38983897
Rust will consider a shallow copy of an owned box to move ownership of the value. After a value has been moved, the source location cannot be used unless it is reinitialized.
38993898

39003899
~~~~

branches/try/src/doc/tutorial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3038,7 +3038,7 @@ fn main() {
30383038
~~~{.ignore}
30393039
// `b/mod.rs`
30403040
pub mod c;
3041-
pub fn foo() { println!("Foo!"; }
3041+
pub fn foo() { println!("Foo!"); }
30423042
~~~
30433043

30443044
~~~{.ignore}

branches/try/src/etc/vim/ftplugin/rust.vim

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ setlocal formatoptions-=t formatoptions+=croqnl
3131
" j was only added in 7.3.541, so stop complaints about its nonexistence
3232
silent! setlocal formatoptions+=j
3333

34+
" smartindent will be overridden by indentexpr if filetype indent is on, but
35+
" otherwise it's better than nothing.
36+
setlocal smartindent nocindent
37+
38+
setlocal tabstop=4 shiftwidth=4 expandtab
39+
3440
" This includeexpr isn't perfect, but it's a good start
3541
setlocal includeexpr=substitute(v:fname,'::','/','g')
3642

branches/try/src/etc/vim/syntax/rust.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ syn keyword rustTrait Copy Send Sized Share
6565
syn keyword rustTrait Add Sub Mul Div Rem Neg Not
6666
syn keyword rustTrait BitAnd BitOr BitXor
6767
syn keyword rustTrait Drop Deref DerefMut
68-
syn keyword rustTrait Shl Shr Index
68+
syn keyword rustTrait Shl Shr Index IndexMut
6969
syn keyword rustEnum Option
7070
syn keyword rustEnumVariant Some None
7171
syn keyword rustEnum Result
@@ -100,7 +100,7 @@ syn keyword rustTrait RawPtr
100100
syn keyword rustTrait Buffer Writer Reader Seek
101101
syn keyword rustTrait Str StrVector StrSlice OwnedStr
102102
syn keyword rustTrait IntoMaybeOwned StrAllocating
103-
syn keyword rustTrait ToStr IntoStr
103+
syn keyword rustTrait ToString IntoStr
104104
syn keyword rustTrait Tuple1 Tuple2 Tuple3 Tuple4
105105
syn keyword rustTrait Tuple5 Tuple6 Tuple7 Tuple8
106106
syn keyword rustTrait Tuple9 Tuple10 Tuple11 Tuple12

0 commit comments

Comments
 (0)