Skip to content

Commit d150702

Browse files
committed
---
yaml --- r: 130957 b: refs/heads/auto c: faf14ae h: refs/heads/master i: 130955: 29a2df4 v: v3
1 parent 6fe683d commit d150702

Some content is hidden

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

62 files changed

+270
-1206
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: 1dc31953e7d1df1560ea43a13d19973a1374730d
16+
refs/heads/auto: faf14ae63308fc75ee59448f215a38db73dae645
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/README.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -101,18 +101,6 @@ There is a lot more documentation in the [wiki].
101101

102102
[wiki]: https://github.com/rust-lang/rust/wiki
103103

104-
## Getting help and getting involved
105-
106-
The Rust community congregates in a few places:
107-
108-
* [StackOverflow] - Get help here.
109-
* [/r/rust] - General discussion.
110-
* [discuss.rust-lang.org] - For development of the Rust language itself.
111-
112-
[StackOverflow]: http://stackoverflow.com/questions/tagged/rust
113-
[/r/rust]: http://reddit.com/r/rust
114-
[discuss.rust-lang.org]: http://discuss.rust-lang.org/
115-
116104
## License
117105

118106
Rust is primarily distributed under the terms of both the MIT license

branches/auto/mk/dist.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ distcheck-tar-src: dist-tar-src
112112

113113
ifdef CFG_ISCC
114114

115-
PKG_EXE = dist/$(PKG_NAME)-$(CFG_BUILD).exe
115+
PKG_EXE = dist/$(PKG_NAME)-install.exe
116116

117117
%.iss: $(S)src/etc/pkg/%.iss
118118
cp $< $@
@@ -123,7 +123,7 @@ PKG_EXE = dist/$(PKG_NAME)-$(CFG_BUILD).exe
123123
$(PKG_EXE): rust.iss modpath.iss upgrade.iss LICENSE.txt rust-logo.ico \
124124
$(CSREQ3_T_$(CFG_BUILD)_H_$(CFG_BUILD)) \
125125
dist-prepare-win
126-
$(CFG_PYTHON) $(S)src/etc/copy-runtime-deps.py tmp/dist/win/bin $(CFG_BUILD)
126+
$(CFG_PYTHON) $(S)src/etc/copy-runtime-deps.py tmp/dist/win/bin
127127
@$(call E, ISCC: $@)
128128
$(Q)"$(CFG_ISCC)" $<
129129

branches/auto/mk/docs.mk

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -76,22 +76,21 @@ endif
7676

7777
# Check for the various external utilities for the EPUB/PDF docs:
7878

79-
ifeq ($(CFG_LUALATEX),)
80-
$(info cfg: no lualatex found, deferring to xelatex)
79+
ifeq ($(CFG_PDFLATEX),)
80+
$(info cfg: no pdflatex found, deferring to xelatex)
8181
ifeq ($(CFG_XELATEX),)
82-
$(info cfg: no xelatex found, deferring to pdflatex)
83-
ifeq ($(CFG_PDFLATEX),)
84-
$(info cfg: no pdflatex found, disabling LaTeX docs)
82+
$(info cfg: no xelatex found, deferring to lualatex)
83+
ifeq ($(CFG_LUALATEX),)
84+
$(info cfg: no lualatex found, disabling LaTeX docs)
8585
NO_PDF_DOCS = 1
8686
else
87-
CFG_LATEX := $(CFG_PDFLATEX)
87+
CFG_LATEX := $(CFG_LUALATEX)
8888
endif
8989
else
9090
CFG_LATEX := $(CFG_XELATEX)
91-
XELATEX = 1
9291
endif
9392
else
94-
CFG_LATEX := $(CFG_LUALATEX)
93+
CFG_LATEX := $(CFG_PDFLATEX)
9594
endif
9695

9796

@@ -188,25 +187,12 @@ doc/$(1).tex: $$(D)/$(1).md doc/footer.tex doc/version.tex | doc/
188187
ifneq ($(NO_PDF_DOCS),1)
189188
ifeq ($$(SHOULD_BUILD_PDF_DOC_$(1)),1)
190189
DOC_TARGETS += doc/$(1).pdf
191-
ifneq ($(XELATEX),1)
192190
doc/$(1).pdf: doc/$(1).tex
193191
@$$(call E, latex compiler: $$@)
194192
$$(Q)$$(CFG_LATEX) \
195193
-interaction=batchmode \
196194
-output-directory=doc \
197195
$$<
198-
else
199-
# The version of xelatex on the snap bots seemingly ingores -output-directory
200-
# So we'll output to . and move to the doc directory manually.
201-
# This will leave some intermediate files in the build directory.
202-
doc/$(1).pdf: doc/$(1).tex
203-
@$$(call E, latex compiler: $$@)
204-
$$(Q)$$(CFG_LATEX) \
205-
-interaction=batchmode \
206-
-output-directory=. \
207-
$$<
208-
$$(Q)mv ./$(1).pdf $$@
209-
endif # XELATEX
210196
endif # SHOULD_BUILD_PDF_DOCS_$(1)
211197
endif # NO_PDF_DOCS
212198

branches/auto/mk/reconfig.mk

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,7 @@ rwildcard=$(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2) \
1515

1616
ifndef CFG_DISABLE_MANAGE_SUBMODULES
1717
# This is a pretty expensive operation but I don't see any way to avoid it
18-
# NB: This only looks for '+' status (wrong commit checked out), not '-' status
19-
# (nothing checked out at all). `./configure --{llvm,jemalloc,libuv}-root`
20-
# will explicitly deinitialize the corresponding submodules, and we don't
21-
# want to force constant rebuilds in that case.
22-
NEED_GIT_RECONFIG=$(shell cd "$(CFG_SRC_DIR)" && "$(CFG_GIT)" submodule status | grep -c '^+')
18+
NEED_GIT_RECONFIG=$(shell cd "$(CFG_SRC_DIR)" && "$(CFG_GIT)" submodule status | grep -c '^\(+\|-\)')
2319
else
2420
NEED_GIT_RECONFIG=0
2521
endif

branches/auto/src/doc/guide-strings.md

Lines changed: 3 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -92,33 +92,9 @@ fn foo(s: String) {
9292
```
9393

9494
If you have good reason. It's not polite to hold on to ownership you don't
95-
need, and it can make your lifetimes more complex.
96-
97-
## Generic functions
98-
99-
To write a function that's generic over types of strings, use [the `Str`
100-
trait](http://doc.rust-lang.org/std/str/trait.Str.html):
101-
102-
```{rust}
103-
fn some_string_length<T: Str>(x: T) -> uint {
104-
x.as_slice().len()
105-
}
106-
107-
fn main() {
108-
let s = "Hello, world";
109-
110-
println!("{}", some_string_length(s));
111-
112-
let s = "Hello, world".to_string();
113-
114-
println!("{}", some_string_length(s));
115-
}
116-
```
117-
118-
Both of these lines will print `12`.
119-
120-
The only method that the `Str` trait has is `as_slice()`, which gives you
121-
access to a `&str` value from the underlying string.
95+
need, and it can make your lifetimes more complex. Furthermore, you can pass
96+
either kind of string into `foo` by using `.as_slice()` on any `String` you
97+
need to pass in, so the `&str` version is more flexible.
12298

12399
## Comparisons
124100

@@ -145,65 +121,6 @@ fn compare(string: String) {
145121
Converting a `String` to a `&str` is cheap, but converting the `&str` to a
146122
`String` involves an allocation.
147123

148-
## Indexing strings
149-
150-
You may be tempted to try to access a certain character of a `String`, like
151-
this:
152-
153-
```{rust,ignore}
154-
let s = "hello".to_string();
155-
156-
println!("{}", s[0]);
157-
```
158-
159-
This does not compile. This is on purpose. In the world of UTF-8, direct
160-
indexing is basically never what you want to do. The reason is that each
161-
character can be a variable number of bytes. This means that you have to iterate
162-
through the characters anyway, which is a O(n) operation.
163-
164-
To iterate over a string, use the `graphemes()` method on `&str`:
165-
166-
```{rust}
167-
let s = "αἰθήρ";
168-
169-
for l in s.graphemes(true) {
170-
println!("{}", l);
171-
}
172-
```
173-
174-
Note that `l` has the type `&str` here, since a single grapheme can consist of
175-
multiple codepoints, so a `char` wouldn't be appropriate.
176-
177-
This will print out each character in turn, as you'd expect: first "α", then
178-
"ἰ", etc. You can see that this is different than just the individual bytes.
179-
Here's a version that prints out each byte:
180-
181-
```{rust}
182-
let s = "αἰθήρ";
183-
184-
for l in s.bytes() {
185-
println!("{}", l);
186-
}
187-
```
188-
189-
This will print:
190-
191-
```{notrust,ignore}
192-
206
193-
177
194-
225
195-
188
196-
176
197-
206
198-
184
199-
206
200-
174
201-
207
202-
129
203-
```
204-
205-
Many more bytes than graphemes!
206-
207124
# Other Documentation
208125

209126
* [the `&str` API documentation](/std/str/index.html)

branches/auto/src/doc/guide.md

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ in your file name, use an underscore. `hello_world.rs` versus `goodbye.rs`.
150150

151151
Now that you've got your file open, type this in:
152152

153-
```{rust}
153+
```
154154
fn main() {
155155
println!("Hello, world!");
156156
}
@@ -166,7 +166,7 @@ Hello, world!
166166

167167
Success! Let's go over what just happened in detail.
168168

169-
```{rust}
169+
```
170170
fn main() {
171171
172172
}
@@ -186,7 +186,7 @@ declaration, with one space in between.
186186

187187
Next up is this line:
188188

189-
```{rust}
189+
```
190190
println!("Hello, world!");
191191
```
192192

@@ -562,7 +562,7 @@ the block is executed. If it's `false`, then it is not.
562562

563563
If you want something to happen in the `false` case, use an `else`:
564564

565-
```{rust}
565+
```
566566
let x = 5i;
567567
568568
if x == 5i {
@@ -574,8 +574,7 @@ if x == 5i {
574574

575575
This is all pretty standard. However, you can also do this:
576576

577-
578-
```{rust}
577+
```
579578
let x = 5i;
580579
581580
let y = if x == 5i {
@@ -587,7 +586,7 @@ let y = if x == 5i {
587586

588587
Which we can (and probably should) write like this:
589588

590-
```{rust}
589+
```
591590
let x = 5i;
592591
593592
let y = if x == 5i { 10i } else { 15i };
@@ -644,7 +643,7 @@ every line of Rust code you see.
644643
What is this exception that makes us say 'almost?' You saw it already, in this
645644
code:
646645

647-
```{rust}
646+
```
648647
let x = 5i;
649648
650649
let y: int = if x == 5i { 10i } else { 15i };
@@ -990,7 +989,7 @@ notation: `origin.x`.
990989
The values in structs are immutable, like other bindings in Rust. However, you
991990
can use `mut` to make them mutable:
992991

993-
```{rust}
992+
```rust
994993
struct Point {
995994
x: int,
996995
y: int,
@@ -1014,7 +1013,7 @@ called a **tuple struct**. Tuple structs do have a name, but their fields
10141013
don't:
10151014

10161015

1017-
```{rust}
1016+
```
10181017
struct Color(int, int, int);
10191018
struct Point(int, int, int);
10201019
```
@@ -1029,7 +1028,7 @@ let origin = Point(0, 0, 0);
10291028
It is almost always better to use a struct than a tuple struct. We would write
10301029
`Color` and `Point` like this instead:
10311030

1032-
```{rust}
1031+
```rust
10331032
struct Color {
10341033
red: int,
10351034
blue: int,
@@ -1050,7 +1049,7 @@ There _is_ one case when a tuple struct is very useful, though, and that's a
10501049
tuple struct with only one element. We call this a 'newtype,' because it lets
10511050
you create a new type that's a synonym for another one:
10521051

1053-
```{rust}
1052+
```
10541053
struct Inches(int);
10551054
10561055
let length = Inches(10);
@@ -1167,7 +1166,7 @@ what's the solution?
11671166
Rust has a keyword, `match`, that allows you to replace complicated `if`/`else`
11681167
groupings with something more powerful. Check it out:
11691168

1170-
```{rust}
1169+
```rust
11711170
let x = 5i;
11721171

11731172
match x {
@@ -1408,7 +1407,7 @@ We now loop forever with `loop`, and use `break` to break out early.
14081407
`continue` is similar, but instead of ending the loop, goes to the next
14091408
iteration: This will only print the odd numbers:
14101409

1411-
```{rust}
1410+
```
14121411
for x in range(0i, 10i) {
14131412
if x % 2 == 0 { continue; }
14141413
@@ -4123,7 +4122,7 @@ the ability to use this **method call syntax** via the `impl` keyword.
41234122

41244123
Here's how it works:
41254124

4126-
```{rust}
4125+
```
41274126
struct Circle {
41284127
x: f64,
41294128
y: f64,
@@ -4162,7 +4161,7 @@ multiplications later, and we have our area.
41624161
You can also define methods that do not take a `self` parameter. Here's a
41634162
pattern that's very common in Rust code:
41644163

4165-
```{rust}
4164+
```
41664165
struct Circle {
41674166
x: f64,
41684167
y: f64,

branches/auto/src/doc/index.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,6 @@ discussion about Rust.
4343
There is also a [developer forum](http://discuss.rust-lang.org/), where the
4444
development of Rust itself is discussed.
4545

46-
# Specification
47-
48-
Rust does not have an exact specification, but an effort to describe as much of
49-
the language in as much detail as possible is in [the manual](rust.html).
5046

5147
# Guides
5248

0 commit comments

Comments
 (0)