Skip to content

Commit 05fe0b2

Browse files
committed
---
yaml --- r: 109759 b: refs/heads/snap-stage3 c: d27dd82 h: refs/heads/master i: 109757: d6bc59a 109755: 7d00991 109751: 38760cb 109743: 401b1c7 109727: c0aa8b7 109695: 8df4312 v: v3
1 parent 5e4ef5c commit 05fe0b2

File tree

113 files changed

+338
-704
lines changed

Some content is hidden

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

113 files changed

+338
-704
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: b8ef9fd9c9f642ce7b8aed82782a1ed745d08d64
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: e7148592adde0b09d7bf34426e215c6c25fc7cd1
4+
refs/heads/snap-stage3: d27dd8251d42f04737b168f5694584af48228bf2
55
refs/heads/try: f64fdf524a434f0e5cd0bc91d09c144723f3c90d
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ documentation.
55

66
## Quick Start
77

8-
1. Download a [binary installer][installer] for your platform.
8+
1. Download a [binary insaller][installer] for your platform.
99
2. Read the [tutorial].
1010
3. Enjoy!
1111

branches/snap-stage3/mk/dist.mk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ dist-install-dir-$(1): PREPARE_BIN_CMD=$(DEFAULT_PREPARE_BIN_CMD)
215215
dist-install-dir-$(1): PREPARE_LIB_CMD=$(DEFAULT_PREPARE_LIB_CMD)
216216
dist-install-dir-$(1): PREPARE_MAN_CMD=$(DEFAULT_PREPARE_MAN_CMD)
217217
dist-install-dir-$(1): PREPARE_CLEAN=true
218-
dist-install-dir-$(1): prepare-base-dir-$(1) docs compiler-docs
218+
dist-install-dir-$(1): prepare-base-dir-$(1)
219219
$$(Q)(cd $$(PREPARE_DEST_DIR)/ && find . -type f | sed 's/^\.\///') \
220220
> tmp/dist/manifest-$(1).in
221221
$$(Q)mv tmp/dist/manifest-$(1).in $$(PREPARE_DEST_DIR)/$$(CFG_LIBDIR_RELATIVE)/rustlib/manifest.in
@@ -224,7 +224,6 @@ dist-install-dir-$(1): prepare-base-dir-$(1) docs compiler-docs
224224
$$(Q)$$(PREPARE_MAN_CMD) $$(S)LICENSE-APACHE $$(PREPARE_DEST_DIR)
225225
$$(Q)$$(PREPARE_MAN_CMD) $$(S)LICENSE-MIT $$(PREPARE_DEST_DIR)
226226
$$(Q)$$(PREPARE_MAN_CMD) $$(S)README.md $$(PREPARE_DEST_DIR)
227-
$$(Q)cp -r doc $$(PREPARE_DEST_DIR)
228227
$$(Q)$$(PREPARE_BIN_CMD) $$(S)src/etc/install.sh $$(PREPARE_DEST_DIR)
229228

230229
dist/$$(PKG_NAME)-$(1).tar.gz: dist-install-dir-$(1)

branches/snap-stage3/src/doc/guide-unsafe.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ asm!(assembly template
294294
);
295295
```
296296

297-
Any use of `asm` is feature gated (requires `#![feature(asm)]` on the
297+
Any use of `asm` is feature gated (requires `#[feature(asm)];` on the
298298
crate to allow) and of course requires an `unsafe` block.
299299

300300
> **Note**: the examples here are given in x86/x86-64 assembly, but all
@@ -306,7 +306,7 @@ The `assembly template` is the only required parameter and must be a
306306
literal string (i.e `""`)
307307

308308
```
309-
#![feature(asm)]
309+
#[feature(asm)];
310310
311311
#[cfg(target_arch = "x86")]
312312
#[cfg(target_arch = "x86_64")]
@@ -334,7 +334,7 @@ Output operands, input operands, clobbers and options are all optional
334334
but you must add the right number of `:` if you skip them:
335335

336336
```
337-
# #![feature(asm)]
337+
# #[feature(asm)];
338338
# #[cfg(target_arch = "x86")] #[cfg(target_arch = "x86_64")]
339339
# fn main() { unsafe {
340340
asm!("xor %eax, %eax"
@@ -348,7 +348,7 @@ asm!("xor %eax, %eax"
348348
Whitespace also doesn't matter:
349349

350350
```
351-
# #![feature(asm)]
351+
# #[feature(asm)];
352352
# #[cfg(target_arch = "x86")] #[cfg(target_arch = "x86_64")]
353353
# fn main() { unsafe {
354354
asm!("xor %eax, %eax" ::: "eax");
@@ -362,7 +362,7 @@ Input and output operands follow the same format: `:
362362
expressions must be mutable lvalues:
363363

364364
```
365-
# #![feature(asm)]
365+
# #[feature(asm)];
366366
# #[cfg(target_arch = "x86")] #[cfg(target_arch = "x86_64")]
367367
fn add(a: int, b: int) -> int {
368368
let mut c = 0;
@@ -390,7 +390,7 @@ compiler not to assume any values loaded into those registers will
390390
stay valid.
391391

392392
```
393-
# #![feature(asm)]
393+
# #[feature(asm)];
394394
# #[cfg(target_arch = "x86")] #[cfg(target_arch = "x86_64")]
395395
# fn main() { unsafe {
396396
// Put the value 0x200 in eax

branches/snap-stage3/src/doc/po/ja/rust.md.po

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Japanese translations for Rust package
2-
# Copyright (C) 2013-2014 The Rust Project Developers
2+
# Copyright (C) 2013 The Rust Project Developers
33
# This file is distributed under the same license as the Rust package.
44
# Automatically generated, 2013.
55
#
@@ -886,7 +886,7 @@ msgstr ""
886886
#: src/doc/rust.md:2008
887887
#, fuzzy
888888
#| msgid "~~~~ use std::task::spawn;"
889-
msgid "~~~~ {.ignore} #![warn(unstable)]"
889+
msgid "~~~~ {.ignore} #[warn(unstable)];"
890890
msgstr ""
891891
"~~~~\n"
892892
"use std::task::spawn;"

branches/snap-stage3/src/doc/tutorial.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1492,8 +1492,8 @@ Rust uses the unary star operator (`*`) to access the contents of a
14921492
box or pointer, similarly to C.
14931493
14941494
~~~
1495-
let owned = ~10;
1496-
let borrowed = &20;
1495+
let owned = ~20;
1496+
let borrowed = &30;
14971497

14981498
let sum = *owned + *borrowed;
14991499
~~~
@@ -1520,7 +1520,7 @@ can sometimes make code awkward and parenthesis-filled.
15201520
# struct Point { x: f64, y: f64 }
15211521
# enum Shape { Rectangle(Point, Point) }
15221522
# impl Shape { fn area(&self) -> int { 0 } }
1523-
let start = ~Point { x: 10.0, y: 20.0 };
1523+
let start = @Point { x: 10.0, y: 20.0 };
15241524
let end = ~Point { x: (*start).x + 100.0, y: (*start).y + 100.0 };
15251525
let rect = &Rectangle(*start, *end);
15261526
let area = (*rect).area();
@@ -1534,7 +1534,7 @@ dot), so in most cases, explicitly dereferencing the receiver is not necessary.
15341534
# struct Point { x: f64, y: f64 }
15351535
# enum Shape { Rectangle(Point, Point) }
15361536
# impl Shape { fn area(&self) -> int { 0 } }
1537-
let start = ~Point { x: 10.0, y: 20.0 };
1537+
let start = @Point { x: 10.0, y: 20.0 };
15381538
let end = ~Point { x: start.x + 100.0, y: start.y + 100.0 };
15391539
let rect = &Rectangle(*start, *end);
15401540
let area = rect.area();
@@ -1546,7 +1546,7 @@ something silly like
15461546
15471547
~~~
15481548
# struct Point { x: f64, y: f64 }
1549-
let point = &~Point { x: 10.0, y: 20.0 };
1549+
let point = &@~Point { x: 10.0, y: 20.0 };
15501550
println!("{:f}", point.x);
15511551
~~~
15521552
@@ -1907,6 +1907,7 @@ to a reference.
19071907
// As with typical function arguments, owned pointers
19081908
// are automatically converted to references
19091909

1910+
(@s).draw_reference();
19101911
(~s).draw_reference();
19111912

19121913
// Unlike typical function arguments, the self value will
@@ -1917,7 +1918,7 @@ s.draw_reference();
19171918
(& &s).draw_reference();
19181919

19191920
// ... and dereferenced and borrowed
1920-
(&~s).draw_reference();
1921+
(&@~s).draw_reference();
19211922
~~~
19221923
19231924
Implementations may also define standalone (sometimes called "static")
@@ -2402,7 +2403,7 @@ that, like strings and vectors, objects have dynamic size and may
24022403
only be referred to via one of the pointer types.
24032404
Other pointer types work as well.
24042405
Casts to traits may only be done with compatible pointers so,
2405-
for example, an `&Circle` may not be cast to an `~Drawable`.
2406+
for example, an `@Circle` may not be cast to an `~Drawable`.
24062407
24072408
~~~
24082409
# type Circle = int; type Rectangle = int;
@@ -2505,8 +2506,8 @@ use std::f64::consts::PI;
25052506
# impl Circle for CircleStruct { fn radius(&self) -> f64 { (self.area() / PI).sqrt() } }
25062507
# impl Shape for CircleStruct { fn area(&self) -> f64 { PI * square(self.radius) } }
25072508
2508-
let concrete = ~CircleStruct{center:Point{x:3.0,y:4.0},radius:5.0};
2509-
let mycircle: ~Circle = concrete as ~Circle;
2509+
let concrete = @CircleStruct{center:Point{x:3.0,y:4.0},radius:5.0};
2510+
let mycircle: @Circle = concrete as @Circle;
25102511
let nonsense = mycircle.radius() * mycircle.area();
25112512
~~~
25122513

branches/snap-stage3/src/etc/combine-tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def scrub(b):
5454
#[crate_id=\"run_pass_stage2#0.1\"];
5555
#[crate_id=\"run_pass_stage2#0.1\"];
5656
#[feature(globs, macro_rules, struct_variant, managed_boxes)];
57-
#![allow(warnings)]
57+
#[allow(warnings)];
5858
extern crate collections;
5959
"""
6060
)

branches/snap-stage3/src/libarena/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
2424
html_root_url = "http://static.rust-lang.org/doc/master")]
2525
#![allow(missing_doc)]
26+
#![allow(visible_private_types)] // NOTE: remove after a stage0 snap
2627

2728
extern crate collections;
2829

branches/snap-stage3/src/libcollections/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222

2323
#![feature(macro_rules, managed_boxes, default_type_params, phase)]
2424

25+
#![allow(visible_private_types)] // NOTE: remove after a stage0 snap
26+
2527
extern crate rand;
2628

2729
#[cfg(test)] extern crate test;

branches/snap-stage3/src/libcollections/priority_queue.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,6 @@ impl<T:Ord> PriorityQueue<T> {
117117
/// Create an empty PriorityQueue
118118
pub fn new() -> PriorityQueue<T> { PriorityQueue{data: ~[],} }
119119

120-
/// Create an empty PriorityQueue with capacity `capacity`
121-
pub fn with_capacity(capacity: uint) -> PriorityQueue<T> {
122-
PriorityQueue { data: slice::with_capacity(capacity) }
123-
}
124-
125120
/// Create a PriorityQueue from a vector (heapify)
126121
pub fn from_vec(xs: ~[T]) -> PriorityQueue<T> {
127122
let mut q = PriorityQueue{data: xs,};

branches/snap-stage3/src/libcollections/smallintmap.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,6 @@ impl<V> SmallIntMap<V> {
112112
/// Create an empty SmallIntMap
113113
pub fn new() -> SmallIntMap<V> { SmallIntMap{v: ~[]} }
114114

115-
/// Create an empty SmallIntMap with capacity `capacity`
116-
pub fn with_capacity(capacity: uint) -> SmallIntMap<V> {
117-
SmallIntMap { v: slice::with_capacity(capacity) }
118-
}
119-
120115
pub fn get<'a>(&'a self, key: &uint) -> &'a V {
121116
self.find(key).expect("key not present")
122117
}

branches/snap-stage3/src/libcollections/trie.rs

Lines changed: 13 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -293,46 +293,32 @@ impl Mutable for TrieSet {
293293
fn clear(&mut self) { self.map.clear() }
294294
}
295295

296-
impl Set<uint> for TrieSet {
297-
#[inline]
298-
fn contains(&self, value: &uint) -> bool {
299-
self.map.contains_key(value)
300-
}
301-
302-
#[inline]
303-
fn is_disjoint(&self, other: &TrieSet) -> bool {
304-
self.iter().all(|v| !other.contains(&v))
305-
}
306-
296+
impl TrieSet {
297+
/// Create an empty TrieSet
307298
#[inline]
308-
fn is_subset(&self, other: &TrieSet) -> bool {
309-
self.iter().all(|v| other.contains(&v))
299+
pub fn new() -> TrieSet {
300+
TrieSet{map: TrieMap::new()}
310301
}
311302

303+
/// Return true if the set contains a value
312304
#[inline]
313-
fn is_superset(&self, other: &TrieSet) -> bool {
314-
other.is_subset(self)
305+
pub fn contains(&self, value: &uint) -> bool {
306+
self.map.contains_key(value)
315307
}
316-
}
317308

318-
impl MutableSet<uint> for TrieSet {
309+
/// Add a value to the set. Return true if the value was not already
310+
/// present in the set.
319311
#[inline]
320-
fn insert(&mut self, value: uint) -> bool {
312+
pub fn insert(&mut self, value: uint) -> bool {
321313
self.map.insert(value, ())
322314
}
323315

316+
/// Remove a value from the set. Return true if the value was
317+
/// present in the set.
324318
#[inline]
325-
fn remove(&mut self, value: &uint) -> bool {
319+
pub fn remove(&mut self, value: &uint) -> bool {
326320
self.map.remove(value)
327321
}
328-
}
329-
330-
impl TrieSet {
331-
/// Create an empty TrieSet
332-
#[inline]
333-
pub fn new() -> TrieSet {
334-
TrieSet{map: TrieMap::new()}
335-
}
336322

337323
/// Visit all values in reverse order
338324
#[inline]

branches/snap-stage3/src/libgetopts/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@
8787
#![deny(missing_doc)]
8888
#![deny(deprecated_owned_vector)]
8989

90+
#![allow(visible_private_types)] // NOTE: remove after a stage0 snap
91+
9092
#[cfg(test)] #[phase(syntax, link)] extern crate log;
9193

9294
use std::cmp::Eq;

branches/snap-stage3/src/liblog/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -15,7 +15,7 @@ Utilities for program-wide and customizable logging
1515
## Example
1616
1717
```
18-
#![feature(phase)]
18+
#[feature(phase)];
1919
#[phase(syntax, link)] extern crate log;
2020
2121
fn main() {

branches/snap-stage3/src/liblog/macros.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
/// # Example
2222
///
2323
/// ```
24-
/// #![feature(phase)]
24+
/// #[feature(phase)];
2525
/// #[phase(syntax, link)] extern crate log;
2626
///
2727
/// # fn main() {
@@ -45,7 +45,7 @@ macro_rules! log(
4545
/// # Example
4646
///
4747
/// ```
48-
/// #![feature(phase)]
48+
/// #[feature(phase)];
4949
/// #[phase(syntax, link)] extern crate log;
5050
///
5151
/// # fn main() {
@@ -63,7 +63,7 @@ macro_rules! error(
6363
/// # Example
6464
///
6565
/// ```
66-
/// #![feature(phase)]
66+
/// #[feature(phase)];
6767
/// #[phase(syntax, link)] extern crate log;
6868
///
6969
/// # fn main() {
@@ -81,7 +81,7 @@ macro_rules! warn(
8181
/// # Example
8282
///
8383
/// ```
84-
/// #![feature(phase)]
84+
/// #[feature(phase)];
8585
/// #[phase(syntax, link)] extern crate log;
8686
///
8787
/// # fn main() {
@@ -101,7 +101,7 @@ macro_rules! info(
101101
/// # Example
102102
///
103103
/// ```
104-
/// #![feature(phase)]
104+
/// #[feature(phase)];
105105
/// #[phase(syntax, link)] extern crate log;
106106
///
107107
/// # fn main() {
@@ -118,7 +118,7 @@ macro_rules! debug(
118118
/// # Example
119119
///
120120
/// ```
121-
/// #![feature(phase)]
121+
/// #[feature(phase)];
122122
/// #[phase(syntax, link)] extern crate log;
123123
///
124124
/// # fn main() {

branches/snap-stage3/src/libnative/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@
5151
#![deny(unused_result, unused_must_use)]
5252
#![allow(non_camel_case_types)]
5353

54+
#![allow(visible_private_types)] // NOTE: remove after a stage0 snap
55+
5456
// NB this crate explicitly does *not* allow glob imports, please seriously
5557
// consider whether they're needed before adding that feature here (the
5658
// answer is that you don't need them)

branches/snap-stage3/src/librand/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ println!("{:?}", tuple_ptr)
7171
html_root_url = "http://static.rust-lang.org/doc/master")]
7272

7373
#![feature(macro_rules, managed_boxes, phase)]
74+
75+
#![allow(visible_private_types)] // NOTE: remove after a stage0 snap
7476
#![deny(deprecated_owned_vector)]
7577

7678
#[cfg(test)]

0 commit comments

Comments
 (0)