Skip to content

Commit abe78d0

Browse files
committed
---
yaml --- r: 130815 b: refs/heads/master c: 7864243 h: refs/heads/master i: 130813: f05497c 130811: 138cb94 130807: f088d43 130799: 61ee907 130783: 143cdaa 130751: f64daa5 130687: 040c695 130559: a2d37b4 v: v3
1 parent 6e4c00b commit abe78d0

File tree

134 files changed

+651
-1843
lines changed

Some content is hidden

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

134 files changed

+651
-1843
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: 1f4117f5182249d91c52cc3e384e4577356e1634
2+
refs/heads/master: 7864243380254fdd93435ef076f78d960f403a82
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 6faa4f33a42de32579e02a8d030db920d360e2b5
55
refs/heads/try: a2473a89da106f7dd3be86e9d52fe23f43d5bfa5

trunk/Makefile.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@
6565
#
6666
# * `VERBOSE=1` - Print all commands. Use this to see what's going on.
6767
# * `RUSTFLAGS=...` - Add compiler flags to all `rustc` invocations
68-
# * `JEMALLOC_FLAGS=...` - Pass flags to jemalloc's configure script
6968
#
7069
# * `TESTNAME=...` - Specify the name of tests to run
7170
# * `CHECK_IGNORED=1` - Run normally-ignored tests

trunk/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

trunk/configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@ then
707707
| cut -d ' ' -f 2)
708708

709709
case $CFG_CLANG_VERSION in
710-
(3.0svn | 3.0 | 3.1* | 3.2* | 3.3* | 3.4* | 3.5* | 3.6*)
710+
(3.0svn | 3.0 | 3.1* | 3.2* | 3.3* | 3.4* | 3.5* )
711711
step_msg "found ok version of CLANG: $CFG_CLANG_VERSION"
712712
if [ -z "$CC" ]
713713
then

trunk/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

trunk/mk/docs.mk

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

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

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

9697

@@ -187,12 +188,25 @@ doc/$(1).tex: $$(D)/$(1).md doc/footer.tex doc/version.tex | doc/
187188
ifneq ($(NO_PDF_DOCS),1)
188189
ifeq ($$(SHOULD_BUILD_PDF_DOC_$(1)),1)
189190
DOC_TARGETS += doc/$(1).pdf
191+
ifneq ($(XELATEX),1)
190192
doc/$(1).pdf: doc/$(1).tex
191193
@$$(call E, latex compiler: $$@)
192194
$$(Q)$$(CFG_LATEX) \
193195
-interaction=batchmode \
194196
-output-directory=doc \
195197
$$<
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
196210
endif # SHOULD_BUILD_PDF_DOCS_$(1)
197211
endif # NO_PDF_DOCS
198212

trunk/mk/main.mk

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,19 +90,15 @@ endif
9090
CFG_RUSTC_FLAGS := $(RUSTFLAGS)
9191
CFG_GCCISH_CFLAGS :=
9292
CFG_GCCISH_LINK_FLAGS :=
93-
CFG_JEMALLOC_FLAGS :=
9493

9594
ifdef CFG_DISABLE_OPTIMIZE
9695
$(info cfg: disabling rustc optimization (CFG_DISABLE_OPTIMIZE))
9796
CFG_RUSTC_FLAGS +=
98-
CFG_JEMALLOC_FLAGS += --enable-debug
9997
else
10098
# The rtopt cfg turns off runtime sanity checks
10199
CFG_RUSTC_FLAGS += -O --cfg rtopt
102100
endif
103101

104-
CFG_JEMALLOC_FLAGS += $(JEMALLOC_FLAGS)
105-
106102
ifdef CFG_DISABLE_DEBUG
107103
CFG_RUSTC_FLAGS += --cfg ndebug
108104
CFG_GCCISH_CFLAGS += -DRUST_NDEBUG

trunk/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

trunk/mk/rt.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ JEMALLOC_LOCAL_$(1) := $$(JEMALLOC_BUILD_DIR_$(1))/lib/$$(JEMALLOC_REAL_NAME_$(1
301301
$$(JEMALLOC_LOCAL_$(1)): $$(JEMALLOC_DEPS) $$(MKFILE_DEPS)
302302
@$$(call E, make: jemalloc)
303303
cd "$$(JEMALLOC_BUILD_DIR_$(1))"; "$(S)src/jemalloc/configure" \
304-
$$(JEMALLOC_ARGS_$(1)) --with-jemalloc-prefix=je_ $(CFG_JEMALLOC_FLAGS) \
304+
$$(JEMALLOC_ARGS_$(1)) --with-jemalloc-prefix=je_ \
305305
--build=$(CFG_BUILD) --host=$(1) \
306306
CC="$$(CC_$(1))" \
307307
AR="$$(AR_$(1))" \

trunk/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)

0 commit comments

Comments
 (0)