Skip to content

Commit c38d6ce

Browse files
committed
---
yaml --- r: 103614 b: refs/heads/try c: a39be7c h: refs/heads/master v: v3
1 parent 57b211d commit c38d6ce

34 files changed

+171
-62
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 62f1d68439dcfd509eaca29887afa97f22938373
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 6e7f170fedd3c526a643c0b2d13863acd982be02
5-
refs/heads/try: 2e24adf52182b6162e42fed5ec004e73bbefa213
5+
refs/heads/try: a39be7ca2ef65f08c160404c1675d93ee7d0f059
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,12 @@ src/.DS_Store
7575
/doc/latex
7676
/doc/std
7777
/doc/extra
78+
/doc/flate
7879
/doc/green
7980
/doc/native
8081
/doc/rustc
8182
/doc/syntax
83+
/doc/rustdoc
8284
/doc/rustuv
8385
/doc/rustpkg
8486
/nd/

branches/try/doc/guide-runtime.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ implemented in user-space.
176176
The primary concern of an M:N runtime is that a Rust task cannot block itself in
177177
a syscall. If this happens, then the entire OS thread is frozen and unavailable
178178
for running more Rust tasks, making this a (M-1):N runtime (and you can see how
179-
this can reach 0/deadlock. By using asynchronous I/O under the hood (all I/O
179+
this can reach 0/deadlock). By using asynchronous I/O under the hood (all I/O
180180
still looks synchronous in terms of code), OS threads are never blocked until
181181
the appropriate time comes.
182182

branches/try/mk/tests.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,8 @@ ifeq ($(NO_REBUILD),)
344344
STDTESTDEP_$(1)_$(2)_$(3)_$(4) = $$(SREQ$(1)_T_$(2)_H_$(3)) \
345345
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.extra \
346346
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.rustuv \
347-
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.green
347+
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.green \
348+
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.native
348349
else
349350
STDTESTDEP_$(1)_$(2)_$(3)_$(4) =
350351
endif

branches/try/src/etc/generate-deriving-span-tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def write_file(name, string):
118118
for (trait, supers, errs) in [('Rand', [], 1),
119119
('Clone', [], 1), ('DeepClone', ['Clone'], 1),
120120
('Eq', [], 2), ('Ord', [], 8),
121-
('TotalEq', [], 2), ('TotalOrd', ['TotalEq'], 2)]:
121+
('TotalEq', [], 1), ('TotalOrd', ['TotalEq'], 1)]:
122122
traits[trait] = (ALL, supers, errs)
123123

124124
for (trait, (types, super_traits, error_count)) in traits.items():

branches/try/src/libextra/dlist.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,17 @@ struct Node<T> {
4747
}
4848

4949
/// Double-ended DList iterator
50-
#[deriving(Clone)]
5150
pub struct Items<'a, T> {
5251
priv head: &'a Link<T>,
5352
priv tail: Rawlink<Node<T>>,
5453
priv nelem: uint,
5554
}
5655

56+
// FIXME #11820: the &'a Option<> of the Link stops clone working.
57+
impl<'a, T> Clone for Items<'a, T> {
58+
fn clone(&self) -> Items<'a, T> { *self }
59+
}
60+
5761
/// Double-ended mutable DList iterator
5862
pub struct MutItems<'a, T> {
5963
priv list: &'a mut DList<T>,

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ static KNOWN_FEATURES: &'static [(&'static str, Status)] = &[
4747
("macro_registrar", Active),
4848
("log_syntax", Active),
4949
("trace_macros", Active),
50+
("simd", Active),
5051

5152
// These are used to test this portion of the compiler, they don't actually
5253
// mean anything
@@ -171,6 +172,13 @@ impl Visitor<()> for Context {
171172
}
172173
}
173174

175+
ast::ItemStruct(..) => {
176+
if attr::contains_name(i.attrs, "simd") {
177+
self.gate_feature("simd", i.span,
178+
"SIMD types are experimental and possibly buggy");
179+
}
180+
}
181+
174182
_ => {}
175183
}
176184

branches/try/src/librustc/metadata/encoder.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -766,6 +766,8 @@ fn encode_info_for_struct_ctor(ecx: &EncodeContext,
766766
ebml_w.start_tag(tag_items_data_item);
767767
encode_def_id(ebml_w, local_def(ctor_id));
768768
encode_family(ebml_w, 'f');
769+
encode_bounds_and_type(ebml_w, ecx,
770+
&lookup_item_type(ecx.tcx, local_def(ctor_id)));
769771
encode_name(ecx, ebml_w, name);
770772
encode_type(ecx, ebml_w, node_id_to_type(ecx.tcx, ctor_id));
771773
encode_path(ecx, ebml_w, path, ast_map::PathName(name));

branches/try/src/librustc/middle/kind.rs

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012-2014 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
//
@@ -184,9 +184,6 @@ fn with_appropriate_checker(cx: &Context,
184184
let id = ast_util::def_id_of_def(fv.def).node;
185185
let var_t = ty::node_id_to_type(cx.tcx, id);
186186

187-
// check that only immutable variables are implicitly copied in
188-
check_imm_free_var(cx, fv.def, fv.span);
189-
190187
check_freevar_bounds(cx, fv.span, var_t, bounds, None);
191188
}
192189

@@ -447,23 +444,6 @@ pub fn check_trait_cast_bounds(cx: &Context, sp: Span, ty: ty::t,
447444
});
448445
}
449446

450-
fn check_imm_free_var(cx: &Context, def: Def, sp: Span) {
451-
match def {
452-
DefLocal(_, BindByValue(MutMutable)) => {
453-
cx.tcx.sess.span_err(
454-
sp,
455-
"mutable variables cannot be implicitly captured");
456-
}
457-
DefLocal(..) | DefArg(..) | DefBinding(..) => { /* ok */ }
458-
DefUpvar(_, def1, _, _) => { check_imm_free_var(cx, *def1, sp); }
459-
_ => {
460-
cx.tcx.sess.span_bug(
461-
sp,
462-
format!("unknown def for free variable: {:?}", def));
463-
}
464-
}
465-
}
466-
467447
fn check_copy(cx: &Context, ty: ty::t, sp: Span, reason: &str) {
468448
debug!("type_contents({})={}",
469449
ty_to_str(cx.tcx, ty),

branches/try/src/librustc/middle/trans/_match.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -399,13 +399,17 @@ struct BindingInfo {
399399

400400
type BindingsMap = HashMap<Ident, BindingInfo>;
401401

402-
#[deriving(Clone)]
403402
struct ArmData<'a,'b> {
404403
bodycx: &'b Block<'b>,
405404
arm: &'a ast::Arm,
406405
bindings_map: @BindingsMap
407406
}
408407

408+
// FIXME #11820: method resolution is unreliable with &
409+
impl<'a,'b> Clone for ArmData<'a, 'b> {
410+
fn clone(&self) -> ArmData<'a, 'b> { *self }
411+
}
412+
409413
/**
410414
* Info about Match.
411415
* If all `pats` are matched then arm `data` will be executed.
@@ -2227,5 +2231,3 @@ fn bind_irrefutable_pat<'a>(
22272231
}
22282232
return bcx;
22292233
}
2230-
2231-

branches/try/src/libstd/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,14 @@
5252
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
5353
html_root_url = "http://static.rust-lang.org/doc/master")];
5454

55-
#[feature(macro_rules, globs, asm, managed_boxes, thread_local, link_args)];
55+
#[feature(macro_rules, globs, asm, managed_boxes, thread_local, link_args, simd)];
5656

5757
// Don't link to std. We are std.
5858
#[no_std];
5959

6060
#[deny(non_camel_case_types)];
6161
#[deny(missing_doc)];
62+
#[allow(unknown_features)];
6263

6364
// When testing libstd, bring in libuv as the I/O backend so tests can print
6465
// things and all of the std::io tests have an I/O interface to run on top

branches/try/src/libstd/unstable/simd.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,32 +12,42 @@
1212
1313
#[allow(non_camel_case_types)];
1414

15+
#[experimental]
1516
#[simd]
1617
pub struct i8x16(i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8);
1718

19+
#[experimental]
1820
#[simd]
1921
pub struct i16x8(i16, i16, i16, i16, i16, i16, i16, i16);
2022

23+
#[experimental]
2124
#[simd]
2225
pub struct i32x4(i32, i32, i32, i32);
2326

27+
#[experimental]
2428
#[simd]
2529
pub struct i64x2(i64, i64);
2630

31+
#[experimental]
2732
#[simd]
2833
pub struct u8x16(u8, u8, u8, u8, u8, u8, u8, u8, u8, u8, u8, u8, u8, u8, u8, u8);
2934

35+
#[experimental]
3036
#[simd]
3137
pub struct u16x8(u16, u16, u16, u16, u16, u16, u16, u16);
3238

39+
#[experimental]
3340
#[simd]
3441
pub struct u32x4(u32, u32, u32, u32);
3542

43+
#[experimental]
3644
#[simd]
3745
pub struct u64x2(u64, u64);
3846

47+
#[experimental]
3948
#[simd]
4049
pub struct f32x4(f32, f32, f32, f32);
4150

51+
#[experimental]
4252
#[simd]
4353
pub struct f64x2(f64, f64);

branches/try/src/libsyntax/ext/deriving/cmp/ord.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,10 @@ fn cs_op(less: bool, equal: bool, cx: &ExtCtxt, span: Span, substr: &Substructur
7878
_ => cx.span_bug(span, "Not exactly 2 arguments in `deriving(Ord)`")
7979
};
8080

81-
let cmp = cx.expr_binary(span, op,
82-
cx.expr_deref(span, self_f),
83-
cx.expr_deref(span, other_f));
81+
let cmp = cx.expr_binary(span, op, self_f, other_f);
8482

8583
let not_cmp = cx.expr_unary(span, ast::UnNot,
86-
cx.expr_binary(span, op,
87-
cx.expr_deref(span, other_f),
88-
cx.expr_deref(span, self_f)));
84+
cx.expr_binary(span, op, other_f, self_f));
8985

9086
let and = cx.expr_binary(span, ast::BiAnd, not_cmp, subexpr);
9187
cx.expr_binary(span, ast::BiOr, cmp, and)

branches/try/src/libsyntax/ext/deriving/generic.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1013,7 +1013,8 @@ impl<'a> TraitDef<'a> {
10131013
};
10141014
let path = cx.path_ident(sp, cx.ident_of(format!("{}_{}", prefix, i)));
10151015
paths.push(path.clone());
1016-
ident_expr.push((sp, opt_id, cx.expr_path(path)));
1016+
let val = cx.expr(sp, ast::ExprParen(cx.expr_deref(sp, cx.expr_path(path))));
1017+
ident_expr.push((sp, opt_id, val));
10171018
}
10181019

10191020
let subpats = self.create_subpatterns(paths, mutbl);
@@ -1057,7 +1058,8 @@ impl<'a> TraitDef<'a> {
10571058
let path = cx.path_ident(sp, cx.ident_of(format!("{}_{}", prefix, i)));
10581059

10591060
paths.push(path.clone());
1060-
ident_expr.push((sp, None, cx.expr_path(path)));
1061+
let val = cx.expr(sp, ast::ExprParen(cx.expr_deref(sp, cx.expr_path(path))));
1062+
ident_expr.push((sp, None, val));
10611063
}
10621064

10631065
let subpats = self.create_subpatterns(paths, mutbl);
@@ -1132,7 +1134,7 @@ pub fn cs_same_method(f: |&ExtCtxt, Span, ~[@Expr]| -> @Expr,
11321134
cx.expr_method_call(field.span,
11331135
field.self_,
11341136
substructure.method_ident,
1135-
field.other.clone())
1137+
field.other.map(|e| cx.expr_addr_of(field.span, *e)))
11361138
});
11371139

11381140
f(cx, trait_span, called)
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
pub struct Wrap<A>(A);
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
struct NoCloneOrEq;
12+
13+
#[deriving(Eq)]
14+
struct E {
15+
x: NoCloneOrEq //~ ERROR does not implement any method in scope named `eq`
16+
//~^ ERROR does not implement any method in scope named `ne`
17+
}
18+
#[deriving(Clone)]
19+
struct C {
20+
x: NoCloneOrEq //~ ERROR does not implement any method in scope named `clone`
21+
}
22+
23+
24+
fn main() {}

branches/try/src/test/compile-fail/deriving-span-TotalEq-enum-struct-variant.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ struct Error;
2020
enum Enum {
2121
A {
2222
x: Error //~ ERROR
23-
//~^ ERROR
2423
}
2524
}
2625

branches/try/src/test/compile-fail/deriving-span-TotalEq-enum.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ struct Error;
2020
enum Enum {
2121
A(
2222
Error //~ ERROR
23-
//~^ ERROR
2423
)
2524
}
2625

branches/try/src/test/compile-fail/deriving-span-TotalEq-struct.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ struct Error;
1919
#[deriving(TotalEq)]
2020
struct Struct {
2121
x: Error //~ ERROR
22-
//~^ ERROR
2322
}
2423

2524
fn main() {}

branches/try/src/test/compile-fail/deriving-span-TotalEq-tuple-struct.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ struct Error;
1919
#[deriving(TotalEq)]
2020
struct Struct(
2121
Error //~ ERROR
22-
//~^ ERROR
2322
);
2423

2524
fn main() {}

branches/try/src/test/compile-fail/deriving-span-TotalOrd-enum-struct-variant.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ struct Error;
2020
enum Enum {
2121
A {
2222
x: Error //~ ERROR
23-
//~^ ERROR
2423
}
2524
}
2625

branches/try/src/test/compile-fail/deriving-span-TotalOrd-enum.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ struct Error;
2020
enum Enum {
2121
A(
2222
Error //~ ERROR
23-
//~^ ERROR
2423
)
2524
}
2625

branches/try/src/test/compile-fail/deriving-span-TotalOrd-struct.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ struct Error;
1919
#[deriving(TotalOrd,TotalEq)]
2020
struct Struct {
2121
x: Error //~ ERROR
22-
//~^ ERROR
2322
}
2423

2524
fn main() {}

branches/try/src/test/compile-fail/deriving-span-TotalOrd-tuple-struct.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ struct Error;
1919
#[deriving(TotalOrd,TotalEq)]
2020
struct Struct(
2121
Error //~ ERROR
22-
//~^ ERROR
2322
);
2423

2524
fn main() {}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
#[simd]
12+
pub struct i64x2(i64, i64); //~ ERROR: SIMD types are experimental
13+
14+
fn main() {}

0 commit comments

Comments
 (0)