Skip to content

Commit 037ed5e

Browse files
committed
---
yaml --- r: 147241 b: refs/heads/try2 c: f97040a h: refs/heads/master i: 147239: 29fbae4 v: v3
1 parent e1bb86f commit 037ed5e

File tree

146 files changed

+155
-404
lines changed

Some content is hidden

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

146 files changed

+155
-404
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: ef7969e86f0b53e4236ca627b31ac09413c07b82
8+
refs/heads/try2: f97040a93b7320af9963660b24a4b60b8bdd461a
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: 10 additions & 22 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,24 +544,12 @@ then
544544
putvar CFG_ENABLE_CLANG
545545
fi
546546

547+
547548
if [ -z "$CFG_ENABLE_CLANG" -a -z "$CFG_GCC" ]
548549
then
549550
err "either clang or gcc is required"
550551
fi
551552

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-
565553
if [ ! -z "$CFG_LLVM_ROOT" -a -e "$CFG_LLVM_ROOT/bin/llvm-config" ]
566554
then
567555
step_msg "using custom LLVM at $CFG_LLVM_ROOT"
@@ -570,20 +558,20 @@ then
570558
LLVM_VERSION=$($LLVM_CONFIG --version)
571559

572560
case $LLVM_VERSION in
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-
;;
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+
;;
579567
esac
580568
fi
581569

582570
if [ ! -z "$CFG_ENABLE_CLANG" ]
583571
then
584572
if [ -z "$CFG_CLANG" ]
585573
then
586-
err "clang requested but not found"
574+
err "clang requested but not found"
587575
fi
588576
CFG_CLANG_VERSION=$("$CFG_CLANG" \
589577
--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 slightly
279+
* used instead of RWArc in cases where no readers are needed and sightly
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-
//! extern mod extra;
33+
//! exter 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-
/// Whether it has an argument
117+
/// Wheter 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 occurred.
157+
/// The type of failure that occured.
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-based deletion.
21+
/// scope-pased deletion.
2222
pub struct TempDir {
2323
priv path: Option<Path>
2424
}

branches/try2/src/libextra/uuid.rs

Lines changed: 9 additions & 13 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 hexadecimal digits,
20+
displayed in a readable string form as a sequence of hexadecimals 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 compatibility
92+
/// Reserved by the NCS for backward compatability
9393
VariantNCS,
9494
/// As described in the RFC4122 Specification (default)
9595
VariantRFC4122,
96-
/// Reserved by Microsoft for backward compatibility
96+
/// Resreved by Microsoft for backward compatability
9797
VariantMicrosoft,
9898
/// Reserved for future expansion
9999
VariantFuture,
@@ -175,7 +175,7 @@ impl Uuid {
175175
pub fn new_v4() -> Uuid {
176176
let ub = rand::task_rng().gen_vec(16);
177177
let mut uuid = Uuid{ bytes: [0, .. 16] };
178-
vec::bytes::copy_memory(uuid.bytes, ub, 16);
178+
vec::bytes::copy_memory(uuid.bytes, ub);
179179
uuid.set_variant(VariantRFC4122);
180180
uuid.set_version(Version4Random);
181181
uuid
@@ -202,7 +202,7 @@ impl Uuid {
202202
fields.data1 = to_be32(d1 as i32) as u32;
203203
fields.data2 = to_be16(d2 as i16) as u16;
204204
fields.data3 = to_be16(d3 as i16) as u16;
205-
vec::bytes::copy_memory(fields.data4, d4, 8);
205+
vec::bytes::copy_memory(fields.data4, d4);
206206

207207
unsafe {
208208
transmute(fields)
@@ -220,7 +220,7 @@ impl Uuid {
220220

221221
let mut uuid = Uuid{ bytes: [0, .. 16] };
222222
unsafe {
223-
vec::raw::copy_memory(uuid.bytes, b, 16);
223+
vec::raw::copy_memory(uuid.bytes, b);
224224
}
225225
Some(uuid)
226226
}
@@ -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 hyphen.
316+
/// Returns a string of hexadecimal digits, separated into groups with a hypen
317317
///
318318
/// Example: `550e8400-e29b-41d4-a716-446655440000`
319319
pub fn to_hyphenated_str(&self) -> ~str {
@@ -442,11 +442,7 @@ impl Zero for Uuid {
442442

443443
impl Clone for Uuid {
444444
/// Returns a copy of the UUID
445-
fn clone(&self) -> Uuid {
446-
let mut clone = Uuid{ bytes: [0, .. 16] };
447-
vec::bytes::copy_memory(clone.bytes, self.bytes, 16);
448-
clone
449-
}
445+
fn clone(&self) -> Uuid { *self }
450446
}
451447

452448
impl FromStr for Uuid {
@@ -509,7 +505,7 @@ impl rand::Rand for Uuid {
509505
fn rand<R: rand::Rng>(rng: &mut R) -> Uuid {
510506
let ub = rng.gen_vec(16);
511507
let mut uuid = Uuid{ bytes: [0, .. 16] };
512-
vec::bytes::copy_memory(uuid.bytes, ub, 16);
508+
vec::bytes::copy_memory(uuid.bytes, ub);
513509
uuid.set_variant(VariantRFC4122);
514510
uuid.set_version(Version4Random);
515511
uuid

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

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,6 @@ 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-
8880
fn has_feature(&self, feature: &str) -> bool {
8981
self.features.iter().any(|n| n.as_slice() == feature)
9082
}
@@ -180,24 +172,17 @@ impl Visitor<()> for Context {
180172
experimental and likely to be removed");
181173

182174
},
183-
ast::ty_box(_) => { self.gate_box(t.span); }
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+
}
184181
_ => {}
185182
}
186183

187184
visit::walk_ty(self, t, ());
188185
}
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-
}
201186
}
202187

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

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

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -770,21 +770,9 @@ 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(_) | 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-
_ => ()
773+
ty::ty_box(_) => n_box += 1,
774+
ty::ty_uniq(_) => n_uniq += 1,
775+
_ => ()
788776
};
789777
t
790778
});

branches/try2/src/librustc/util/sha2.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -136,16 +136,14 @@ impl FixedBuffer for FixedBuffer64 {
136136
if input.len() >= buffer_remaining {
137137
copy_memory(
138138
self.buffer.mut_slice(self.buffer_idx, size),
139-
input.slice_to(buffer_remaining),
140-
buffer_remaining);
139+
input.slice_to(buffer_remaining));
141140
self.buffer_idx = 0;
142141
func(self.buffer);
143142
i += buffer_remaining;
144143
} else {
145144
copy_memory(
146145
self.buffer.mut_slice(self.buffer_idx, self.buffer_idx + input.len()),
147-
input,
148-
input.len());
146+
input);
149147
self.buffer_idx += input.len();
150148
return;
151149
}
@@ -164,8 +162,7 @@ impl FixedBuffer for FixedBuffer64 {
164162
let input_remaining = input.len() - i;
165163
copy_memory(
166164
self.buffer.mut_slice(0, input_remaining),
167-
input.slice_from(i),
168-
input.len() - i);
165+
input.slice_from(i));
169166
self.buffer_idx += input_remaining;
170167
}
171168

branches/try2/src/librustdoc/clean.rs

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

7474
impl Clean<Crate> for visit_ast::RustdocVisitor {
7575
fn clean(&self) -> Crate {
76-
use syntax::attr::find_pkgid;
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");
7779
let cx = local_data::get(super::ctxtkey, |x| *x.unwrap());
7880

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

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

branches/try2/src/librustpkg/sha1.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -149,16 +149,14 @@ impl FixedBuffer for FixedBuffer64 {
149149
if input.len() >= buffer_remaining {
150150
copy_memory(
151151
self.buffer.mut_slice(self.buffer_idx, size),
152-
input.slice_to(buffer_remaining),
153-
buffer_remaining);
152+
input.slice_to(buffer_remaining));
154153
self.buffer_idx = 0;
155154
func(self.buffer);
156155
i += buffer_remaining;
157156
} else {
158157
copy_memory(
159158
self.buffer.mut_slice(self.buffer_idx, self.buffer_idx + input.len()),
160-
input,
161-
input.len());
159+
input);
162160
self.buffer_idx += input.len();
163161
return;
164162
}
@@ -177,8 +175,7 @@ impl FixedBuffer for FixedBuffer64 {
177175
let input_remaining = input.len() - i;
178176
copy_memory(
179177
self.buffer.mut_slice(0, input_remaining),
180-
input.slice_from(i),
181-
input.len() - i);
178+
input.slice_from(i));
182179
self.buffer_idx += input_remaining;
183180
}
184181

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.push(attr::mk_attr(pkgid_attr));
303+
crate.attrs = ~[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, PausableIdleCallback};
16+
use std::rt::rtio::{Callback, PausibleIdleCallback};
1717

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

66-
impl PausableIdleCallback for IdleWatcher {
66+
impl PausibleIdleCallback 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, PausableIdleCallback};
102+
use std::rt::rtio::{Callback, PausibleIdleCallback};
103103
use super::super::local_loop;
104104

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

0 commit comments

Comments
 (0)