Skip to content

Commit 7399d6c

Browse files
committed
---
yaml --- r: 147247 b: refs/heads/try2 c: 8d52dfb h: refs/heads/master i: 147245: a16b856 147243: afa3df7 147239: 29fbae4 147231: 66c511f v: v3
1 parent fb481a7 commit 7399d6c

File tree

140 files changed

+352
-122
lines changed

Some content is hidden

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

140 files changed

+352
-122
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: 164f7a290ef98377e4c8c158eca2fbed098a2842
8+
refs/heads/try2: 8d52dfbace05c46754f4f6bb5a25f55906c9d7b0
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/configure

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -469,8 +469,8 @@ then
469469
PV_MINOR=${PV_MAJOR_MINOR#* }
470470
if [ "$PV_MAJOR" -lt "$MIN_PV_MAJOR" ] || [ "$PV_MINOR" -lt "$MIN_PV_MINOR" ]
471471
then
472-
step_msg "pandoc $PV_MAJOR.$PV_MINOR is too old. Need at least $MIN_PV_MAJOR.$MIN_PV_MINOR. Disabling"
473-
BAD_PANDOC=1
472+
step_msg "pandoc $PV_MAJOR.$PV_MINOR is too old. Need at least $MIN_PV_MAJOR.$MIN_PV_MINOR. Disabling"
473+
BAD_PANDOC=1
474474
fi
475475
fi
476476

@@ -544,12 +544,24 @@ then
544544
putvar CFG_ENABLE_CLANG
545545
fi
546546

547-
548547
if [ -z "$CFG_ENABLE_CLANG" -a -z "$CFG_GCC" ]
549548
then
550549
err "either clang or gcc is required"
551550
fi
552551

552+
# OS X 10.9, gcc is actually clang. This can cause some confusion in the build
553+
# system, so if we find that gcc is clang, we should just use clang directly.
554+
if [ $CFG_OSTYPE = apple-darwin -a -z "$CFG_ENABLE_CLANG" ]
555+
then
556+
CFG_OSX_GCC_VERSION=$("$CFG_GCC" --version 2>&1 | grep "Apple LLVM version")
557+
if [ $? -eq 0 ]
558+
then
559+
step_msg "on OS X 10.9, forcing use of clang"
560+
CFG_ENABLE_CLANG=1
561+
putvar CFG_ENABLE_CLANG
562+
fi
563+
fi
564+
553565
if [ ! -z "$CFG_LLVM_ROOT" -a -e "$CFG_LLVM_ROOT/bin/llvm-config" ]
554566
then
555567
step_msg "using custom LLVM at $CFG_LLVM_ROOT"
@@ -558,20 +570,20 @@ then
558570
LLVM_VERSION=$($LLVM_CONFIG --version)
559571

560572
case $LLVM_VERSION in
561-
(3.3|3.3svn|3.2|3.2svn)
562-
msg "found ok version of LLVM: $LLVM_VERSION"
563-
;;
564-
(*)
565-
err "bad LLVM version: $LLVM_VERSION, need >=3.0svn"
566-
;;
573+
(3.3|3.3svn|3.2|3.2svn)
574+
msg "found ok version of LLVM: $LLVM_VERSION"
575+
;;
576+
(*)
577+
err "bad LLVM version: $LLVM_VERSION, need >=3.0svn"
578+
;;
567579
esac
568580
fi
569581

570582
if [ ! -z "$CFG_ENABLE_CLANG" ]
571583
then
572584
if [ -z "$CFG_CLANG" ]
573585
then
574-
err "clang requested but not found"
586+
err "clang requested but not found"
575587
fi
576588
CFG_CLANG_VERSION=$("$CFG_CLANG" \
577589
--version \

branches/try2/src/libextra/arc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ impl<T:Freeze + Send> MutexArc<T> {
276276
* might contain nested MutexArcs inside.
277277
*
278278
* The purpose of this is to offer a safe implementation of MutexArc to be
279-
* used instead of RWArc in cases where no readers are needed and sightly
279+
* used instead of RWArc in cases where no readers are needed and slightly
280280
* better performance is required.
281281
*
282282
* Both methods have the same failure behaviour as unsafe_access and

branches/try2/src/libextra/getopts.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
//! file name following `-o`, and accepts both `-h` and `--help` as optional flags.
3131
//!
3232
//! ~~~{.rust}
33-
//! exter mod extra;
33+
//! extern mod extra;
3434
//! use extra::getopts::*;
3535
//! use std::os;
3636
//!
@@ -114,7 +114,7 @@ pub enum Occur {
114114
pub struct Opt {
115115
/// Name of the option
116116
name: Name,
117-
/// Wheter it has an argument
117+
/// Whether it has an argument
118118
hasarg: HasArg,
119119
/// How often it can occur
120120
occur: Occur,
@@ -154,7 +154,7 @@ pub enum Fail_ {
154154
UnexpectedArgument(~str),
155155
}
156156

157-
/// The type of failure that occured.
157+
/// The type of failure that occurred.
158158
#[deriving(Eq)]
159159
#[allow(missing_doc)]
160160
pub enum FailType {

branches/try2/src/libextra/tempfile.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use std::io;
1818
use std::io::fs;
1919

2020
/// A wrapper for a path to temporary directory implementing automatic
21-
/// scope-pased deletion.
21+
/// scope-based deletion.
2222
pub struct TempDir {
2323
priv path: Option<Path>
2424
}

branches/try2/src/libextra/uuid.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ identifiers to entities without requiring a central allocating authority.
1717
1818
They are particularly useful in distributed systems, though can be used in
1919
disparate areas, such as databases and network protocols. Typically a UUID is
20-
displayed in a readable string form as a sequence of hexadecimals digits,
20+
displayed in a readable string form as a sequence of hexadecimal digits,
2121
separated into groups by hyphens.
2222
2323
The uniqueness property is not strictly guaranteed, however for all practical
@@ -89,11 +89,11 @@ pub enum UuidVersion {
8989
/// The reserved variants of UUIDs
9090
#[deriving(Eq)]
9191
pub enum UuidVariant {
92-
/// Reserved by the NCS for backward compatability
92+
/// Reserved by the NCS for backward compatibility
9393
VariantNCS,
9494
/// As described in the RFC4122 Specification (default)
9595
VariantRFC4122,
96-
/// Resreved by Microsoft for backward compatability
96+
/// Reserved by Microsoft for backward compatibility
9797
VariantMicrosoft,
9898
/// Reserved for future expansion
9999
VariantFuture,
@@ -313,7 +313,7 @@ impl Uuid {
313313
str::from_utf8_owned(s)
314314
}
315315

316-
/// Returns a string of hexadecimal digits, separated into groups with a hypen
316+
/// Returns a string of hexadecimal digits, separated into groups with a hyphen.
317317
///
318318
/// Example: `550e8400-e29b-41d4-a716-446655440000`
319319
pub fn to_hyphenated_str(&self) -> ~str {

branches/try2/src/librustc/front/feature_gate.rs

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,14 @@ impl Context {
7777
}
7878
}
7979

80+
fn gate_box(&self, span: Span) {
81+
self.gate_feature("managed_boxes", span,
82+
"The managed box syntax is being replaced by the \
83+
`std::gc::Gc` and `std::rc::Rc` types. Equivalent \
84+
functionality to managed trait objects will be \
85+
implemented but is currently missing.");
86+
}
87+
8088
fn has_feature(&self, feature: &str) -> bool {
8189
self.features.iter().any(|n| n.as_slice() == feature)
8290
}
@@ -172,17 +180,24 @@ impl Visitor<()> for Context {
172180
experimental and likely to be removed");
173181

174182
},
175-
ast::ty_box(_) => {
176-
self.gate_feature("managed_boxes", t.span,
177-
"The managed box syntax is being replaced by the `std::gc::Gc` \
178-
and `std::rc::Rc` types. Equivalent functionality to managed \
179-
trait objects will be implemented but is currently missing.");
180-
}
183+
ast::ty_box(_) => { self.gate_box(t.span); }
181184
_ => {}
182185
}
183186

184187
visit::walk_ty(self, t, ());
185188
}
189+
190+
fn visit_expr(&mut self, e: @ast::Expr, _: ()) {
191+
match e.node {
192+
ast::ExprUnary(_, ast::UnBox(..), _) |
193+
ast::ExprVstore(_, ast::ExprVstoreBox) |
194+
ast::ExprVstore(_, ast::ExprVstoreMutBox) => {
195+
self.gate_box(e.span);
196+
}
197+
_ => {}
198+
}
199+
visit::walk_expr(self, e, ());
200+
}
186201
}
187202

188203
pub fn check_crate(sess: Session, crate: &ast::Crate) {

branches/try2/src/librustc/middle/lint.rs

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -770,9 +770,21 @@ fn check_heap_type(cx: &Context, span: Span, ty: ty::t) {
770770
let mut n_uniq = 0;
771771
ty::fold_ty(cx.tcx, ty, |t| {
772772
match ty::get(t).sty {
773-
ty::ty_box(_) => n_box += 1,
774-
ty::ty_uniq(_) => n_uniq += 1,
775-
_ => ()
773+
ty::ty_box(_) | ty::ty_estr(ty::vstore_box) |
774+
ty::ty_evec(_, ty::vstore_box) |
775+
ty::ty_trait(_, _, ty::BoxTraitStore, _, _) => {
776+
n_box += 1;
777+
}
778+
ty::ty_uniq(_) | ty::ty_estr(ty::vstore_uniq) |
779+
ty::ty_evec(_, ty::vstore_uniq) |
780+
ty::ty_trait(_, _, ty::UniqTraitStore, _, _) => {
781+
n_uniq += 1;
782+
}
783+
ty::ty_closure(ref c) if c.sigil == ast::OwnedSigil => {
784+
n_uniq += 1;
785+
}
786+
787+
_ => ()
776788
};
777789
t
778790
});

branches/try2/src/librustdoc/clean.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,7 @@ pub struct Crate {
7373

7474
impl Clean<Crate> for visit_ast::RustdocVisitor {
7575
fn clean(&self) -> Crate {
76-
use syntax::attr::{find_linkage_metas, last_meta_item_value_str_by_name};
77-
let maybe_meta = last_meta_item_value_str_by_name(
78-
find_linkage_metas(self.attrs), "name");
76+
use syntax::attr::find_pkgid;
7977
let cx = local_data::get(super::ctxtkey, |x| *x.unwrap());
8078

8179
let mut externs = HashMap::new();
@@ -84,10 +82,9 @@ impl Clean<Crate> for visit_ast::RustdocVisitor {
8482
});
8583

8684
Crate {
87-
name: match maybe_meta {
88-
Some(x) => x.to_owned(),
89-
None => fail!("rustdoc requires a \\#[link(name=\"foo\")] \
90-
crate attribute"),
85+
name: match find_pkgid(self.attrs) {
86+
Some(n) => n.name,
87+
None => fail!("rustdoc requires a `pkgid` crate attribute"),
9188
},
9289
module: Some(self.module.clean()),
9390
externs: externs,

branches/try2/src/librustpkg/util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ pub fn compile_input(context: &BuildContext,
300300
pkg_id.version.to_str()).to_managed());
301301

302302
debug!("pkgid attr: {:?}", pkgid_attr);
303-
crate.attrs = ~[attr::mk_attr(pkgid_attr)];
303+
crate.attrs.push(attr::mk_attr(pkgid_attr));
304304
}
305305

306306
debug!("calling compile_crate_from_input, workspace = {},

branches/try2/src/librustuv/idle.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use std::libc::{c_int, c_void};
1313

1414
use uvll;
1515
use super::{Loop, UvHandle};
16-
use std::rt::rtio::{Callback, PausibleIdleCallback};
16+
use std::rt::rtio::{Callback, PausableIdleCallback};
1717

1818
pub struct IdleWatcher {
1919
handle: *uvll::uv_idle_t,
@@ -63,7 +63,7 @@ impl IdleWatcher {
6363
}
6464
}
6565

66-
impl PausibleIdleCallback for IdleWatcher {
66+
impl PausableIdleCallback for IdleWatcher {
6767
fn pause(&mut self) {
6868
if self.idle_flag == true {
6969
assert_eq!(unsafe {uvll::uv_idle_stop(self.handle) }, 0);
@@ -99,7 +99,7 @@ impl Drop for IdleWatcher {
9999
mod test {
100100
use super::*;
101101
use std::rt::tube::Tube;
102-
use std::rt::rtio::{Callback, PausibleIdleCallback};
102+
use std::rt::rtio::{Callback, PausableIdleCallback};
103103
use super::super::local_loop;
104104

105105
struct MyCallback(Tube<int>, int);

branches/try2/src/librustuv/uvio.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,8 @@ impl EventLoop for UvEventLoop {
153153
IdleWatcher::onetime(self.uvio.uv_loop(), f);
154154
}
155155

156-
fn pausible_idle_callback(&mut self, cb: ~Callback) -> ~PausibleIdleCallback {
157-
IdleWatcher::new(self.uvio.uv_loop(), cb) as ~PausibleIdleCallback
156+
fn pausable_idle_callback(&mut self, cb: ~Callback) -> ~PausableIdleCallback {
157+
IdleWatcher::new(self.uvio.uv_loop(), cb) as ~PausableIdleCallback
158158
}
159159

160160
fn remote_callback(&mut self, f: ~Callback) -> ~RemoteCallback {

branches/try2/src/libstd/cell.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ impl<T> RefCell<T> {
8181

8282
/// Mutably borrows the wrapped value.
8383
///
84-
/// The borrow lasts untile the returned `RefMut` exits scope. The value
84+
/// The borrow lasts until the returned `RefMut` exits scope. The value
8585
/// cannot be borrowed while this borrow is active.
8686
///
8787
/// Returns `None` if the value is currently borrowed.
@@ -98,7 +98,7 @@ impl<T> RefCell<T> {
9898

9999
/// Mutably borrows the wrapped value.
100100
///
101-
/// The borrow lasts untile the returned `RefMut` exits scope. The value
101+
/// The borrow lasts until the returned `RefMut` exits scope. The value
102102
/// cannot be borrowed while this borrow is active.
103103
///
104104
/// # Failure

branches/try2/src/libstd/char.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ fn decompose_hangul(s: char, f: |char|) {
256256
}
257257
}
258258

259-
/// Returns the canonical decompostion of a character
259+
/// Returns the canonical decomposition of a character.
260260
pub fn decompose_canonical(c: char, f: |char|) {
261261
if (c as uint) < S_BASE || (c as uint) >= (S_BASE + S_COUNT) {
262262
decompose::canonical(c, f);
@@ -265,7 +265,7 @@ pub fn decompose_canonical(c: char, f: |char|) {
265265
}
266266
}
267267

268-
/// Returns the compatibility decompostion of a character
268+
/// Returns the compatibility decomposition of a character.
269269
pub fn decompose_compatible(c: char, f: |char|) {
270270
if (c as uint) < S_BASE || (c as uint) >= (S_BASE + S_COUNT) {
271271
decompose::compatibility(c, f);

branches/try2/src/libstd/clone.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ pub trait Clone {
3333
/// Perform copy-assignment from `source`.
3434
///
3535
/// `a.clone_from(&b)` is equivalent to `a = b.clone()` in functionality,
36-
/// but can be overriden to reuse the resources of `a` to avoid unnecessary
36+
/// but can be overridden to reuse the resources of `a` to avoid unnecessary
3737
/// allocations.
3838
#[inline(always)]
3939
fn clone_from(&mut self, source: &Self) {
@@ -141,7 +141,7 @@ pub trait DeepClone: Clone {
141141
/// Perform deep copy-assignment from `source`.
142142
///
143143
/// `a.deep_clone_from(&b)` is equivalent to `a = b.deep_clone()` in
144-
/// functionality, but can be overriden to reuse the resources of `a` to
144+
/// functionality, but can be overridden to reuse the resources of `a` to
145145
/// avoid unnecessary allocations.
146146
#[inline(always)]
147147
fn deep_clone_from(&mut self, source: &Self) {

branches/try2/src/libstd/condition.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ pub struct Handler<T, U> {
8181
/// the condition (useful for debugging).
8282
///
8383
/// This struct should never be created directly, but rather only through the
84-
/// `condition!` macro provided to all libraries using libstd.
84+
/// `condition!` macro provided to all libraries using `std`.
8585
pub struct Condition<T, U> {
8686
/// Name of the condition handler
8787
name: &'static str,

branches/try2/src/libstd/fmt/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -606,9 +606,9 @@ pub fn writeln(output: &mut io::Writer, args: &Arguments) {
606606
/// See the documentation for `format` for why this function is unsafe and care
607607
/// should be taken if calling it manually.
608608
///
609-
/// Thankfully the rust compiler provides the macro `fmtf!` which will perform
610-
/// all of this validation at compile-time and provides a safe interface for
611-
/// invoking this function.
609+
/// Thankfully the rust compiler provides macros like `write!` and
610+
/// `format_args!` which perform all of this validation at compile-time
611+
/// and provide a safe interface for invoking this function.
612612
///
613613
/// # Arguments
614614
///

branches/try2/src/libstd/io/buffered.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,8 @@ impl<W: Writer> Decorator<W> for BufferedWriter<W> {
202202
fn inner_mut_ref<'a>(&'a mut self) -> &'a mut W { &mut self.inner }
203203
}
204204

205-
/// Wraps a Writer and buffers output to it, flushing whenever a newline (0xa,
206-
/// '\n') is detected.
205+
/// Wraps a Writer and buffers output to it, flushing whenever a newline (`0x0a`,
206+
/// `'\n'`) is detected.
207207
///
208208
/// Note that this structure does NOT flush the output when dropped.
209209
pub struct LineBufferedWriter<W> {

0 commit comments

Comments
 (0)