Skip to content

Commit c8c1e7a

Browse files
committed
---
yaml --- r: 44742 b: refs/heads/master c: 194f29c h: refs/heads/master v: v3
1 parent b847ec1 commit c8c1e7a

File tree

105 files changed

+2816
-2104
lines changed

Some content is hidden

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

105 files changed

+2816
-2104
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 88f8868158c71b4bf2a563f2f77152c8696d2c87
2+
refs/heads/master: 194f29c20fb86fa163f35e9cd0540ae2b0d41b9d
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: a6d9689399d091c3265f00434a69c551a61c28dc
55
refs/heads/try: ef355f6332f83371e4acf04fc4eb940ab41d78d3

trunk/src/etc/emacs/rust-mode.el

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,17 +66,22 @@
6666
"trait" "struct" "fn" "enum"
6767
"impl"))
6868
(puthash word 'def table))
69-
(dolist (word '("as" "break"
70-
"copy" "do" "drop" "else"
71-
"extern" "for" "if" "let" "log"
72-
"loop" "once" "priv" "pub" "pure"
73-
"ref" "return" "static" "unsafe" "use"
74-
"while" "while"
75-
"assert"
76-
"mut"))
69+
(dolist (word '("again" "assert"
70+
"break"
71+
"copy"
72+
"do" "drop"
73+
"else" "export" "extern"
74+
"fail" "for"
75+
"if" "use"
76+
"let" "log" "loop"
77+
"move" "new"
78+
"pure" "pub" "priv"
79+
"ref" "return" "static"
80+
"unchecked" "unsafe"
81+
"while"))
7782
(puthash word t table))
7883
(puthash "match" 'alt table)
79-
(dolist (word '("self" "true" "false")) (puthash word 'atom table))
84+
(dolist (word '("true" "false")) (puthash word 'atom table))
8085
table))
8186
;; FIXME type-context keywords
8287

trunk/src/etc/x86.supp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -422,13 +422,6 @@
422422
...
423423
}
424424

425-
{
426-
enum-instruction-scheduling-9
427-
Memcheck:Cond
428-
fun:*get_authority*
429-
...
430-
}
431-
432425
{
433426
llvm-user-new-leak
434427
Memcheck:Leak

trunk/src/libcore/iter.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012-2013 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
//
@@ -69,7 +69,7 @@ pub trait CopyableNonstrictIter<A:Copy> {
6969
pure fn each_val(&const self, f: &fn(A) -> bool);
7070
}
7171

72-
// A trait for sequences that can be built by imperatively pushing elements
72+
// A trait for sequences that can be by imperatively pushing elements
7373
// onto them.
7474
pub trait Buildable<A> {
7575
/**
@@ -198,7 +198,7 @@ pub pure fn position<A,IA:BaseIter<A>>(self: &IA, f: fn(&A) -> bool)
198198
}
199199

200200
// note: 'rposition' would only make sense to provide with a bidirectional
201-
// iter interface, such as would provide "reach" in addition to "each". As is,
201+
// iter interface, such as would provide "reach" in addition to "each". as is,
202202
// it would have to be implemented with foldr, which is too inefficient.
203203

204204
#[inline(always)]
@@ -269,13 +269,13 @@ pub pure fn build<A,B: Buildable<A>>(builder: fn(push: pure fn(A)))
269269

270270
/**
271271
* Builds a sequence by calling a provided function with an argument
272-
* function that pushes an element to the back of the sequence.
272+
* function that pushes an element to the back of a sequence.
273273
* This version takes an initial size for the sequence.
274274
*
275275
* # Arguments
276276
*
277277
* * size - An option, maybe containing initial size of the sequence
278-
* to reserve.
278+
* to reserve
279279
* * builder - A function that will construct the sequence. It receives
280280
* as an argument a function that will push an element
281281
* onto the sequence being constructed.
@@ -290,7 +290,7 @@ pub pure fn build_sized_opt<A,B: Buildable<A>>(
290290

291291
// Functions that combine iteration and building
292292

293-
/// Applies a function to each element of an iterable and returns the results.
293+
/// Apply a function to each element of an iterable and return the results
294294
#[inline(always)]
295295
pub fn map<T,IT: BaseIter<T>,U,BU: Buildable<U>>(v: &IT, f: fn(&T) -> U)
296296
-> BU {
@@ -302,7 +302,7 @@ pub fn map<T,IT: BaseIter<T>,U,BU: Buildable<U>>(v: &IT, f: fn(&T) -> U)
302302
}
303303

304304
/**
305-
* Creates and initializes a generic sequence from a function.
305+
* Creates and initializes a generic sequence from a function
306306
*
307307
* Creates a generic sequence of size `n_elts` and initializes the elements
308308
* to the value returned by the function `op`.
@@ -317,7 +317,7 @@ pub pure fn from_fn<T,BT: Buildable<T>>(n_elts: uint,
317317
}
318318

319319
/**
320-
* Creates and initializes a generic sequence with some elements.
320+
* Creates and initializes a generic sequence with some element
321321
*
322322
* Creates an immutable vector of size `n_elts` and initializes the elements
323323
* to the value `t`.
@@ -331,7 +331,7 @@ pub pure fn from_elem<T:Copy,BT:Buildable<T>>(n_elts: uint,
331331
}
332332
}
333333

334-
/// Appends two generic sequences.
334+
/// Appending two generic sequences
335335
#[inline(always)]
336336
pub pure fn append<T:Copy,IT:BaseIter<T>,BT:Buildable<T>>(
337337
lhs: &IT, rhs: &IT) -> BT {

trunk/src/libfuzzer/fuzzer.rc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ pub pure fn safe_to_use_expr(e: ast::expr, tm: test_mode) -> bool {
134134

135135
pub fn safe_to_steal_ty(t: @ast::Ty, tm: test_mode) -> bool {
136136
// Restrictions happen to be the same.
137-
safe_to_replace_ty(t.node, tm)
137+
safe_to_replace_ty(&t.node, tm)
138138
}
139139

140140
// Not type-parameterized: https://github.com/mozilla/rust/issues/898 (FIXED)
@@ -175,8 +175,8 @@ pub fn steal(crate: ast::crate, tm: test_mode) -> StolenStuff {
175175
}
176176

177177

178-
pub fn safe_to_replace_expr(e: ast::expr_, _tm: test_mode) -> bool {
179-
match e {
178+
pub fn safe_to_replace_expr(e: &ast::expr_, _tm: test_mode) -> bool {
179+
match *e {
180180
// https://github.com/mozilla/rust/issues/652
181181
ast::expr_if(*) => { false }
182182
ast::expr_block(_) => { false }
@@ -188,8 +188,8 @@ pub fn safe_to_replace_expr(e: ast::expr_, _tm: test_mode) -> bool {
188188
}
189189
}
190190

191-
pub fn safe_to_replace_ty(t: ast::ty_, _tm: test_mode) -> bool {
192-
match t {
191+
pub fn safe_to_replace_ty(t: &ast::ty_, _tm: test_mode) -> bool {
192+
match *t {
193193
ast::ty_infer => { false } // always implicit, always top level
194194
ast::ty_bot => { false } // in source, can only appear
195195
// as the out type of a function
@@ -204,7 +204,7 @@ pub fn replace_expr_in_crate(crate: ast::crate, i: uint,
204204
ast::crate {
205205
let j: @mut uint = @mut 0u;
206206
fn fold_expr_rep(j_: @mut uint, i_: uint, newexpr_: ast::expr_,
207-
original: ast::expr_, fld: fold::ast_fold,
207+
original: &ast::expr_, fld: fold::ast_fold,
208208
tm_: test_mode) ->
209209
ast::expr_ {
210210
*j_ += 1u;
@@ -221,7 +221,7 @@ pub fn replace_expr_in_crate(crate: ast::crate, i: uint,
221221
.. *fold::default_ast_fold()
222222
};
223223
let af = fold::make_fold(afp);
224-
let crate2: @ast::crate = @af.fold_crate(crate);
224+
let crate2: @ast::crate = @af.fold_crate(&crate);
225225
*crate2
226226
}
227227

@@ -231,7 +231,7 @@ pub fn replace_ty_in_crate(crate: ast::crate, i: uint, newty: ast::Ty,
231231
tm: test_mode) -> ast::crate {
232232
let j: @mut uint = @mut 0u;
233233
fn fold_ty_rep(j_: @mut uint, i_: uint, newty_: ast::ty_,
234-
original: ast::ty_, fld: fold::ast_fold,
234+
original: &ast::ty_, fld: fold::ast_fold,
235235
tm_: test_mode) ->
236236
ast::ty_ {
237237
*j_ += 1u;
@@ -244,7 +244,7 @@ pub fn replace_ty_in_crate(crate: ast::crate, i: uint, newty: ast::Ty,
244244
.. *fold::default_ast_fold()
245245
};
246246
let af = fold::make_fold(afp);
247-
let crate2: @ast::crate = @af.fold_crate(crate);
247+
let crate2: @ast::crate = @af.fold_crate(&crate);
248248
*crate2
249249
}
250250

trunk/src/librustc/driver/driver.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ pub fn pretty_print_input(sess: Session, +cfg: ast::crate_cfg, input: input,
396396
pprust::node_block(s, ref blk) => {
397397
pp::space(s.s);
398398
pprust::synth_comment(
399-
s, ~"block " + int::to_str((*blk).node.id));
399+
s, ~"block " + int::to_str(blk.node.id));
400400
}
401401
pprust::node_expr(s, expr) => {
402402
pp::space(s.s);

trunk/src/librustc/driver/session.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ pub mod test {
358358
pub fn make_crate_type_attr(+t: ~str) -> ast::attribute {
359359
codemap::respan(codemap::dummy_sp(), ast::attribute_ {
360360
style: ast::attr_outer,
361-
value: codemap::respan(codemap::dummy_sp(),
361+
value: @codemap::respan(codemap::dummy_sp(),
362362
ast::meta_name_value(
363363
@~"crate_type",
364364
codemap::respan(codemap::dummy_sp(),

trunk/src/librustc/front/config.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ pub fn strip_items(crate: @ast::crate, in_cfg: in_cfg_pred)
4545
.. *fold::default_ast_fold()};
4646

4747
let fold = fold::make_fold(precursor);
48-
let res = @fold.fold_crate(*crate);
48+
let res = @fold.fold_crate(&*crate);
4949
return res;
5050
}
5151

@@ -63,7 +63,7 @@ fn filter_view_item(cx: @Context, &&view_item: @ast::view_item
6363
}
6464
}
6565

66-
fn fold_mod(cx: @Context, m: ast::_mod, fld: fold::ast_fold) -> ast::_mod {
66+
fn fold_mod(cx: @Context, m: &ast::_mod, fld: fold::ast_fold) -> ast::_mod {
6767
let filtered_items =
6868
m.items.filter_mapped(|a| filter_item(cx, *a));
6969
let filtered_view_items =
@@ -83,7 +83,7 @@ fn filter_foreign_item(cx: @Context, &&item: @ast::foreign_item) ->
8383

8484
fn fold_foreign_mod(
8585
cx: @Context,
86-
nm: ast::foreign_mod,
86+
nm: &ast::foreign_mod,
8787
fld: fold::ast_fold
8888
) -> ast::foreign_mod {
8989
let filtered_items =
@@ -98,21 +98,21 @@ fn fold_foreign_mod(
9898
}
9999
}
100100

101-
fn fold_item_underscore(cx: @Context, +item: ast::item_,
101+
fn fold_item_underscore(cx: @Context, item: &ast::item_,
102102
fld: fold::ast_fold) -> ast::item_ {
103-
let item = match item {
104-
ast::item_impl(a, b, c, methods) => {
103+
let item = match *item {
104+
ast::item_impl(ref a, b, c, ref methods) => {
105105
let methods = methods.filtered(|m| method_in_cfg(cx, *m) );
106-
ast::item_impl(a, b, c, methods)
106+
ast::item_impl(/*bad*/ copy *a, b, c, methods)
107107
}
108108
ast::item_trait(ref a, ref b, ref methods) => {
109109
let methods = methods.filtered(|m| trait_method_in_cfg(cx, m) );
110110
ast::item_trait(/*bad*/copy *a, /*bad*/copy *b, methods)
111111
}
112-
item => item
112+
ref item => /*bad*/ copy *item
113113
};
114114

115-
fold::noop_fold_item_underscore(item, fld)
115+
fold::noop_fold_item_underscore(&item, fld)
116116
}
117117

118118
fn filter_stmt(cx: @Context, &&stmt: @ast::stmt) ->
@@ -134,7 +134,7 @@ fn filter_stmt(cx: @Context, &&stmt: @ast::stmt) ->
134134

135135
fn fold_block(
136136
cx: @Context,
137-
b: ast::blk_,
137+
b: &ast::blk_,
138138
fld: fold::ast_fold
139139
) -> ast::blk_ {
140140
let filtered_stmts =

trunk/src/librustc/front/core_inject.rs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ fn inject_libcore_ref(sess: Session,
5050
attrs: ~[
5151
spanned(ast::attribute_ {
5252
style: ast::attr_inner,
53-
value: spanned(ast::meta_name_value(
53+
value: @spanned(ast::meta_name_value(
5454
@~"vers",
5555
spanned(ast::lit_str(@CORE_VERSION.to_str()))
5656
)),
@@ -66,10 +66,13 @@ fn inject_libcore_ref(sess: Session,
6666
view_items: vis,
6767
../*bad*/copy crate.module
6868
};
69-
new_module = fld.fold_mod(new_module);
69+
new_module = fld.fold_mod(&new_module);
7070

7171
// FIXME #2543: Bad copy.
72-
let new_crate = ast::crate_ { module: new_module, ..copy crate };
72+
let new_crate = ast::crate_ {
73+
module: new_module,
74+
..copy *crate
75+
};
7376
(new_crate, span)
7477
},
7578
fold_mod: |module, fld| {
@@ -95,12 +98,15 @@ fn inject_libcore_ref(sess: Session,
9598
let vis = vec::append(~[vi2], module.view_items);
9699

97100
// FIXME #2543: Bad copy.
98-
let new_module = ast::_mod { view_items: vis, ..copy module };
99-
fold::noop_fold_mod(new_module, fld)
101+
let new_module = ast::_mod {
102+
view_items: vis,
103+
..copy *module
104+
};
105+
fold::noop_fold_mod(&new_module, fld)
100106
},
101107
..*fold::default_ast_fold()
102108
};
103109

104110
let fold = fold::make_fold(precursor);
105-
@fold.fold_crate(*crate)
111+
@fold.fold_crate(crate)
106112
}

trunk/src/librustc/front/test.rs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ fn generate_test_harness(sess: session::Session,
9191
fold_mod: |a,b| fold_mod(cx, a, b),.. *fold::default_ast_fold()};
9292

9393
let fold = fold::make_fold(precursor);
94-
let res = @fold.fold_crate(*crate);
94+
let res = @fold.fold_crate(&*crate);
9595
cx.ext_cx.bt_pop();
9696
return res;
9797
}
@@ -106,7 +106,7 @@ fn strip_test_functions(crate: @ast::crate) -> @ast::crate {
106106
}
107107

108108
fn fold_mod(cx: @mut TestCtxt,
109-
m: ast::_mod,
109+
m: &ast::_mod,
110110
fld: fold::ast_fold)
111111
-> ast::_mod {
112112
// Remove any #[main] from the AST so it doesn't clash with
@@ -125,19 +125,21 @@ fn fold_mod(cx: @mut TestCtxt,
125125
items: vec::map(m.items, |i| nomain(cx, *i)),
126126
};
127127

128-
fold::noop_fold_mod(mod_nomain, fld)
128+
fold::noop_fold_mod(&mod_nomain, fld)
129129
}
130130

131131
fn fold_crate(cx: @mut TestCtxt,
132-
c: ast::crate_,
132+
c: &ast::crate_,
133133
fld: fold::ast_fold)
134134
-> ast::crate_ {
135135
let folded = fold::noop_fold_crate(c, fld);
136136

137137
// Add a special __test module to the crate that will contain code
138138
// generated for the test harness
139-
ast::crate_ { module: add_test_module(cx, /*bad*/copy folded.module),
140-
.. folded }
139+
ast::crate_ {
140+
module: add_test_module(cx, &folded.module),
141+
.. folded
142+
}
141143
}
142144

143145

@@ -238,11 +240,11 @@ fn should_fail(i: @ast::item) -> bool {
238240
vec::len(attr::find_attrs_by_name(i.attrs, ~"should_fail")) > 0u
239241
}
240242

241-
fn add_test_module(cx: &TestCtxt, +m: ast::_mod) -> ast::_mod {
243+
fn add_test_module(cx: &TestCtxt, m: &ast::_mod) -> ast::_mod {
242244
let testmod = mk_test_module(cx);
243245
ast::_mod {
244246
items: vec::append_one(/*bad*/copy m.items, testmod),
245-
.. m
247+
.. /*bad*/ copy *m
246248
}
247249
}
248250

0 commit comments

Comments
 (0)