Skip to content

Commit e985ba1

Browse files
committed
---
yaml --- r: 138143 b: refs/heads/try c: 5e1e245 h: refs/heads/master i: 138141: 5a0b32a 138139: 5bb3015 138135: 768443b 138127: f962789 138111: 62c3f14 v: v3
1 parent 25fe660 commit e985ba1

Some content is hidden

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

68 files changed

+510
-353
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: b6e0d3a5bf4c88650a22f605f822e02c6b163580
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
5-
refs/heads/try: 0e1e9cbb136e36ef30820fdee72eab5b11a8dec3
5+
refs/heads/try: 5e1e2456ed7e06c2341893118659efaee35fc391
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/mk/tests.mk

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,14 +199,29 @@ check-docs: cleantestlibs cleantmptestlogs check-stage2-docs
199199

200200
# Some less critical tests that are not prone to breakage.
201201
# Not run as part of the normal test suite, but tested by bors on checkin.
202-
check-secondary: check-lexer check-pretty
202+
check-secondary: check-build-compiletest check-lexer check-pretty
203203

204204
# check + check-secondary.
205-
check-all: check check-secondary
205+
#
206+
# Issue #17883: build check-secondary first so hidden dependencies in
207+
# e.g. building compiletest are exercised (resolve those by adding
208+
# deps to rules that need them; not by putting `check` first here).
209+
check-all: check-secondary check
206210

207211
# Pretty-printing tests.
208212
check-pretty: check-stage2-T-$(CFG_BUILD)-H-$(CFG_BUILD)-pretty-exec
209213

214+
define DEF_CHECK_BUILD_COMPILETEST_FOR_STAGE
215+
check-stage$(1)-build-compiletest: $$(HBIN$(1)_H_$(CFG_BUILD))/compiletest$$(X_$(CFG_BUILD))
216+
endef
217+
218+
$(foreach stage,$(STAGES), \
219+
$(eval $(call DEF_CHECK_BUILD_COMPILETEST_FOR_STAGE,$(stage))))
220+
221+
check-build-compiletest: \
222+
check-stage1-build-compiletest \
223+
check-stage2-build-compiletest
224+
210225
.PHONY: cleantmptestlogs cleantestlibs
211226

212227
cleantmptestlogs:
@@ -284,7 +299,7 @@ tidy:
284299
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
285300
$(Q)echo $(ALL_HS) \
286301
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
287-
$(Q)find $(S)src -type f -perm a+x \
302+
$(Q)find $(S)src -type f -perm +a+x \
288303
-not -name '*.rs' -and -not -name '*.py' \
289304
-and -not -name '*.sh' \
290305
| grep '^$(S)src/jemalloc' -v \
@@ -720,6 +735,13 @@ PRETTY_DEPS_pretty-rpass-full = $(RPASS_FULL_TESTS)
720735
PRETTY_DEPS_pretty-rfail = $(RFAIL_TESTS)
721736
PRETTY_DEPS_pretty-bench = $(BENCH_TESTS)
722737
PRETTY_DEPS_pretty-pretty = $(PRETTY_TESTS)
738+
# The stage- and host-specific dependencies are for e.g. macro_crate_test which pulls in
739+
# external crates.
740+
PRETTY_DEPS$(1)_H_$(3)_pretty-rpass =
741+
PRETTY_DEPS$(1)_H_$(3)_pretty-rpass-full = $$(HLIB$(1)_H_$(3))/stamp.syntax $$(HLIB$(1)_H_$(3))/stamp.rustc
742+
PRETTY_DEPS$(1)_H_$(3)_pretty-rfail =
743+
PRETTY_DEPS$(1)_H_$(3)_pretty-bench =
744+
PRETTY_DEPS$(1)_H_$(3)_pretty-pretty =
723745
PRETTY_DIRNAME_pretty-rpass = run-pass
724746
PRETTY_DIRNAME_pretty-rpass-full = run-pass-fulldeps
725747
PRETTY_DIRNAME_pretty-rfail = run-fail
@@ -738,7 +760,8 @@ check-stage$(1)-T-$(2)-H-$(3)-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4
738760

739761
$$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
740762
$$(TEST_SREQ$(1)_T_$(2)_H_$(3)) \
741-
$$(PRETTY_DEPS_$(4))
763+
$$(PRETTY_DEPS_$(4)) \
764+
$$(PRETTY_DEPS$(1)_H_$(3)_$(4))
742765
@$$(call E, run pretty-rpass [$(2)]: $$<)
743766
$$(Q)$$(call CFG_RUN_CTEST_$(2),$(1),$$<,$(3)) \
744767
$$(PRETTY_ARGS$(1)-T-$(2)-H-$(3)-$(4)) \

branches/try/src/compiletest/runtest.rs

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -947,15 +947,12 @@ fn check_expected_errors(expected_errors: Vec<errors::ExpectedError> ,
947947
String::from_chars(c.as_slice())
948948
}
949949

950-
#[cfg(target_os = "windows")]
950+
#[cfg(windows)]
951951
fn prefix_matches( line : &str, prefix : &str ) -> bool {
952952
to_lower(line).as_slice().starts_with(to_lower(prefix).as_slice())
953953
}
954954

955-
#[cfg(any(target_os = "linux",
956-
target_os = "macos",
957-
target_os = "freebsd",
958-
target_os = "dragonfly"))]
955+
#[cfg(unix)]
959956
fn prefix_matches( line : &str, prefix : &str ) -> bool {
960957
line.starts_with( prefix )
961958
}
@@ -1356,24 +1353,21 @@ fn program_output(config: &Config, testfile: &Path, lib_path: &str, prog: String
13561353
}
13571354

13581355
// Linux and mac don't require adjusting the library search path
1359-
#[cfg(any(target_os = "linux",
1360-
target_os = "macos",
1361-
target_os = "freebsd",
1362-
target_os = "dragonfly"))]
1356+
#[cfg(unix)]
13631357
fn make_cmdline(_libpath: &str, prog: &str, args: &[String]) -> String {
13641358
format!("{} {}", prog, args.connect(" "))
13651359
}
13661360

1367-
#[cfg(target_os = "windows")]
1361+
#[cfg(windows)]
13681362
fn make_cmdline(libpath: &str, prog: &str, args: &[String]) -> String {
1369-
format!("{} {} {}", lib_path_cmd_prefix(libpath), prog, args.connect(" "))
1370-
}
13711363

1372-
// Build the LD_LIBRARY_PATH variable as it would be seen on the command line
1373-
// for diagnostic purposes
1374-
#[cfg(target_os = "windows")]
1375-
fn lib_path_cmd_prefix(path: &str) -> String {
1376-
format!("{}=\"{}\"", util::lib_path_env_var(), util::make_new_path(path))
1364+
// Build the LD_LIBRARY_PATH variable as it would be seen on the command line
1365+
// for diagnostic purposes
1366+
fn lib_path_cmd_prefix(path: &str) -> String {
1367+
format!("{}=\"{}\"", util::lib_path_env_var(), util::make_new_path(path))
1368+
}
1369+
1370+
format!("{} {} {}", lib_path_cmd_prefix(libpath), prog, args.connect(" "))
13771371
}
13781372

13791373
fn dump_output(config: &Config, testfile: &Path, out: &str, err: &str) {

branches/try/src/doc/README.md

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# Dependencies
1+
# Rust documentations
2+
3+
## Dependencies
24

35
[Pandoc](http://johnmacfarlane.net/pandoc/installing.html), a universal
46
document converter, is required to generate docs as HTML from Rust's
@@ -10,7 +12,7 @@ docs from the master (English) docs.
1012
[GNU gettext](http://www.gnu.org/software/gettext/) is required for managing
1113
the translation data.
1214

13-
# Building
15+
## Building
1416

1517
To generate all the docs, just run `make docs` from the root of the repository.
1618
This will convert the distributed Markdown docs to HTML and generate HTML doc
@@ -24,7 +26,7 @@ rustdoc --output html-doc/ --output-format html ../src/libstd/path.rs
2426

2527
(This, of course, requires a working build of the `rustdoc` tool.)
2628

27-
# Additional notes
29+
## Additional notes
2830

2931
To generate an HTML version of a doc from Markdown manually, you can do
3032
something like:
@@ -33,37 +35,39 @@ something like:
3335
pandoc --from=markdown --to=html5 --number-sections -o reference.html reference.md
3436
~~~~
3537

36-
(reference.md being the Rust Reference Manual.)
38+
(`reference.md` being the Rust Reference Manual.)
3739

3840
The syntax for pandoc flavored markdown can be found at:
39-
http://johnmacfarlane.net/pandoc/README.html#pandocs-markdown
41+
42+
- http://johnmacfarlane.net/pandoc/README.html#pandocs-markdown
4043

4144
A nice quick reference (for non-pandoc markdown) is at:
42-
http://kramdown.rubyforge.org/quickref.html
4345

44-
# Notes for translators
46+
- http://kramdown.gettalong.org/quickref.html
47+
48+
## Notes for translators
4549

4650
Notice: The procedure described below is a work in progress. We are working on
4751
translation system but the procedure contains some manual operations for now.
4852

49-
To start the translation for a new language, see po4a.conf at first.
53+
To start the translation for a new language, see `po4a.conf` at first.
5054

51-
To generate .pot and .po files, do something like:
55+
To generate `.pot` and `.po` files, do something like:
5256

5357
~~~~
5458
po4a --copyright-holder="The Rust Project Developers" \
5559
--package-name="Rust" \
56-
--package-version="0.11.0" \
60+
--package-version="0.13.0" \
5761
-M UTF-8 -L UTF-8 \
5862
src/doc/po4a.conf
5963
~~~~
6064

61-
(the version number must be changed if it is not 0.11.0 now.)
65+
(the version number must be changed if it is not `0.13.0` now.)
6266

63-
Now you can translate documents with .po files, commonly used with gettext. If
67+
Now you can translate documents with `.po` files, commonly used with gettext. If
6468
you are not familiar with gettext-based translation, please read the online
6569
manual linked from http://www.gnu.org/software/gettext/ . We use UTF-8 as the
66-
file encoding of .po files.
70+
file encoding of `.po` files.
6771

6872
When you want to make a commit, do the command below before staging your
6973
change:
@@ -79,4 +83,4 @@ for f in src/doc/po/**/*.po; do
7983
done
8084
~~~~
8185

82-
This removes untranslated entries from .po files to save disk space.
86+
This removes untranslated entries from `.po` files to save disk space.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ fn main() {
298298
C code:
299299

300300
~~~~c
301-
typedef void (*rust_callback)(int32_t);
301+
typedef void (*rust_callback)(void*, int32_t);
302302
void* cb_target;
303303
rust_callback cb;
304304

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,5 +206,5 @@ Many more bytes than graphemes!
206206

207207
# Other Documentation
208208

209-
* [the `&str` API documentation](/std/str/index.html)
209+
* [the `&str` API documentation](std/str/index.html)
210210
* [the `String` API documentation](std/string/index.html)

branches/try/src/doc/guide.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1746,8 +1746,7 @@ For our first project, we'll implement a classic beginner programming problem:
17461746
the guessing game. Here's how it works: Our program will generate a random
17471747
integer between one and a hundred. It will then prompt us to enter a guess.
17481748
Upon entering our guess, it will tell us if we're too low or too high. Once we
1749-
guess correctly, it will congratulate us, and print the number of guesses we've
1750-
taken to the screen. Sound good?
1749+
guess correctly, it will congratulate us. Sound good?
17511750

17521751
## Set up
17531752

@@ -3538,9 +3537,8 @@ restriction:
35383537

35393538
1. If the borrow is immutable, you may read the data the pointer points to.
35403539
2. If the borrow is mutable, you may read and write the data the pointer points to.
3541-
3. You may lend the pointer to someone else in an immutable fashion, **BUT**
3542-
4. When you do so, they must return it to you before you must give your own
3543-
borrow back.
3540+
3. You may lend the pointer to someone else, **BUT**
3541+
4. When you do so, they must return it before you can give your own borrow back.
35443542

35453543
This last requirement can seem odd, but it also makes sense. If you have to
35463544
return something, and you've lent it to someone, they need to give it back to
@@ -5062,8 +5060,8 @@ println!("The value of x[0] is: {}", x[0]); // error: use of moved value: `x`
50625060
```
50635061

50645062
`x` is now owned by the proc, and so we can't use it anymore. Many other
5065-
languages would let us do this, but it's not safe to do so. Rust's type system
5066-
catches the error.
5063+
languages would let us do this, but it's not safe to do so. Rust's borrow
5064+
checker catches the error.
50675065

50685066
If tasks were only able to capture these values, they wouldn't be very useful.
50695067
Luckily, tasks can communicate with each other through **channel**s. Channels

branches/try/src/doc/reference.md

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -185,40 +185,24 @@ grammar as double-quoted strings. Other tokens have exact rules given.
185185

186186
### Keywords
187187

188-
The keywords are the following strings, organized by first letter:
188+
<p id="keyword-table-marker">The keywords are the following strings, organized by first letter:</p>
189189

190-
<div id="keywords">
191190
| | | | |
192191
|----------|--------|--------|-------|
193192
| as | | | |
194-
|----------|--------|--------|-------|
195193
| box | break | | |
196-
|----------|--------|--------|-------|
197194
| continue | crate | | |
198-
|----------|--------|--------|-------|
199195
| else | enum | extern | |
200-
|----------|--------|--------|-------|
201196
| false | fn | for | |
202-
|----------|--------|--------|-------|
203197
| if | impl | in | |
204-
|----------|--------|--------|-------|
205198
| let | loop | | |
206-
|----------|--------|--------|-------|
207199
| match | mod | mut | |
208-
|----------|--------|--------|-------|
209200
| priv | proc | pub | |
210-
|----------|--------|--------|-------|
211201
| ref | return | | |
212-
|----------|--------|--------|-------|
213202
| self | static | struct | super |
214-
|----------|--------|--------|-------|
215203
| trait | true | type | |
216-
|----------|--------|--------|-------|
217204
| unsafe | use | | |
218-
|----------|--------|--------|-------|
219205
| while | | | |
220-
|----------|--------|--------|-------|
221-
</div>
222206

223207
Each of these keywords has special meaning in its grammar, and all of them are
224208
excluded from the `ident` rule.

branches/try/src/doc/rust.css

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,4 +393,9 @@ pre.rust { position: relative; }
393393
}
394394
}
395395

396-
#keywords table td { border: none; }
396+
#keyword-table-marker + table thead { display: none; }
397+
#keyword-table-marker + table td { border: none; }
398+
#keyword-table-marker + table {
399+
margin-left: 2em;
400+
margin-bottom: 1em;
401+
}

branches/try/src/etc/unicode.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -604,6 +604,15 @@ def optimize_width_table(wtable):
604604
rf.write(preamble)
605605

606606
# download and parse all the data
607+
fetch("ReadMe.txt")
608+
with open("ReadMe.txt") as readme:
609+
pattern = "for Version (\d+)\.(\d+)\.(\d+) of the Unicode"
610+
unicode_version = re.search(pattern, readme.read()).groups()
611+
rf.write("""
612+
/// The version of [Unicode](http://www.unicode.org/)
613+
/// that the `UnicodeChar` and `UnicodeStrSlice` traits are based on.
614+
pub const UNICODE_VERSION: (uint, uint, uint) = (%s, %s, %s);
615+
""" % unicode_version)
607616
(canon_decomp, compat_decomp, gencats, combines,
608617
lowerupper, upperlower) = load_unicode_data("UnicodeData.txt")
609618
want_derived = ["XID_Start", "XID_Continue", "Alphabetic", "Lowercase", "Uppercase"]

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,16 @@ syn keyword rustKeyword for in if impl let
2727
syn keyword rustKeyword loop once proc pub
2828
syn keyword rustKeyword return super
2929
syn keyword rustKeyword unsafe virtual where while
30-
syn keyword rustKeyword use nextgroup=rustModPath,rustModPathInUse skipwhite skipempty
30+
syn keyword rustKeyword use nextgroup=rustModPath skipwhite skipempty
3131
" FIXME: Scoped impl's name is also fallen in this category
3232
syn keyword rustKeyword mod trait struct enum type nextgroup=rustIdentifier skipwhite skipempty
3333
syn keyword rustStorage mut ref static const
3434

3535
syn keyword rustInvalidBareKeyword crate
3636

37-
syn keyword rustExternCrate crate contained nextgroup=rustIdentifier skipwhite skipempty
37+
syn keyword rustExternCrate crate contained nextgroup=rustIdentifier,rustExternCrateString skipwhite skipempty
38+
" This is to get the `bar` part of `extern crate "foo" as bar;` highlighting.
39+
syn match rustExternCrateString /".*"\_s*as/ contained nextgroup=rustIdentifier skipwhite transparent skipempty contains=rustString,rustOperator
3840
syn keyword rustObsoleteExternMod mod contained nextgroup=rustIdentifier skipwhite skipempty
3941

4042
syn match rustIdentifier contains=rustIdentifierPrime "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained
@@ -131,9 +133,7 @@ syn keyword rustBoolean true false
131133
" If foo::bar changes to foo.bar, change this ("::" to "\.").
132134
" If foo::bar changes to Foo::bar, change this (first "\w" to "\u").
133135
syn match rustModPath "\w\(\w\)*::[^<]"he=e-3,me=e-3
134-
syn match rustModPathInUse "\w\(\w\)*" contained " only for 'use path;'
135136
syn match rustModPathSep "::"
136-
" rustModPathInUse is split out from rustModPath so that :syn-include can get the group list right.
137137

138138
syn match rustFuncCall "\w\(\w\)*("he=e-1,me=e-1
139139
syn match rustFuncCall "\w\(\w\)*::<"he=e-3,me=e-3 " foo::<T>();
@@ -172,9 +172,10 @@ syn match rustOctNumber display "\<0o[0-7_]\+\%([iu]\%(8\|16\|32\|64\)\=\)
172172
syn match rustBinNumber display "\<0b[01_]\+\%([iu]\%(8\|16\|32\|64\)\=\)\="
173173

174174
" Special case for numbers of the form "1." which are float literals, unless followed by
175-
" an identifier, which makes them integer literals with a method call or field access.
175+
" an identifier, which makes them integer literals with a method call or field access,
176+
" or by another ".", which makes them integer literals followed by the ".." token.
176177
" (This must go first so the others take precedence.)
177-
syn match rustFloat display "\<[0-9][0-9_]*\.\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\@!"
178+
syn match rustFloat display "\<[0-9][0-9_]*\.\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\|\.\)\@!"
178179
" To mark a number as a normal float, it must have at least one of the three things integral values don't have:
179180
" a decimal point and more numbers; an exponent; and a type suffix.
180181
syn match rustFloat display "\<[0-9][0-9_]*\%(\.[0-9][0-9_]*\)\%([eE][+-]\=[0-9_]\+\)\=\(f32\|f64\)\="
@@ -252,7 +253,6 @@ hi def link rustReservedKeyword Error
252253
hi def link rustConditional Conditional
253254
hi def link rustIdentifier Identifier
254255
hi def link rustCapsIdent rustIdentifier
255-
hi def link rustModPathInUse rustModPath
256256
hi def link rustModPath Include
257257
hi def link rustModPathSep Delimiter
258258
hi def link rustFunction Function

branches/try/src/liballoc/arc.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,6 @@ impl<T: Sync + Send> Drop for Weak<T> {
276276
#[allow(experimental)]
277277
mod tests {
278278
use std::clone::Clone;
279-
use std::collections::MutableSeq;
280279
use std::comm::channel;
281280
use std::mem::drop;
282281
use std::ops::Drop;

branches/try/src/libcollections/bitv.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2659,7 +2659,7 @@ mod tests {
26592659
let mut r = rng();
26602660
let mut bitv = Bitv::with_capacity(BENCH_BITS, false);
26612661
b.iter(|| {
2662-
for i in range(0u, 100) {
2662+
for _ in range(0u, 100) {
26632663
bitv.set((r.next_u32() as uint) % BENCH_BITS, r.gen());
26642664
}
26652665
&bitv

0 commit comments

Comments
 (0)