Skip to content

Commit 9326626

Browse files
committed
---
yaml --- r: 153403 b: refs/heads/try2 c: ded48c5 h: refs/heads/master i: 153401: 49cc6fc 153399: a063000 v: v3
1 parent becf32e commit 9326626

File tree

145 files changed

+616
-1114
lines changed

Some content is hidden

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

145 files changed

+616
-1114
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: 996263a01589c5d2bd2a5ad559abac267296ad71
8+
refs/heads/try2: ded48c5847b57262eb831c5d4201761b6bf36b3f
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: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH RUSTC "1" "March 2014" "rustc 0.12.0-pre" "User Commands"
1+
.TH RUSTC "1" "March 2014" "rustc 0.11.0" "User Commands"
22
.SH NAME
33
rustc \- The Rust compiler
44
.SH SYNOPSIS
@@ -63,9 +63,8 @@ Parse only; do not compile, assemble, or link
6363
\fB\-\-pretty\fR [TYPE]
6464
Pretty-print the input instead of compiling; valid types are: normal
6565
(un-annotated source), expanded (crates expanded), typed (crates
66-
expanded, with type annotations), identified (fully parenthesized,
67-
AST nodes and blocks with IDs), or flowgraph=<nodeid> (graphviz
68-
formatted flowgraph for node)
66+
expanded, with type annotations), or identified (fully parenthesized,
67+
AST nodes and blocks with IDs)
6968
.TP
7069
\fB\-\-dep-info\fR [FILENAME]
7170
Output dependency info to <filename> after compiling, in o format suitable

branches/try2/man/rustdoc.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH RUSTDOC "1" "March 2014" "rustdoc 0.12.0-pre" "User Commands"
1+
.TH RUSTDOC "1" "March 2014" "rustdoc 0.11.0" "User Commands"
22
.SH NAME
33
rustdoc \- generate documentation from Rust source code
44
.SH SYNOPSIS

branches/try2/mk/main.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
######################################################################
1414

1515
# The version number
16-
CFG_RELEASE_NUM=0.12.0
17-
CFG_RELEASE_LABEL=-pre
16+
CFG_RELEASE_NUM=0.11.0
17+
CFG_RELEASE_LABEL=
1818

1919
CFG_FILENAME_EXTRA=4e7c5e5c
2020

branches/try2/src/doc/guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ $ rustc --version
9090
You should see some output that looks something like this:
9191

9292
```{ignore}
93-
rustc 0.12.0-pre (443a1cd 2014-06-08 14:56:52 -0700)
93+
rustc 0.11.0-pre (443a1cd 2014-06-08 14:56:52 -0700)
9494
```
9595

9696
If you did, Rust has been installed successfully! Congrats!

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#
66
msgid ""
77
msgstr ""
8-
"Project-Id-Version: Rust 0.12.0-pre\n"
8+
"Project-Id-Version: Rust 0.11.0-pre\n"
99
"POT-Creation-Date: 2014-02-03 08:13+0900\n"
1010
"PO-Revision-Date: 2014-01-13 12:01+0900\n"
1111
"Last-Translator: Automatically generated\n"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#
66
msgid ""
77
msgstr ""
8-
"Project-Id-Version: Rust 0.12.0-pre\n"
8+
"Project-Id-Version: Rust 0.11.0-pre\n"
99
"POT-Creation-Date: 2014-02-03 08:13+0900\n"
1010
"PO-Revision-Date: 2014-01-13 12:01+0900\n"
1111
"Last-Translator: Automatically generated\n"

branches/try2/src/doc/po/ja/complement-project-faq.md.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#
66
msgid ""
77
msgstr ""
8-
"Project-Id-Version: Rust 0.12.0-pre\n"
8+
"Project-Id-Version: Rust 0.11.0-pre\n"
99
"POT-Creation-Date: 2014-02-03 08:13+0900\n"
1010
"PO-Revision-Date: 2014-01-13 12:01+0900\n"
1111
"Last-Translator: Automatically generated\n"

branches/try2/src/doc/po/ja/complement-usage-faq.md.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#
66
msgid ""
77
msgstr ""
8-
"Project-Id-Version: Rust 0.12.0-pre\n"
8+
"Project-Id-Version: Rust 0.11.0-pre\n"
99
"POT-Creation-Date: 2014-02-03 08:13+0900\n"
1010
"PO-Revision-Date: 2014-02-03 08:13+0900\n"
1111
"Last-Translator: Automatically generated\n"

branches/try2/src/doc/po/ja/guide-conditions.md.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#
66
msgid ""
77
msgstr ""
8-
"Project-Id-Version: Rust 0.12.0-pre\n"
8+
"Project-Id-Version: Rust 0.11.0-pre\n"
99
"POT-Creation-Date: 2014-02-03 08:13+0900\n"
1010
"PO-Revision-Date: 2014-01-13 12:01+0900\n"
1111
"Last-Translator: Automatically generated\n"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#
66
msgid ""
77
msgstr ""
8-
"Project-Id-Version: Rust 0.12.0-pre\n"
8+
"Project-Id-Version: Rust 0.11.0-pre\n"
99
"POT-Creation-Date: 2014-02-03 08:13+0900\n"
1010
"PO-Revision-Date: 2014-01-13 12:01+0900\n"
1111
"Last-Translator: Automatically generated\n"

branches/try2/src/doc/po/ja/guide-ffi.md.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#
66
msgid ""
77
msgstr ""
8-
"Project-Id-Version: Rust 0.12.0-pre\n"
8+
"Project-Id-Version: Rust 0.11.0-pre\n"
99
"POT-Creation-Date: 2014-02-03 08:13+0900\n"
1010
"PO-Revision-Date: 2014-01-13 12:01+0900\n"
1111
"Last-Translator: Automatically generated\n"

branches/try2/src/doc/po/ja/guide-lifetimes.md.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#
66
msgid ""
77
msgstr ""
8-
"Project-Id-Version: Rust 0.12.0-pre\n"
8+
"Project-Id-Version: Rust 0.11.0-pre\n"
99
"POT-Creation-Date: 2014-02-03 08:13+0900\n"
1010
"PO-Revision-Date: 2014-01-13 12:01+0900\n"
1111
"Last-Translator: Automatically generated\n"

branches/try2/src/doc/po/ja/guide-macros.md.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#
66
msgid ""
77
msgstr ""
8-
"Project-Id-Version: Rust 0.12.0-pre\n"
8+
"Project-Id-Version: Rust 0.11.0-pre\n"
99
"POT-Creation-Date: 2014-02-03 08:13+0900\n"
1010
"PO-Revision-Date: 2014-01-13 12:01+0900\n"
1111
"Last-Translator: Automatically generated\n"

branches/try2/src/doc/po/ja/guide-pointers.md.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#
66
msgid ""
77
msgstr ""
8-
"Project-Id-Version: Rust 0.12.0-pre\n"
8+
"Project-Id-Version: Rust 0.11.0-pre\n"
99
"POT-Creation-Date: 2014-02-03 08:13+0900\n"
1010
"PO-Revision-Date: 2014-01-13 12:01+0900\n"
1111
"Last-Translator: Automatically generated\n"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#
66
msgid ""
77
msgstr ""
8-
"Project-Id-Version: Rust 0.12.0-pre\n"
8+
"Project-Id-Version: Rust 0.11.0-pre\n"
99
"POT-Creation-Date: 2014-02-03 08:13+0900\n"
1010
"PO-Revision-Date: 2014-02-03 08:13+0900\n"
1111
"Last-Translator: Automatically generated\n"

branches/try2/src/doc/po/ja/guide-tasks.md.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#
66
msgid ""
77
msgstr ""
8-
"Project-Id-Version: Rust 0.12.0-pre\n"
8+
"Project-Id-Version: Rust 0.11.0-pre\n"
99
"POT-Creation-Date: 2014-02-03 08:13+0900\n"
1010
"PO-Revision-Date: 2014-01-13 12:01+0900\n"
1111
"Last-Translator: Automatically generated\n"

branches/try2/src/doc/po/ja/guide-testing.md.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#
66
msgid ""
77
msgstr ""
8-
"Project-Id-Version: Rust 0.12.0-pre\n"
8+
"Project-Id-Version: Rust 0.11.0-pre\n"
99
"POT-Creation-Date: 2014-02-03 08:13+0900\n"
1010
"PO-Revision-Date: 2014-01-13 12:01+0900\n"
1111
"Last-Translator: Automatically generated\n"

branches/try2/src/doc/po/ja/index.md.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#
66
msgid ""
77
msgstr ""
8-
"Project-Id-Version: Rust 0.12.0-pre\n"
8+
"Project-Id-Version: Rust 0.11.0-pre\n"
99
"POT-Creation-Date: 2014-02-03 08:13+0900\n"
1010
"PO-Revision-Date: 2014-01-14 21:02+0900\n"
1111
"Last-Translator: Automatically generated\n"

branches/try2/src/doc/po/ja/rustdoc.md.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#
66
msgid ""
77
msgstr ""
8-
"Project-Id-Version: Rust 0.12.0-pre\n"
8+
"Project-Id-Version: Rust 0.11.0-pre\n"
99
"POT-Creation-Date: 2014-02-03 08:13+0900\n"
1010
"PO-Revision-Date: 2014-01-13 12:01+0900\n"
1111
"Last-Translator: Automatically generated\n"

branches/try2/src/etc/kate/rust.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<!ENTITY rustIdent "[a-zA-Z_][a-zA-Z_0-9]*">
88
<!ENTITY rustIntSuf "([iu](8|16|32|64)?)?">
99
]>
10-
<language name="Rust" version="0.12.0-pre" kateversion="2.4" section="Sources" extensions="*.rs" mimetype="text/x-rust" priority="15">
10+
<language name="Rust" version="0.11.0" kateversion="2.4" section="Sources" extensions="*.rs" mimetype="text/x-rust" priority="15">
1111
<highlighting>
1212
<list name="fn">
1313
<item> fn </item>

branches/try2/src/liballoc/lib.rs

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121
//!
2222
//! Currently, there are four major definitions in this library.
2323
//!
24-
//! ## Boxed values
24+
//! ## Owned pointers
2525
//!
26-
//! The [`Box`](boxed/index.html) type is the core owned pointer type in rust.
26+
//! The [`Box`](owned/index.html) type is the core owned pointer type in rust.
2727
//! There can only be one owner of a `Box`, and the owner can decide to mutate
28-
//! the contents, which live on the heap.
28+
//! the contents.
2929
//!
3030
//! This type can be sent among tasks efficiently as the size of a `Box` value
3131
//! is just a pointer. Tree-like data structures are often built on owned
@@ -82,12 +82,6 @@ extern crate libc;
8282
#[cfg(test)] #[phase(plugin, link)] extern crate std;
8383
#[cfg(test)] #[phase(plugin, link)] extern crate log;
8484

85-
// The deprecated name of the boxed module
86-
87-
#[deprecated = "use boxed instead"]
88-
#[cfg(not(test))]
89-
pub use owned = boxed;
90-
9185
// Heaps provided for low-level allocation strategies
9286

9387
pub mod heap;
@@ -97,7 +91,7 @@ pub mod util;
9791
// Primitive types using the heaps above
9892

9993
#[cfg(not(test))]
100-
pub mod boxed;
94+
pub mod owned;
10195
pub mod arc;
10296
pub mod rc;
10397

branches/try2/src/liballoc/boxed.rs renamed to branches/try2/src/liballoc/owned.rs

Lines changed: 40 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ use core::cmp::{PartialEq, PartialOrd, Eq, Ord, Ordering};
1616
use core::default::Default;
1717
use core::fmt;
1818
use core::intrinsics;
19+
use core::kinds::Send;
1920
use core::mem;
2021
use core::option::Option;
2122
use core::raw::TraitObject;
@@ -26,19 +27,17 @@ use core::result::{Ok, Err, Result};
2627
///
2728
/// The following two examples are equivalent:
2829
///
29-
/// use std::boxed::HEAP;
30+
/// use std::owned::HEAP;
3031
///
3132
/// # struct Bar;
3233
/// # impl Bar { fn new(_a: int) { } }
3334
/// let foo = box(HEAP) Bar::new(2);
3435
/// let foo = box Bar::new(2);
35-
#[lang = "exchange_heap"]
36-
#[experimental = "may be renamed; uncertain about custom allocator design"]
36+
#[lang="exchange_heap"]
3737
pub static HEAP: () = ();
3838

3939
/// A type that represents a uniquely-owned value.
40-
#[lang = "owned_box"]
41-
#[unstable = "custom allocators will add an additional type parameter (with default)"]
40+
#[lang="owned_box"]
4241
pub struct Box<T>(*mut T);
4342

4443
impl<T: Default> Default for Box<T> {
@@ -58,6 +57,7 @@ impl<T: Clone> Clone for Box<T> {
5857
}
5958
}
6059

60+
// box pointers
6161
impl<T:PartialEq> PartialEq for Box<T> {
6262
#[inline]
6363
fn eq(&self, other: &Box<T>) -> bool { *(*self) == *(*other) }
@@ -85,27 +85,48 @@ impl<T: Ord> Ord for Box<T> {
8585
impl<T: Eq> Eq for Box<T> {}
8686

8787
/// Extension methods for an owning `Any` trait object
88-
#[unstable = "post-DST, the signature of `downcast` will change to take `Box<Self>`"]
89-
pub trait BoxAny {
88+
pub trait AnyOwnExt {
9089
/// Returns the boxed value if it is of type `T`, or
9190
/// `Err(Self)` if it isn't.
92-
fn downcast<T: 'static>(self) -> Result<Box<T>, Self>;
91+
fn move<T: 'static>(self) -> Result<Box<T>, Self>;
92+
}
93+
94+
impl AnyOwnExt for Box<Any> {
95+
#[inline]
96+
fn move<T: 'static>(self) -> Result<Box<T>, Box<Any>> {
97+
if self.is::<T>() {
98+
unsafe {
99+
// Get the raw representation of the trait object
100+
let to: TraitObject =
101+
*mem::transmute::<&Box<Any>, &TraitObject>(&self);
102+
103+
// Prevent destructor on self being run
104+
intrinsics::forget(self);
93105

94-
/// Deprecated; this method has been renamed to `downcast`.
95-
#[deprecated = "use downcast instead"]
96-
fn move<T: 'static>(self) -> Result<Box<T>, Self> {
97-
self.downcast::<T>()
106+
// Extract the data pointer
107+
Ok(mem::transmute(to.data))
108+
}
109+
} else {
110+
Err(self)
111+
}
98112
}
99113
}
100114

101-
impl BoxAny for Box<Any> {
115+
/// Extension methods for an owning `Any+Send` trait object
116+
pub trait AnySendOwnExt {
117+
/// Returns the boxed value if it is of type `T`, or
118+
/// `Err(Self)` if it isn't.
119+
fn move_send<T: 'static>(self) -> Result<Box<T>, Self>;
120+
}
121+
122+
impl AnySendOwnExt for Box<Any+Send> {
102123
#[inline]
103-
fn downcast<T: 'static>(self) -> Result<Box<T>, Box<Any>> {
124+
fn move_send<T: 'static>(self) -> Result<Box<T>, Box<Any+Send>> {
104125
if self.is::<T>() {
105126
unsafe {
106127
// Get the raw representation of the trait object
107128
let to: TraitObject =
108-
*mem::transmute::<&Box<Any>, &TraitObject>(&self);
129+
*mem::transmute::<&Box<Any+Send>, &TraitObject>(&self);
109130

110131
// Prevent destructor on self being run
111132
intrinsics::forget(self);
@@ -145,20 +166,20 @@ mod test {
145166
let a = box 8u as Box<Any>;
146167
let b = box Test as Box<Any>;
147168

148-
match a.downcast::<uint>() {
169+
match a.move::<uint>() {
149170
Ok(a) => { assert!(a == box 8u); }
150171
Err(..) => fail!()
151172
}
152-
match b.downcast::<Test>() {
173+
match b.move::<Test>() {
153174
Ok(a) => { assert!(a == box Test); }
154175
Err(..) => fail!()
155176
}
156177

157178
let a = box 8u as Box<Any>;
158179
let b = box Test as Box<Any>;
159180

160-
assert!(a.downcast::<Box<Test>>().is_err());
161-
assert!(b.downcast::<Box<uint>>().is_err());
181+
assert!(a.move::<Box<Test>>().is_err());
182+
assert!(b.move::<Box<uint>>().is_err());
162183
}
163184

164185
#[test]

branches/try2/src/libarena/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#![license = "MIT/ASL2"]
2727
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
2828
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
29-
html_root_url = "http://doc.rust-lang.org/master/")]
29+
html_root_url = "http://doc.rust-lang.org/0.11.0/")]
3030

3131
#![feature(unsafe_destructor)]
3232
#![allow(missing_doc)]

branches/try2/src/libcollections/btree.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
2121
use core::prelude::*;
2222

23-
use alloc::boxed::Box;
23+
use alloc::owned::Box;
2424
use core::fmt;
2525
use core::fmt::Show;
2626

branches/try2/src/libcollections/dlist.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
use core::prelude::*;
2525

26-
use alloc::boxed::Box;
26+
use alloc::owned::Box;
2727
use core::default::Default;
2828
use core::fmt;
2929
use core::iter;

branches/try2/src/libcollections/hash/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565

6666
use core::prelude::*;
6767

68-
use alloc::boxed::Box;
68+
use alloc::owned::Box;
6969
use alloc::rc::Rc;
7070
use core::intrinsics::TypeId;
7171
use core::mem;

0 commit comments

Comments
 (0)