Skip to content

Commit 60580d9

Browse files
committed
---
yaml --- r: 149011 b: refs/heads/try2 c: c8759f6 h: refs/heads/master i: 149009: 0755c5d 149007: 434dbea v: v3
1 parent 10e7297 commit 60580d9

File tree

428 files changed

+4855
-1565
lines changed

Some content is hidden

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

428 files changed

+4855
-1565
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 8192f5508a1003f92258dad3fd3773d0daa26391
8+
refs/heads/try2: c8759f6b56735d444288661655527edbc5ac333f
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ src/.DS_Store
7575
/nd/
7676
/llvm/
7777
version.md
78-
*.tex
7978
keywords.md
8079
x86_64-apple-darwin/
8180
x86_64-unknown-linux-gnu/

branches/try2/mk/docs.mk

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@ HTML_DEPS := doc/
1919

2020
BASE_DOC_OPTS := --standalone --toc --number-sections
2121
HTML_OPTS = $(BASE_DOC_OPTS) --to=html5 --section-divs --css=rust.css \
22-
--include-before-body=doc/version_info.html --include-in-header=doc/favicon.inc
23-
TEX_OPTS = $(BASE_DOC_OPTS) --include-before-body=doc/version.md --to=latex
22+
--include-before-body=doc/version_info.html \
23+
--include-in-header=doc/favicon.inc --include-after-body=doc/footer.inc
24+
TEX_OPTS = $(BASE_DOC_OPTS) --include-before-body=doc/version.md \
25+
--from=markdown --include-before-body=doc/footer.tex --to=latex
2426
EPUB_OPTS = $(BASE_DOC_OPTS) --to=epub
2527

2628
D := $(S)src/doc
@@ -55,12 +57,21 @@ doc/rust.css: $(D)/rust.css | doc/
5557
@$(call E, cp: $@)
5658
$(Q)cp -a $< $@ 2> /dev/null
5759

60+
HTML_DEPS += doc/favicon.inc
61+
doc/favicon.inc: $(D)/favicon.inc | doc/
62+
@$(call E, cp: $@)
63+
$(Q)cp -a $< $@ 2> /dev/null
64+
5865
doc/full-toc.inc: $(D)/full-toc.inc | doc/
5966
@$(call E, cp: $@)
6067
$(Q)cp -a $< $@ 2> /dev/null
6168

62-
HTML_DEPS += doc/favicon.inc
63-
doc/favicon.inc: $(D)/favicon.inc | doc/
69+
HTML_DEPS += doc/footer.inc
70+
doc/footer.inc: $(D)/footer.inc | doc/
71+
@$(call E, cp: $@)
72+
$(Q)cp -a $< $@ 2> /dev/null
73+
74+
doc/footer.tex: $(D)/footer.tex | doc/
6475
@$(call E, cp: $@)
6576
$(Q)cp -a $< $@ 2> /dev/null
6677

@@ -83,7 +94,7 @@ doc/rust.html: $(D)/rust.md doc/full-toc.inc $(HTML_DEPS) | doc/
8394
$(CFG_PANDOC) $(HTML_OPTS) --include-in-header=doc/full-toc.inc --output=$@
8495

8596
DOCS += doc/rust.tex
86-
doc/rust.tex: $(D)/rust.md doc/version.md | doc/
97+
doc/rust.tex: $(D)/rust.md doc/footer.tex doc/version.md | doc/
8798
@$(call E, pandoc: $@)
8899
$(Q)$(CFG_NODE) $(D)/prep.js $< | \
89100
$(CFG_PANDOC) $(TEX_OPTS) --output=$@
@@ -107,7 +118,7 @@ doc/tutorial.html: $(D)/tutorial.md $(HTML_DEPS)
107118
$(CFG_PANDOC) $(HTML_OPTS) --output=$@
108119

109120
DOCS += doc/tutorial.tex
110-
doc/tutorial.tex: $(D)/tutorial.md doc/version.md
121+
doc/tutorial.tex: $(D)/tutorial.md doc/footer.tex doc/version.md
111122
@$(call E, pandoc: $@)
112123
$(Q)$(CFG_NODE) $(D)/prep.js $< | \
113124
$(CFG_PANDOC) $(TEX_OPTS) --output=$@

branches/try2/mk/tests.mk

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,11 @@ endif
116116

117117
# Run the compiletest runner itself under valgrind
118118
ifdef CTEST_VALGRIND
119-
CFG_RUN_CTEST_$(1)=$$(call CFG_RUN_TEST_$$(CFG_BUILD),$$(2),$$(3))
119+
CFG_RUN_CTEST_$(1)=$$(RPATH_VAR$$(1)_T_$$(3)_H_$$(3)) \
120+
$$(call CFG_RUN_TEST_$$(CFG_BUILD),$$(2),$$(3))
120121
else
121-
CFG_RUN_CTEST_$(1)=$$(call CFG_RUN_$$(CFG_BUILD),$$(TLIB$$(1)_T_$$(3)_H_$$(3)),$$(2))
122+
CFG_RUN_CTEST_$(1)=$$(RPATH_VAR$$(1)_T_$$(3)_H_$$(3)) \
123+
$$(call CFG_RUN_$$(CFG_BUILD),$$(TLIB$$(1)_T_$$(3)_H_$$(3)),$$(2))
122124
endif
123125

124126
endef
@@ -242,7 +244,6 @@ ALL_HS := $(filter-out $(S)src/rt/vg/valgrind.h \
242244
tidy:
243245
@$(call E, check: formatting)
244246
$(Q)find $(S)src -name '*.r[sc]' \
245-
| grep '^$(S)src/test' -v \
246247
| grep '^$(S)src/libuv' -v \
247248
| grep '^$(S)src/llvm' -v \
248249
| grep '^$(S)src/gyp' -v \

branches/try2/src/compiletest/runtest.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,7 @@ fn check_error_patterns(props: &TestProps,
442442
testfile: &Path,
443443
ProcRes: &ProcRes) {
444444
if props.error_patterns.is_empty() {
445-
testfile.display().with_str(|s| {
446-
fatal(~"no error pattern specified in " + s);
447-
})
445+
fatal(~"no error pattern specified in " + testfile.display().as_maybe_owned().as_slice());
448446
}
449447
450448
if ProcRes.status.success() {

branches/try2/src/doc/footer.inc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<footer><p>
2+
Copyright &copy; 2011-2014 The Rust Project Developers. Licensed under the
3+
<a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>
4+
or the <a href="http://opensource.org/licenses/MIT">MIT license</a>, at your option.
5+
</p><p>
6+
This file may not be copied, modified, or distributed except according to those terms.
7+
</p></footer>

branches/try2/src/doc/footer.tex

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Copyright © 2011-2014 The Rust Project Developers. Licensed under the
2+
\href{http://www.apache.org/licenses/LICENSE-2.0}{Apache License,
3+
Version 2.0} or the \href{http://opensource.org/licenses/MIT}{MIT
4+
license}, at your option.
5+
6+
This file may not be copied, modified, or distributed except according
7+
to those terms.

branches/try2/src/doc/guide-runtime.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,7 @@ extern mod green;
236236
237237
#[start]
238238
fn start(argc: int, argv: **u8) -> int {
239-
green::start(argc, argv, proc() {
240-
main();
241-
})
239+
green::start(argc, argv, main)
242240
}
243241
244242
fn main() {}

branches/try2/src/doc/index.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ li {list-style-type: none; }
5151
# Tooling
5252

5353
* [The `rustdoc` manual](rustdoc.html)
54-
* [The `rustpkg` manual](rustpkg.html)
5554

5655
# FAQs
5756

branches/try2/src/doc/rust.css

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
body {
1616
margin: 0 auto;
1717
padding: 0 15px;
18-
margin-bottom: 4em;
1918
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
2019
font-size: 14px;
2120
color: #333;
@@ -76,6 +75,15 @@ p {
7675
margin: 0 0 10px;
7776
}
7877

78+
footer {
79+
border-top: 1px solid #ddd;
80+
font-size: 12px;
81+
font-style: italic;
82+
padding-top: 4px;
83+
margin-top: 4em;
84+
margin-bottom: 1em;
85+
}
86+
7987
/* Links layout
8088
========================================================================== */
8189
a {

branches/try2/src/doc/rust.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1969,13 +1969,14 @@ impl<T: Eq> Eq for Foo<T> {
19691969
Supported traits for `deriving` are:
19701970

19711971
* Comparison traits: `Eq`, `TotalEq`, `Ord`, `TotalOrd`.
1972-
* Serialization: `Encodable`, `Decodable`. These require `extra`.
1972+
* Serialization: `Encodable`, `Decodable`. These require `serialize`.
19731973
* `Clone` and `DeepClone`, to perform (deep) copies.
19741974
* `IterBytes`, to iterate over the bytes in a data type.
19751975
* `Rand`, to create a random instance of a data type.
19761976
* `Default`, to create an empty instance of a data type.
19771977
* `Zero`, to create an zero instance of a numeric data type.
1978-
* `FromPrimitive`, to create an instance from a numeric primitve.
1978+
* `FromPrimitive`, to create an instance from a numeric primitive.
1979+
* `Show`, to format a value using the `{}` formatter.
19791980

19801981
### Stability
19811982
One can indicate the stability of an API using the following attributes:

branches/try2/src/doc/tutorial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2523,7 +2523,7 @@ enum ABC { A, B, C }
25232523

25242524
The full list of derivable traits is `Eq`, `TotalEq`, `Ord`,
25252525
`TotalOrd`, `Encodable` `Decodable`, `Clone`, `DeepClone`,
2526-
`IterBytes`, `Rand`, `Default`, `Zero`, and `ToStr`.
2526+
`IterBytes`, `Rand`, `Default`, `Zero`, `FromPrimitive` and `Show`.
25272527

25282528
# Crates and the module system
25292529

branches/try2/src/etc/generate-deriving-span-tests.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ def write_file(name, string):
118118
for (trait, supers, errs) in [('Rand', [], 1),
119119
('Clone', [], 1), ('DeepClone', ['Clone'], 1),
120120
('Eq', [], 2), ('Ord', [], 8),
121-
('TotalEq', [], 1), ('TotalOrd', ['TotalEq'], 1)]:
121+
('TotalEq', [], 1), ('TotalOrd', ['TotalEq'], 1),
122+
('Show', [], 1)]:
122123
traits[trait] = (ALL, supers, errs)
123124

124125
for (trait, (types, super_traits, error_count)) in traits.items():

branches/try2/src/etc/tidy.py

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414

1515
err=0
1616
cols=100
17+
cr_flag="xfail-tidy-cr"
18+
tab_flag="xfail-tidy-tab"
19+
linelength_flag="xfail-tidy-linelength"
1720

1821
# Be careful to support Python 2.4, 2.6, and 3.x here!
1922
config_proc=subprocess.Popen([ "git", "config", "core.autocrlf" ],
@@ -46,12 +49,22 @@ def do_license_check(name, contents):
4649

4750
current_name = ""
4851
current_contents = ""
52+
check_tab = True
53+
check_cr = True
54+
check_linelength = True
55+
4956

5057
try:
5158
for line in fileinput.input(file_names,
5259
openhook=fileinput.hook_encoded("utf-8")):
5360

5461
if fileinput.filename().find("tidy.py") == -1:
62+
if line.find(cr_flag) != -1:
63+
check_cr = False
64+
if line.find(tab_flag) != -1:
65+
check_tab = False
66+
if line.find(linelength_flag) != -1:
67+
check_linelength = False
5568
if line.find("// XXX") != -1:
5669
report_err("XXX is no longer necessary, use FIXME")
5770
if line.find("TODO") != -1:
@@ -72,16 +85,16 @@ def do_license_check(name, contents):
7285
if "SNAP" in line:
7386
report_warn("unmatched SNAP line: " + line)
7487

75-
if (line.find('\t') != -1 and
88+
if check_tab and (line.find('\t') != -1 and
7689
fileinput.filename().find("Makefile") == -1):
7790
report_err("tab character")
78-
if not autocrlf and line.find('\r') != -1:
91+
if check_cr and not autocrlf and line.find('\r') != -1:
7992
report_err("CR character")
8093
if line.endswith(" \n") or line.endswith("\t\n"):
8194
report_err("trailing whitespace")
8295
line_len = len(line)-2 if autocrlf else len(line)-1
8396

84-
if line_len > cols:
97+
if check_linelength and line_len > cols:
8598
report_err("line longer than %d chars" % cols)
8699

87100
if fileinput.isfirstline() and current_name != "":
@@ -90,6 +103,9 @@ def do_license_check(name, contents):
90103
if fileinput.isfirstline():
91104
current_name = fileinput.filename()
92105
current_contents = ""
106+
check_cr = True
107+
check_tab = True
108+
check_linelength = True
93109

94110
current_contents += line
95111

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,7 @@ syn keyword rustTrait Primitive Int Float ToStrRadix ToPrimitive FromPrimitive
8787
syn keyword rustTrait GenericPath Path PosixPath WindowsPath
8888
syn keyword rustTrait RawPtr
8989
syn keyword rustTrait Buffer Writer Reader Seek
90-
syn keyword rustTrait SendStr SendStrOwned SendStrStatic IntoSendStr
91-
syn keyword rustTrait Str StrVector StrSlice OwnedStr
90+
syn keyword rustTrait Str StrVector StrSlice OwnedStr IntoMaybeOwned
9291
syn keyword rustTrait IterBytes
9392
syn keyword rustTrait ToStr IntoStr
9493
syn keyword rustTrait CloneableTuple ImmutableTuple

branches/try2/src/libarena/lib.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,7 @@ impl Arena {
214214
#[inline]
215215
fn alloc_pod<'a, T>(&'a mut self, op: || -> T) -> &'a T {
216216
unsafe {
217-
let tydesc = get_tydesc::<T>();
218-
let ptr = self.alloc_pod_inner((*tydesc).size, (*tydesc).align);
217+
let ptr = self.alloc_pod_inner(mem::size_of::<T>(), mem::min_align_of::<T>());
219218
let ptr: *mut T = transmute(ptr);
220219
intrinsics::move_val_init(&mut (*ptr), op());
221220
return transmute(ptr);
@@ -272,7 +271,7 @@ impl Arena {
272271
unsafe {
273272
let tydesc = get_tydesc::<T>();
274273
let (ty_ptr, ptr) =
275-
self.alloc_nonpod_inner((*tydesc).size, (*tydesc).align);
274+
self.alloc_nonpod_inner(mem::size_of::<T>(), mem::min_align_of::<T>());
276275
let ty_ptr: *mut uint = transmute(ty_ptr);
277276
let ptr: *mut T = transmute(ptr);
278277
// Write in our tydesc along with a bit indicating that it

0 commit comments

Comments
 (0)