Skip to content

Commit 69a2895

Browse files
committed
---
yaml --- r: 150839 b: refs/heads/try2 c: 83351fa h: refs/heads/master i: 150837: 122447f 150835: 35523f7 150831: ae394fc v: v3
1 parent 077faff commit 69a2895

Some content is hidden

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

84 files changed

+761
-1350
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: 12391df5b78a7a904112c0056aa28773abecb65d
8+
refs/heads/try2: 83351fa02e08caa8fb8017254cc6e7c99fc65d2b
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/man/rustc.1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,8 @@ rustdoc
182182
See <\fBhttps://github.com/mozilla/rust/issues\fR> for issues.
183183

184184
.SH "AUTHOR"
185-
See \fBAUTHORS.txt\fR in the Rust source distribution.
185+
See \fBAUTHORS.txt\fR in the rust source distribution. Graydon Hoare
186+
<\fI[email protected]\fR> is the project leader.
186187

187188
.SH "COPYRIGHT"
188189
This work is dual-licensed under Apache 2.0 and MIT terms. See \fBCOPYRIGHT\fR

branches/try2/man/rustdoc.1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ rustc
9090
See <\fBhttps://github.com/mozilla/rust/issues\fR> for issues.
9191

9292
.SH "AUTHOR"
93-
See \fBAUTHORS.txt\fR in the Rust source distribution.
93+
See \fBAUTHORS.txt\fR in the rust source distribution. Graydon Hoare
94+
<\fI[email protected]\fR> is the project leader.
9495

9596
.SH "COPYRIGHT"
9697
This work is dual-licensed under Apache 2.0 and MIT terms. See \fBCOPYRIGHT\fR

branches/try2/mk/dist.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ PKG_EXE = dist/$(PKG_NAME)-install.exe
118118
%.ico: $(S)src/etc/pkg/%.ico
119119
cp $< $@
120120

121-
$(PKG_EXE): rust.iss modpath.iss upgrade.iss LICENSE.txt rust-logo.ico \
121+
$(PKG_EXE): rust.iss modpath.iss LICENSE.txt rust-logo.ico \
122122
$(CSREQ3_T_$(CFG_BUILD)_H_$(CFG_BUILD)) \
123123
dist-prepare-win
124124
$(CFG_PYTHON) $(S)src/etc/copy-runtime-deps.py tmp/dist/win/bin

branches/try2/mk/prepare.mk

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,13 @@
2020
# PREPARE_TARGETS - the target triples, space separated
2121
# PREPARE_DEST_DIR - the directory to put the image
2222

23+
24+
# On windows we install from stage3, but on unix only stage2
25+
ifdef CFG_WINDOWSY_$(CFG_BUILD)
26+
PREPARE_STAGE=3
27+
else
2328
PREPARE_STAGE=2
29+
endif
2430

2531
DEFAULT_PREPARE_DIR_CMD = umask 022 && mkdir -p
2632
DEFAULT_PREPARE_BIN_CMD = install -m755

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

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Some examples that demonstrate different aspects of the language:
2727

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

30-
[github-rust]: https://github.com/trending?l=rust
30+
[github-rust]: https://github.com/languages/Rust
3131

3232
## Does it run on Windows?
3333

@@ -141,14 +141,8 @@ export RUST_LOG=hello
141141
./hello
142142
```
143143

144-
**Long answer** RUST_LOG takes a 'logging spec' that consists of a
145-
comma-separated list of paths, where a path consists of the crate name and
146-
sequence of module names, each separated by double-colons. For standalone .rs
147-
files the crate is implicitly named after the source file, so in the above
148-
example we were setting RUST_LOG to the name of the hello crate. Multiple paths
149-
can be combined to control the exact logging you want to see. For example, when
150-
debugging linking in the compiler you might set
151-
`RUST_LOG=rustc::metadata::creader,rustc::util::filesearch,rustc::back::rpath`
152-
For a full description see [the language reference][1].
144+
**Long answer** RUST_LOG takes a 'logging spec' that consists of a comma-separated list of paths, where a path consists of the crate name and sequence of module names, each separated by double-colons. For standalone .rs files the crate is implicitly named after the source file, so in the above example we were setting RUST_LOG to the name of the hello crate. Multiple paths can be combined to control the exact logging you want to see. For example, when debugging linking in the compiler you might set `RUST_LOG=rustc::metadata::creader,rustc::util::filesearch,rustc::back::rpath`
145+
146+
If you aren't sure which paths you need, try setting RUST_LOG to `::help` and running your program. This will print a list of paths available for logging. For a full description see [the language reference][1].
153147

154148
[1]:http://doc.rust-lang.org/doc/master/rust.html#logging-system

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ use std::cast;
7070
let mut x: u8 = 1;
7171
7272
let ref_1: &mut u8 = &mut x;
73-
let ref_2: &mut u8 = unsafe { cast::transmute_mut_lifetime(ref_1) };
73+
let ref_2: &mut u8 = unsafe { cast::transmute_mut_region(ref_1) };
7474
7575
// oops, ref_1 and ref_2 point to the same piece of data (x) and are
7676
// both usable

branches/try2/src/doc/rust.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4056,6 +4056,10 @@ crate name the crate is given a default name that matches the source file,
40564056
with the extension removed. In that case, to turn on logging for a program
40574057
compiled from, e.g. `helloworld.rs`, `RUST_LOG` should be set to `helloworld`.
40584058

4059+
As a convenience, the logging spec can also be set to a special pseudo-crate,
4060+
`::help`. In this case, when the application starts, the runtime will
4061+
simply output a list of loaded modules containing log expressions, then exit.
4062+
40594063
#### Logging Expressions
40604064

40614065
Rust provides several macros to log information. Here's a simple Rust program

branches/try2/src/etc/pkg/modpath.iss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ begin
164164
end;
165165
166166
167-
procedure ModPathCurStepChanged(CurStep: TSetupStep);
167+
procedure CurStepChanged(CurStep: TSetupStep);
168168
var
169169
taskname: String;
170170
begin

branches/try2/src/etc/pkg/rust.iss

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,4 @@ begin
4949
setArrayLength(Result, 1)
5050
Result[0] := ExpandConstant('{app}\bin');
5151
end;
52-
53-
#include "modpath.iss"
54-
#include "upgrade.iss"
55-
56-
// Both modpath.iss and upgrade.iss want to overload CurStepChanged.
57-
// This version does the overload then delegates to each.
58-
59-
procedure CurStepChanged(CurStep: TSetupStep);
60-
begin
61-
UpgradeCurStepChanged(CurStep);
62-
ModPathCurStepChanged(CurStep);
63-
end;
52+
#include "modpath.iss"

branches/try2/src/etc/pkg/upgrade.iss

Lines changed: 0 additions & 61 deletions
This file was deleted.

branches/try2/src/libarena/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
extern crate collections;
2828

29-
use std::cast::{transmute, transmute_mut, transmute_mut_lifetime};
29+
use std::cast::{transmute, transmute_mut, transmute_mut_region};
3030
use std::cast;
3131
use std::cell::{Cell, RefCell};
3232
use std::mem;
@@ -186,7 +186,7 @@ impl Arena {
186186
#[inline]
187187
fn alloc_copy_inner(&mut self, n_bytes: uint, align: uint) -> *u8 {
188188
unsafe {
189-
let this = transmute_mut_lifetime(self);
189+
let this = transmute_mut_region(self);
190190
let start = round_up(this.copy_head.fill.get(), align);
191191
let end = start + n_bytes;
192192
if end > self.chunk_size() {
@@ -233,7 +233,7 @@ impl Arena {
233233
let after_tydesc;
234234

235235
{
236-
let head = transmute_mut_lifetime(&mut self.head);
236+
let head = transmute_mut_region(&mut self.head);
237237

238238
tydesc_start = head.fill.get();
239239
after_tydesc = head.fill.get() + mem::size_of::<*TyDesc>();
@@ -245,7 +245,7 @@ impl Arena {
245245
return self.alloc_noncopy_grow(n_bytes, align);
246246
}
247247

248-
let head = transmute_mut_lifetime(&mut self.head);
248+
let head = transmute_mut_region(&mut self.head);
249249
head.fill.set(round_up(end, mem::pref_align_of::<*TyDesc>()));
250250

251251
//debug!("idx = {}, size = {}, align = {}, fill = {}",

branches/try2/src/libcollections/hashmap.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1424,28 +1424,43 @@ impl<T: TotalEq + Hash<S>, S, H: Hasher<S>> Eq for HashSet<T, H> {
14241424
}
14251425

14261426
impl<T: TotalEq + Hash<S>, S, H: Hasher<S>> Container for HashSet<T, H> {
1427+
/// Return the number of elements in the set
14271428
fn len(&self) -> uint { self.map.len() }
14281429
}
14291430

14301431
impl<T: TotalEq + Hash<S>, S, H: Hasher<S>> Mutable for HashSet<T, H> {
1432+
/// Clear the set, removing all values.
14311433
fn clear(&mut self) { self.map.clear() }
14321434
}
14331435

14341436
impl<T: TotalEq + Hash<S>, S, H: Hasher<S>> Set<T> for HashSet<T, H> {
1437+
/// Return true if the set contains a value
14351438
fn contains(&self, value: &T) -> bool { self.map.search(value).is_some() }
14361439

1440+
/// Return true if the set has no elements in common with `other`.
1441+
/// This is equivalent to checking for an empty intersection.
14371442
fn is_disjoint(&self, other: &HashSet<T, H>) -> bool {
14381443
self.iter().all(|v| !other.contains(v))
14391444
}
14401445

1446+
/// Return true if the set is a subset of another
14411447
fn is_subset(&self, other: &HashSet<T, H>) -> bool {
14421448
self.iter().all(|v| other.contains(v))
14431449
}
1450+
1451+
/// Return true if the set is a superset of another
1452+
fn is_superset(&self, other: &HashSet<T, H>) -> bool {
1453+
other.is_subset(self)
1454+
}
14441455
}
14451456

14461457
impl<T: TotalEq + Hash<S>, S, H: Hasher<S>> MutableSet<T> for HashSet<T, H> {
1458+
/// Add a value to the set. Return true if the value was not already
1459+
/// present in the set.
14471460
fn insert(&mut self, value: T) -> bool { self.map.insert(value, ()) }
14481461

1462+
/// Remove a value from the set. Return true if the value was
1463+
/// present in the set.
14491464
fn remove(&mut self, value: &T) -> bool { self.map.remove(value) }
14501465
}
14511466

0 commit comments

Comments
 (0)