Skip to content

Commit 3d26ac4

Browse files
committed
---
yaml --- r: 151165 b: refs/heads/try2 c: 1be93e6 h: refs/heads/master i: 151163: 885dc7e v: v3
1 parent 2ecd3cd commit 3d26ac4

Some content is hidden

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

81 files changed

+591
-973
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: 3e284eeb21d8276abecd052b8a72e3146e787e95
8+
refs/heads/try2: 1be93e61da4cd63840a0b5318785547a009e8cae
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/mk/docs.mk

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -141,26 +141,6 @@ doc/footer.inc: $(D)/footer.inc | doc/
141141
@$(call E, cp: $@)
142142
$(Q)cp -a $< $@ 2> /dev/null
143143

144-
doc/FiraSans-Regular.woff: $(D)/FiraSans-Regular.woff | doc/
145-
@$(call E, cp: $@)
146-
$(Q)cp -a $< $@ 2> /dev/null
147-
148-
doc/FiraSans-Medium.woff: $(D)/FiraSans-Medium.woff | doc/
149-
@$(call E, cp: $@)
150-
$(Q)cp -a $< $@ 2> /dev/null
151-
152-
doc/Heuristica-Regular.woff: $(D)/Heuristica-Regular.woff | doc/
153-
@$(call E, cp: $@)
154-
$(Q)cp -a $< $@ 2> /dev/null
155-
156-
doc/Heuristica-Italic.woff: $(D)/Heuristica-Italic.woff | doc/
157-
@$(call E, cp: $@)
158-
$(Q)cp -a $< $@ 2> /dev/null
159-
160-
doc/Heuristica-Bold.woff: $(D)/Heuristica-Bold.woff | doc/
161-
@$(call E, cp: $@)
162-
$(Q)cp -a $< $@ 2> /dev/null
163-
164144
# The (english) documentation for each doc item.
165145

166146
define DEF_SHOULD_BUILD_PDF_DOC
-87.8 KB
Binary file not shown.
-89.8 KB
Binary file not shown.
-120 KB
Binary file not shown.
-117 KB
Binary file not shown.
-157 KB
Binary file not shown.

branches/try2/src/doc/complement-cheatsheet.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -207,12 +207,12 @@ let _ = close(Door::<Closed>("front".to_owned())); // error: mismatched types: e
207207
208208
## C function signature conversions
209209
210-
| Description | C signature | Equivalent Rust signature |
211-
|---------------------|-----------------------------------------------|------------------------------------------------|
212-
| no parameters | `void foo(void);` | `fn foo();` |
213-
| return value | `int foo(void);` | `fn foo() -> c_int;` |
214-
| function parameters | `void foo(int x, int y);` | `fn foo(x: c_int, y: c_int);` |
215-
| in-out pointers | `void foo(const int* in_ptr, int* out_ptr);` | `fn foo(in_ptr: *c_int, out_ptr: *mut c_int);` |
210+
Description C signature Equivalent Rust signature
211+
---------------------- ---------------------------------------------- ------------------------------------------
212+
no parameters `void foo(void);` `fn foo();`
213+
return value `int foo(void);` `fn foo() -> c_int;`
214+
function parameters `void foo(int x, int y);` `fn foo(x: c_int, y: c_int);`
215+
in-out pointers `void foo(const int* in_ptr, int* out_ptr);` `fn foo(in_ptr: *c_int, out_ptr: *mut c_int);`
216216
217217
Note: The Rust signatures should be wrapped in an `extern "ABI" { ... }` block.
218218

branches/try2/src/doc/complement-lang-faq.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ Some examples that demonstrate different aspects of the language:
2222

2323
[sprocketnes]: https://github.com/pcwalton/sprocketnes
2424
[hash]: https://github.com/mozilla/rust/blob/master/src/libstd/hash.rs
25-
[HashMap]: https://github.com/mozilla/rust/blob/master/src/libcollections/hashmap.rs
26-
[json]: https://github.com/mozilla/rust/blob/master/src/libserialize/json.rs
25+
[HashMap]: https://github.com/mozilla/rust/blob/master/src/libstd/hashmap.rs
26+
[json]: https://github.com/mozilla/rust/blob/master/src/libextra/json.rs
2727

2828
You may also be interested in browsing [GitHub's Rust][github-rust] page.
2929

branches/try2/src/doc/favicon.inc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
<link rel="shortcut icon" href="http://www.rust-lang.org/favicon.ico">
2-
<link href='http://fonts.googleapis.com/css?family=Source+Code+Pro:400'
3-
rel='stylesheet' type='text/css'>
1+
<link rel="shortcut icon" href="http://www.rust-lang.org/favicon.ico" />

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ just unique keys without a corresponding value. The `Map` and `Set` traits in
2222

2323
The standard library provides three owned map/set types:
2424

25-
* `collections::HashMap` and `collections::HashSet`, requiring the keys to
25+
* `std::hashmap::HashMap` and `std::hashmap::HashSet`, requiring the keys to
2626
implement `Eq` and `Hash`
27-
* `collections::TrieMap` and `collections::TrieSet`, requiring the keys to be `uint`
28-
* `collections::TreeMap` and `collections::TreeSet`, requiring the keys
27+
* `std::trie::TrieMap` and `std::trie::TrieSet`, requiring the keys to be `uint`
28+
* `extra::treemap::TreeMap` and `extra::treemap::TreeSet`, requiring the keys
2929
to implement `TotalOrd`
3030

3131
These maps do not use managed pointers so they can be sent between tasks as
@@ -42,19 +42,19 @@ implementing the `Hash` trait.
4242

4343
## Double-ended queues
4444

45-
The `collections::ringbuf` module implements a double-ended queue with `O(1)`
45+
The `extra::ringbuf` module implements a double-ended queue with `O(1)`
4646
amortized inserts and removals from both ends of the container. It also has
4747
`O(1)` indexing like a vector. The contained elements are not required to be
4848
copyable, and the queue will be sendable if the contained type is sendable.
49-
Its interface `Deque` is defined in `collections`.
49+
Its interface `Deque` is defined in `extra::collections`.
5050

5151
The `extra::dlist` module implements a double-ended linked list, also
5252
implementing the `Deque` trait, with `O(1)` removals and inserts at either end,
5353
and `O(1)` concatenation.
5454

5555
## Priority queues
5656

57-
The `collections::priority_queue` module implements a queue ordered by a key. The
57+
The `extra::priority_queue` module implements a queue ordered by a key. The
5858
contained elements are not required to be copyable, and the queue will be
5959
sendable if the contained type is sendable.
6060

branches/try2/src/doc/intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ a `Sender` and `Receiver` (commonly abbreviated `tx` and `rx`).
217217
The `spawn` function spins up a new task,
218218
given a *heap allocated closure* to run.
219219
As you can see in the code,
220-
we call `tx.send()` from the original task,
220+
we call `chan.send()` from the original task,
221221
passing in our boxed array,
222222
and we call `rx.recv()` (short for 'receive') inside of the new task:
223223
values given to the `Sender` via the `send` method come out the other end via the `recv` method on the `Receiver`.

branches/try2/src/doc/rust.css

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -14,41 +14,34 @@
1414
font-family: 'Fira Sans';
1515
font-style: normal;
1616
font-weight: 400;
17-
src: local('Fira Sans'), url("FiraSans-Regular.woff") format('woff');
17+
src: local('Fira Sans'), url("http://www.rust-lang.org/fonts/FiraSans-Regular.woff") format('woff');
1818
}
1919
@font-face {
2020
font-family: 'Fira Sans';
2121
font-style: normal;
2222
font-weight: 500;
23-
src: local('Fira Sans Medium'), url("FiraSans-Medium.woff") format('woff');
23+
src: local('Fira Sans Medium'), url("http://www.rust-lang.org/fonts/FiraSans-Medium.woff") format('woff');
2424
}
2525
@font-face {
2626
font-family: 'Heuristica';
2727
font-style: normal;
2828
font-weight: 400;
29-
src: local('Heuristica Regular'), url("Heuristica-Regular.woff") format('woff');
29+
src: local('Heuristica Regular'), url("http://www.rust-lang.org/fonts/Heuristica-Regular.woff") format('woff');
3030
}
3131
@font-face {
3232
font-family: 'Heuristica';
3333
font-style: italic;
3434
font-weight: 400;
35-
src: local('Heuristica Italic'), url("Heuristica-Italic.woff") format('woff');
35+
src: local('Heuristica Italic'), url("http://www.rust-lang.org/fonts/Heuristica-Italic.woff") format('woff');
3636
}
3737
@font-face {
3838
font-family: 'Heuristica';
3939
font-style: normal;
4040
font-weight: 700;
41-
src: local('Heuristica Bold'), url("Heuristica-Bold.woff") format('woff');
41+
src: local('Heuristica Bold'), url("http://www.rust-lang.org/fonts/Heuristica-Bold.woff") format('woff');
4242
}
43-
44-
*:not(body) {
45-
-webkit-box-sizing: border-box;
46-
-moz-box-sizing: border-box;
47-
box-sizing: border-box;
48-
}
49-
50-
/* General structure */
51-
43+
/* Global page semantics
44+
========================================================================== */
5245
body {
5346
margin: 0 auto;
5447
padding: 0 15px;
@@ -78,6 +71,16 @@ h1, h2, h3 {
7871
h1 {
7972
margin-bottom: 20px;
8073
}
74+
@media (min-width: 1170px) {
75+
h1 {
76+
margin-top: 40px;
77+
margin-bottom: 30px;
78+
}
79+
h1, h2, h3 {
80+
margin-top: 30px;
81+
margin-bottom: 15px;
82+
}
83+
}
8184
h4, h5, h6 {
8285
margin-top: 12px;
8386
margin-bottom: 10px;
@@ -154,8 +157,8 @@ footer {
154157
margin-bottom: 1em;
155158
}
156159

157-
/* Links layout */
158-
160+
/* Links layout
161+
========================================================================== */
159162
a {
160163
text-decoration: none;
161164
color: #428BCA;
@@ -180,16 +183,18 @@ h5 a:link, h5 a:visited {color: black;}
180183
h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover,
181184
h5 a:hover {text-decoration: none;}
182185

183-
/* Code */
184-
186+
/* Code
187+
========================================================================== */
185188
pre, code {
186-
font-family: "Source Code Pro", Menlo, Monaco, Consolas, "DejaVu Sans Mono", monospace;
189+
font-family: Menlo, Monaco, Consolas, "DejaVu Sans Mono", monospace;
190+
border-radius: 4px;
187191
}
188192
pre {
189-
border-left: 2px solid #eee;
193+
background-color: #FDFDFD;
194+
border: 1px solid #CCC;
195+
border-radius: 0.5em;
190196
white-space: pre-wrap;
191-
padding: 14px;
192-
padding-right: 0;
197+
padding: 9.5px;
193198
margin: 20px 0;
194199
font-size: 13px;
195200
word-break: break-all;
@@ -198,12 +203,15 @@ pre {
198203
code {
199204
padding: 0 2px;
200205
color: #8D1A38;
201-
white-space: pre-wrap;
206+
white-space: nowrap;
202207
}
203208
pre code {
204209
padding: 0;
205210
font-size: inherit;
206211
color: inherit;
212+
white-space: pre-wrap;
213+
background-color: transparent;
214+
border-radius: 0;
207215
}
208216

209217
/* Code highlighting */
@@ -217,16 +225,16 @@ pre.rust .doccomment { color: #4D4D4C; }
217225
pre.rust .macro, pre.rust .macro-nonterminal { color: #3E999F; }
218226
pre.rust .lifetime { color: #B76514; }
219227

220-
/* The rest */
221228

229+
/* The rest
230+
========================================================================== */
222231
#versioninfo {
223232
text-align: center;
224233
margin: 0.5em;
225234
font-size: 1.1em;
226235
}
227-
@media (min-width: 992px) {
236+
@media only screen and (min-width: 768px) {
228237
#versioninfo {
229-
font-size: 0.8em;
230238
position: fixed;
231239
bottom: 0px;
232240
right: 0px;
@@ -235,7 +243,7 @@ pre.rust .lifetime { color: #B76514; }
235243
background-color: #fff;
236244
margin: 2px;
237245
padding: 0 2px;
238-
border-radius: .2em;
246+
border-radius: .3em;
239247
}
240248
}
241249
#versioninfo a.hash {
@@ -244,12 +252,10 @@ pre.rust .lifetime { color: #B76514; }
244252
}
245253

246254
blockquote {
247-
color: #000;
248-
margin: 20px 0;
249-
padding: 15px 20px;
250-
background-color: #f2f7f9;
251-
border-top: .1em solid #e5eef2;
252-
border-bottom: .1em solid #e5eef2;
255+
color: black;
256+
border-left: 5px solid #eee;
257+
margin: 0 0 20px;
258+
padding: 10px 20px;
253259
}
254260
blockquote p {
255261
font-size: 17px;
@@ -313,12 +319,6 @@ table th {
313319
padding: 5px;
314320
}
315321

316-
@media (min-width: 1170px) {
317-
pre {
318-
font-size: 15px;
319-
}
320-
}
321-
322322
@media print {
323323
* {
324324
text-shadow: none !important;

branches/try2/src/doc/tutorial.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1793,6 +1793,11 @@ spawn(proc() {
17931793
});
17941794
~~~~
17951795
1796+
> *Note:* If you want to see the output of `debug!` statements, you will need to turn on
1797+
> `debug!` logging. To enable `debug!` logging, set the RUST_LOG environment
1798+
> variable to the name of your crate, which, for a file named `foo.rs`, will be
1799+
> `foo` (e.g., with bash, `export RUST_LOG=foo`).
1800+
17961801
## Closure compatibility
17971802
17981803
Rust closures have a convenient subtyping property: you can pass any kind of

branches/try2/src/etc/maketest.py

Lines changed: 10 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -12,53 +12,26 @@
1212
import os
1313
import sys
1414

15-
# msys1/msys2 automatically converts `/abs/path1:/abs/path2` into
16-
# `c:\real\abs\path1;c:\real\abs\path2` (semicolons) if shell thinks
17-
# the value is list of paths.
18-
# this causes great confusion and error: shell and Makefile doesn't like
19-
# windows paths so it is really error-prone. revert it for peace.
20-
def normalize_path(v):
21-
# c:\path -> /c/path
22-
if ':\\' in v:
23-
v = '/' + v.replace(':\\', '/')
24-
v = v.replace('\\', '/')
25-
return v
26-
27-
28-
def putenv(name, value):
29-
if os.name == 'nt':
30-
value = normalize_path(value)
31-
os.putenv(name, value)
32-
15+
# FIXME #12303 these tests are broken on windows
16+
if os.name == 'nt':
17+
print 'ignoring make tests on windows'
18+
sys.exit(0)
3319

3420
make = sys.argv[2]
35-
putenv('RUSTC', os.path.abspath(sys.argv[3]))
36-
putenv('TMPDIR', os.path.abspath(sys.argv[4]))
37-
putenv('CC', sys.argv[5])
38-
putenv('RUSTDOC', os.path.abspath(sys.argv[6]))
21+
os.putenv('RUSTC', os.path.abspath(sys.argv[3]))
22+
os.putenv('TMPDIR', os.path.abspath(sys.argv[4]))
23+
os.putenv('CC', sys.argv[5])
24+
os.putenv('RUSTDOC', os.path.abspath(sys.argv[6]))
3925
filt = sys.argv[7]
4026
ldpath = sys.argv[8]
4127
if ldpath != '':
42-
name = ldpath.split('=')[0]
43-
value = ldpath.split('=')[1]
44-
if os.name == 'nt' and name != 'PATH':
45-
value = ":".join(normalize_path(v) for v in value.split(";"))
46-
os.putenv(name, value)
28+
os.putenv(ldpath.split('=')[0], ldpath.split('=')[1])
4729

4830
if not filt in sys.argv[1]:
4931
sys.exit(0)
5032
print('maketest: ' + os.path.basename(os.path.dirname(sys.argv[1])))
5133

52-
path = sys.argv[1]
53-
if path[-1] == '/':
54-
# msys1 has a bug that `make` fails to include `../tools.mk` (parent dir)
55-
# if `-C path` option is given and `path` is absolute directory with
56-
# trailing slash (`c:/path/to/test/`).
57-
# the easist workaround is to remove the slash (`c:/path/to/test`).
58-
# msys2 seems to fix this problem.
59-
path = path[:-1]
60-
61-
proc = subprocess.Popen([make, '-C', path],
34+
proc = subprocess.Popen([make, '-C', sys.argv[1]],
6235
stdout = subprocess.PIPE,
6336
stderr = subprocess.PIPE)
6437
out, err = proc.communicate()

branches/try2/src/libnum/bigint.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,7 @@ impl Sub<BigUint, BigUint> for BigUint {
230230
lo
231231
}).collect();
232232

233-
assert!(borrow == 0,
234-
"Cannot subtract other from self because other is larger than self.");
233+
assert_eq!(borrow, 0); // <=> assert!((self >= other));
235234
return BigUint::new(diff);
236235
}
237236
}
@@ -1756,13 +1755,6 @@ mod biguint_tests {
17561755
}
17571756
}
17581757

1759-
#[test]
1760-
#[should_fail]
1761-
fn test_sub_fail_on_underflow() {
1762-
let (a, b) : (BigUint, BigUint) = (Zero::zero(), One::one());
1763-
a - b;
1764-
}
1765-
17661758
static mul_triples: &'static [(&'static [BigDigit],
17671759
&'static [BigDigit],
17681760
&'static [BigDigit])] = &[

0 commit comments

Comments
 (0)