Skip to content

Commit 57b211d

Browse files
committed
---
yaml --- r: 103613 b: refs/heads/try c: 2e24adf h: refs/heads/master i: 103611: 0bb438d v: v3
1 parent 818cfb8 commit 57b211d

35 files changed

+66
-171
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: e90a8c4a35bffe6f0b9b46185147f907b79191ca
5+
refs/heads/try: 2e24adf52182b6162e42fed5ec004e73bbefa213
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,10 @@ src/.DS_Store
7575
/doc/latex
7676
/doc/std
7777
/doc/extra
78-
/doc/flate
7978
/doc/green
8079
/doc/native
8180
/doc/rustc
8281
/doc/syntax
83-
/doc/rustdoc
8482
/doc/rustuv
8583
/doc/rustpkg
8684
/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: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,8 +344,7 @@ 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 \
348-
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.native
347+
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.green
349348
else
350349
STDTESTDEP_$(1)_$(2)_$(3)_$(4) =
351350
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', [], 1), ('TotalOrd', ['TotalEq'], 1)]:
121+
('TotalEq', [], 2), ('TotalOrd', ['TotalEq'], 2)]:
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: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,13 @@ struct Node<T> {
4747
}
4848

4949
/// Double-ended DList iterator
50+
#[deriving(Clone)]
5051
pub struct Items<'a, T> {
5152
priv head: &'a Link<T>,
5253
priv tail: Rawlink<Node<T>>,
5354
priv nelem: uint,
5455
}
5556

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-
6157
/// Double-ended mutable DList iterator
6258
pub struct MutItems<'a, T> {
6359
priv list: &'a mut DList<T>,

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

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

5251
// These are used to test this portion of the compiler, they don't actually
5352
// mean anything
@@ -172,13 +171,6 @@ impl Visitor<()> for Context {
172171
}
173172
}
174173

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-
182174
_ => {}
183175
}
184176

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -766,8 +766,6 @@ 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)));
771769
encode_name(ecx, ebml_w, name);
772770
encode_type(ecx, ebml_w, node_id_to_type(ecx.tcx, ctor_id));
773771
encode_path(ecx, ebml_w, path, ast_map::PathName(name));

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

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012 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,6 +184,9 @@ 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+
187190
check_freevar_bounds(cx, fv.span, var_t, bounds, None);
188191
}
189192

@@ -444,6 +447,23 @@ pub fn check_trait_cast_bounds(cx: &Context, sp: Span, ty: ty::t,
444447
});
445448
}
446449

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+
447467
fn check_copy(cx: &Context, ty: ty::t, sp: Span, reason: &str) {
448468
debug!("type_contents({})={}",
449469
ty_to_str(cx.tcx, ty),

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

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

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

402+
#[deriving(Clone)]
402403
struct ArmData<'a,'b> {
403404
bodycx: &'b Block<'b>,
404405
arm: &'a ast::Arm,
405406
bindings_map: @BindingsMap
406407
}
407408

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-
413409
/**
414410
* Info about Match.
415411
* If all `pats` are matched then arm `data` will be executed.
@@ -2231,3 +2227,5 @@ fn bind_irrefutable_pat<'a>(
22312227
}
22322228
return bcx;
22332229
}
2230+
2231+

branches/try/src/libstd/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,13 @@
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, simd)];
55+
#[feature(macro_rules, globs, asm, managed_boxes, thread_local, link_args)];
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)];
6362

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

branches/try/src/libstd/rt/unwind.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,10 @@ pub fn begin_unwind_raw(msg: *u8, file: *u8, line: uint) -> ! {
391391
/// the actual formatting into this shared place.
392392
#[inline(never)] #[cold]
393393
pub fn begin_unwind_fmt(msg: &fmt::Arguments, file: &'static str, line: uint) -> ! {
394+
// We do two allocations here, unfortunately. But (a) they're
395+
// required with the current scheme, and (b) we don't handle
396+
// failure + OOM properly anyway (see comment in begin_unwind
397+
// below).
394398
begin_unwind_inner(~fmt::format(msg), file, line)
395399
}
396400

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

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

15-
#[experimental]
1615
#[simd]
1716
pub struct i8x16(i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8);
1817

19-
#[experimental]
2018
#[simd]
2119
pub struct i16x8(i16, i16, i16, i16, i16, i16, i16, i16);
2220

23-
#[experimental]
2421
#[simd]
2522
pub struct i32x4(i32, i32, i32, i32);
2623

27-
#[experimental]
2824
#[simd]
2925
pub struct i64x2(i64, i64);
3026

31-
#[experimental]
3227
#[simd]
3328
pub struct u8x16(u8, u8, u8, u8, u8, u8, u8, u8, u8, u8, u8, u8, u8, u8, u8, u8);
3429

35-
#[experimental]
3630
#[simd]
3731
pub struct u16x8(u16, u16, u16, u16, u16, u16, u16, u16);
3832

39-
#[experimental]
4033
#[simd]
4134
pub struct u32x4(u32, u32, u32, u32);
4235

43-
#[experimental]
4436
#[simd]
4537
pub struct u64x2(u64, u64);
4638

47-
#[experimental]
4839
#[simd]
4940
pub struct f32x4(f32, f32, f32, f32);
5041

51-
#[experimental]
5242
#[simd]
5343
pub struct f64x2(f64, f64);

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,14 @@ 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, self_f, other_f);
81+
let cmp = cx.expr_binary(span, op,
82+
cx.expr_deref(span, self_f),
83+
cx.expr_deref(span, other_f));
8284

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

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

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

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

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

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

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

11401138
f(cx, trait_span, called)

branches/try/src/test/auxiliary/issue_10031_aux.rs

Lines changed: 0 additions & 11 deletions
This file was deleted.

branches/try/src/test/compile-fail/deriving-no-inner-impl-error-message.rs

Lines changed: 0 additions & 24 deletions
This file was deleted.

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ struct Error;
2020
enum Enum {
2121
A {
2222
x: Error //~ ERROR
23+
//~^ ERROR
2324
}
2425
}
2526

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ struct Error;
2020
enum Enum {
2121
A(
2222
Error //~ ERROR
23+
//~^ ERROR
2324
)
2425
}
2526

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

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

2425
fn main() {}

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

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

2425
fn main() {}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ struct Error;
2020
enum Enum {
2121
A {
2222
x: Error //~ ERROR
23+
//~^ ERROR
2324
}
2425
}
2526

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ struct Error;
2020
enum Enum {
2121
A(
2222
Error //~ ERROR
23+
//~^ ERROR
2324
)
2425
}
2526

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

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

2425
fn main() {}

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

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

2425
fn main() {}

branches/try/src/test/compile-fail/gated-simd.rs

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)