Skip to content

Commit c9ad527

Browse files
committed
---
yaml --- r: 65914 b: refs/heads/master c: 1854256 h: refs/heads/master v: v3
1 parent b8f2a0c commit c9ad527

30 files changed

+92
-78
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: 1104e659d539faf40773cd6dc01015c00df498cd
2+
refs/heads/master: 18542568a8f7d5580094634c4a10695fb71ba74a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 18e3db7392d2d0697b7e27d6d986139960144d85
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9

trunk/RELEASES.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Version 0.7 (July 2013)
44
* ??? changes, numerous bugfixes
55

66
* Syntax changes
7-
* `#[deriving(Encodable)]`, `#[deriving(Decodable)]`
7+
* `#[deriving(Encodable)]`, `#[deriving(Decodable)]`
88

99
* Semantic changes
1010
* The `self` parameter no longer implicitly means `&'self self`,

trunk/src/etc/adb_run_wrapper.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# usage : adb_run_wrapper [test dir - where test executables exist] [test executable]
33
#
44

5-
# Sometimes android shell produce exitcode "1 : Text File Busy"
5+
# Sometimes android shell produce exitcode "1 : Text File Busy"
66
# Retry after $WAIT seconds, expecting resource cleaned-up
77
WAIT=10
88
PATH=$1
@@ -20,15 +20,15 @@ then
2020
while [ $L_RET -eq 1 ]
2121
do
2222
LD_LIBRARY_PATH=$PATH $PATH/$RUN $@ 1>$PATH/$RUN.stdout 2>$PATH/$RUN.stderr
23-
L_RET=$?
23+
L_RET=$?
2424
if [ $L_COUNT -gt 0 ]
2525
then
2626
/system/bin/sleep $WAIT
2727
/system/bin/sync
2828
fi
2929
L_COUNT=`expr $L_COUNT+1`
3030
done
31-
31+
3232
echo $L_RET > $PATH/$RUN.exitcode
3333

3434
fi

trunk/src/librustc/middle/borrowck/gather_loans/gather_moves.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,3 +161,4 @@ fn check_is_legal_to_move_from(bccx: @BorrowckCtxt,
161161
}
162162
}
163163
}
164+

trunk/src/librustc/middle/effect.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,3 +154,4 @@ pub fn check_crate(tcx: ty::ctxt,
154154

155155
visit::visit_crate(crate, ((), visitor))
156156
}
157+

trunk/src/librustc/middle/trans/base.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3094,7 +3094,6 @@ pub fn trans_crate(sess: session::Session,
30943094
const_globals: @mut HashMap::new(),
30953095
const_values: @mut HashMap::new(),
30963096
extern_const_values: @mut HashMap::new(),
3097-
impl_method_cache: @mut HashMap::new(),
30983097
module_data: @mut HashMap::new(),
30993098
lltypes: @mut HashMap::new(),
31003099
llsizingtypes: @mut HashMap::new(),

trunk/src/librustc/middle/trans/common.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,6 @@ pub struct CrateContext {
205205
// Cache of external const values
206206
extern_const_values: @mut HashMap<ast::def_id, ValueRef>,
207207

208-
impl_method_cache: @mut HashMap<(ast::def_id, ast::ident), ast::def_id>,
209-
210208
module_data: @mut HashMap<~str, ValueRef>,
211209
lltypes: @mut HashMap<ty::t, TypeRef>,
212210
llsizingtypes: @mut HashMap<ty::t, TypeRef>,

trunk/src/librustc/middle/trans/meth.rs

Lines changed: 28 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -381,37 +381,35 @@ pub fn method_from_methods(ms: &[@ast::method], name: ast::ident)
381381
pub fn method_with_name_or_default(ccx: @CrateContext,
382382
impl_id: ast::def_id,
383383
name: ast::ident) -> ast::def_id {
384-
*do ccx.impl_method_cache.find_or_insert_with((impl_id, name)) |_| {
385-
if impl_id.crate == ast::local_crate {
386-
match ccx.tcx.items.get_copy(&impl_id.node) {
387-
ast_map::node_item(@ast::item {
388-
node: ast::item_impl(_, _, _, ref ms), _
389-
}, _) => {
390-
let did = method_from_methods(*ms, name);
391-
if did.is_some() {
392-
did.get()
393-
} else {
394-
// Look for a default method
395-
let pmm = ccx.tcx.provided_methods;
396-
match pmm.find(&impl_id) {
397-
Some(pmis) => {
398-
for pmis.each |pmi| {
399-
if pmi.method_info.ident == name {
400-
debug!("pmi.method_info.did = %?", pmi.method_info.did);
401-
return pmi.method_info.did;
402-
}
403-
}
404-
fail!()
405-
}
406-
None => fail!()
407-
}
408-
}
409-
}
410-
_ => fail!("method_with_name")
411-
}
412-
} else {
413-
csearch::get_impl_method(ccx.sess.cstore, impl_id, name)
384+
if impl_id.crate == ast::local_crate {
385+
match ccx.tcx.items.get_copy(&impl_id.node) {
386+
ast_map::node_item(@ast::item {
387+
node: ast::item_impl(_, _, _, ref ms), _
388+
}, _) => {
389+
let did = method_from_methods(*ms, name);
390+
if did.is_some() {
391+
return did.get();
392+
} else {
393+
// Look for a default method
394+
let pmm = ccx.tcx.provided_methods;
395+
match pmm.find(&impl_id) {
396+
Some(pmis) => {
397+
for pmis.each |pmi| {
398+
if pmi.method_info.ident == name {
399+
debug!("pmi.method_info.did = %?", pmi.method_info.did);
400+
return pmi.method_info.did;
401+
}
402+
}
403+
fail!()
404+
}
405+
None => fail!()
406+
}
407+
}
408+
}
409+
_ => fail!("method_with_name")
414410
}
411+
} else {
412+
csearch::get_impl_method(ccx.sess.cstore, impl_id, name)
415413
}
416414
}
417415

trunk/src/librustc/middle/ty.rs

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,6 @@ struct ctxt_ {
271271
// A cache for the trait_methods() routine
272272
trait_methods_cache: @mut HashMap<def_id, @~[@Method]>,
273273

274-
impl_trait_cache: @mut HashMap<ast::def_id, Option<@ty::TraitRef>>,
275-
276274
trait_refs: @mut HashMap<node_id, @TraitRef>,
277275
trait_defs: @mut HashMap<def_id, @TraitDef>,
278276

@@ -969,7 +967,6 @@ pub fn mk_ctxt(s: session::Session,
969967
methods: @mut HashMap::new(),
970968
trait_method_def_ids: @mut HashMap::new(),
971969
trait_methods_cache: @mut HashMap::new(),
972-
impl_trait_cache: @mut HashMap::new(),
973970
ty_param_defs: @mut HashMap::new(),
974971
adjustments: @mut HashMap::new(),
975972
normalized_cache: new_ty_hash(),
@@ -3752,24 +3749,22 @@ pub fn trait_method_def_ids(cx: ctxt, id: ast::def_id) -> @~[def_id] {
37523749
}
37533750

37543751
pub fn impl_trait_ref(cx: ctxt, id: ast::def_id) -> Option<@TraitRef> {
3755-
*do cx.impl_trait_cache.find_or_insert_with(id) |_| {
3756-
if id.crate == ast::local_crate {
3757-
debug!("(impl_trait_ref) searching for trait impl %?", id);
3758-
match cx.items.find(&id.node) {
3759-
Some(&ast_map::node_item(@ast::item {
3760-
node: ast::item_impl(_, opt_trait, _, _),
3761-
_},
3762-
_)) => {
3763-
match opt_trait {
3764-
Some(t) => Some(ty::node_id_to_trait_ref(cx, t.ref_id)),
3765-
None => None
3766-
}
3767-
}
3768-
_ => None
3769-
}
3770-
} else {
3771-
csearch::get_impl_trait(cx, id)
3752+
if id.crate == ast::local_crate {
3753+
debug!("(impl_trait_ref) searching for trait impl %?", id);
3754+
match cx.items.find(&id.node) {
3755+
Some(&ast_map::node_item(@ast::item {
3756+
node: ast::item_impl(_, opt_trait, _, _),
3757+
_},
3758+
_)) => {
3759+
match opt_trait {
3760+
Some(t) => Some(ty::node_id_to_trait_ref(cx, t.ref_id)),
3761+
None => None
3762+
}
3763+
}
3764+
_ => None
37723765
}
3766+
} else {
3767+
csearch::get_impl_trait(cx, id)
37733768
}
37743769
}
37753770

trunk/src/libstd/core.rc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,3 +232,4 @@ mod std {
232232
pub use str;
233233
pub use os;
234234
}
235+

trunk/src/libstd/rt/comm.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -615,3 +615,4 @@ mod test {
615615
}
616616
}
617617
}
618+

trunk/src/libstd/rt/io/stdio.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,4 @@ impl Writer for StdWriter {
5050

5151
fn flush(&mut self) { fail!() }
5252
}
53+

trunk/src/libstd/rt/task.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,3 +228,4 @@ mod test {
228228
}
229229
}
230230
}
231+

trunk/src/libstd/rt/test.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,3 +189,4 @@ pub fn stress_factor() -> uint {
189189
None => 1
190190
}
191191
}
192+

trunk/src/libstd/vec.rs

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,31 +1002,33 @@ pub fn retain<T>(v: &mut ~[T], f: &fn(t: &T) -> bool) {
10021002
}
10031003

10041004
/// Flattens a vector of vectors of T into a single vector of T.
1005-
pub fn concat<T:Copy>(v: &[~[T]]) -> ~[T] { v.concat() }
1005+
pub fn concat<T:Copy>(v: &[~[T]]) -> ~[T] { v.concat_vec() }
10061006

10071007
/// Concatenate a vector of vectors, placing a given separator between each
1008-
pub fn connect<T:Copy>(v: &[~[T]], sep: &T) -> ~[T] { v.connect(sep) }
1008+
pub fn connect<T:Copy>(v: &[~[T]], sep: &T) -> ~[T] { v.connect_vec(sep) }
10091009

10101010
/// Flattens a vector of vectors of T into a single vector of T.
1011-
pub fn concat_slices<T:Copy>(v: &[&[T]]) -> ~[T] { v.concat() }
1011+
pub fn concat_slices<T:Copy>(v: &[&[T]]) -> ~[T] { v.concat_vec() }
10121012

10131013
/// Concatenate a vector of vectors, placing a given separator between each
1014-
pub fn connect_slices<T:Copy>(v: &[&[T]], sep: &T) -> ~[T] { v.connect(sep) }
1014+
pub fn connect_slices<T:Copy>(v: &[&[T]], sep: &T) -> ~[T] { v.connect_vec(sep) }
10151015

10161016
#[allow(missing_doc)]
10171017
pub trait VectorVector<T> {
1018-
pub fn concat(&self) -> ~[T];
1019-
pub fn connect(&self, sep: &T) -> ~[T];
1018+
// FIXME #5898: calling these .concat and .connect conflicts with
1019+
// StrVector::con{cat,nect}, since they have generic contents.
1020+
pub fn concat_vec(&self) -> ~[T];
1021+
pub fn connect_vec(&self, sep: &T) -> ~[T];
10201022
}
10211023

10221024
impl<'self, T:Copy> VectorVector<T> for &'self [~[T]] {
10231025
/// Flattens a vector of slices of T into a single vector of T.
1024-
pub fn concat(&self) -> ~[T] {
1026+
pub fn concat_vec(&self) -> ~[T] {
10251027
self.flat_map(|&inner| inner)
10261028
}
10271029

10281030
/// Concatenate a vector of vectors, placing a given separator between each.
1029-
pub fn connect(&self, sep: &T) -> ~[T] {
1031+
pub fn connect_vec(&self, sep: &T) -> ~[T] {
10301032
let mut r = ~[];
10311033
let mut first = true;
10321034
for self.each |&inner| {
@@ -1039,12 +1041,12 @@ impl<'self, T:Copy> VectorVector<T> for &'self [~[T]] {
10391041

10401042
impl<'self, T:Copy> VectorVector<T> for &'self [&'self [T]] {
10411043
/// Flattens a vector of slices of T into a single vector of T.
1042-
pub fn concat(&self) -> ~[T] {
1044+
pub fn concat_vec(&self) -> ~[T] {
10431045
self.flat_map(|&inner| inner.to_owned())
10441046
}
10451047

10461048
/// Concatenate a vector of slices, placing a given separator between each.
1047-
pub fn connect(&self, sep: &T) -> ~[T] {
1049+
pub fn connect_vec(&self, sep: &T) -> ~[T] {
10481050
let mut r = ~[];
10491051
let mut first = true;
10501052
for self.each |&inner| {
@@ -3704,25 +3706,25 @@ mod tests {
37043706
#[test]
37053707
fn test_concat() {
37063708
assert_eq!(concat([~[1], ~[2,3]]), ~[1, 2, 3]);
3707-
assert_eq!([~[1], ~[2,3]].concat(), ~[1, 2, 3]);
3709+
assert_eq!([~[1], ~[2,3]].concat_vec(), ~[1, 2, 3]);
37083710

37093711
assert_eq!(concat_slices([&[1], &[2,3]]), ~[1, 2, 3]);
3710-
assert_eq!([&[1], &[2,3]].concat(), ~[1, 2, 3]);
3712+
assert_eq!([&[1], &[2,3]].concat_vec(), ~[1, 2, 3]);
37113713
}
37123714

37133715
#[test]
37143716
fn test_connect() {
37153717
assert_eq!(connect([], &0), ~[]);
37163718
assert_eq!(connect([~[1], ~[2, 3]], &0), ~[1, 0, 2, 3]);
37173719
assert_eq!(connect([~[1], ~[2], ~[3]], &0), ~[1, 0, 2, 0, 3]);
3718-
assert_eq!([~[1], ~[2, 3]].connect(&0), ~[1, 0, 2, 3]);
3719-
assert_eq!([~[1], ~[2], ~[3]].connect(&0), ~[1, 0, 2, 0, 3]);
3720+
assert_eq!([~[1], ~[2, 3]].connect_vec(&0), ~[1, 0, 2, 3]);
3721+
assert_eq!([~[1], ~[2], ~[3]].connect_vec(&0), ~[1, 0, 2, 0, 3]);
37203722

37213723
assert_eq!(connect_slices([], &0), ~[]);
37223724
assert_eq!(connect_slices([&[1], &[2, 3]], &0), ~[1, 0, 2, 3]);
37233725
assert_eq!(connect_slices([&[1], &[2], &[3]], &0), ~[1, 0, 2, 0, 3]);
3724-
assert_eq!([&[1], &[2, 3]].connect(&0), ~[1, 0, 2, 3]);
3725-
assert_eq!([&[1], &[2], &[3]].connect(&0), ~[1, 0, 2, 0, 3]);
3726+
assert_eq!([&[1], &[2, 3]].connect_vec(&0), ~[1, 0, 2, 3]);
3727+
assert_eq!([&[1], &[2], &[3]].connect_vec(&0), ~[1, 0, 2, 0, 3]);
37263728
}
37273729

37283730
#[test]

trunk/src/libsyntax/ext/pipes/ast_builder.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,4 @@ impl append_types for @ast::Path {
6363
}
6464
}
6565
}
66+

trunk/src/rt/rust_env.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,3 +156,4 @@ free_env(rust_env *env) {
156156
free(env->rust_seed);
157157
free(env);
158158
}
159+

trunk/src/rustllvm/rustllvm.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,4 @@
5454
#include <fcntl.h>
5555
#include <unistd.h>
5656
#endif
57+

trunk/src/test/auxiliary/anon-extern-mod-cross-crate-1.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ use std::libc;
2020
extern {
2121
pub fn rust_get_argc() -> libc::c_int;
2222
}
23+

trunk/src/test/auxiliary/private_variant_xc.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ pub enum Foo {
22
pub Bar,
33
priv Baz,
44
}
5+

trunk/src/test/auxiliary/use_from_trait_xc.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ struct Foo;
77
impl Foo {
88
pub fn new() {}
99
}
10+

trunk/src/test/compile-fail/lint-unused-import-tricky-names.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,4 @@ mod issue6935 {
4444
}
4545

4646
fn main(){}
47+

trunk/src/test/compile-fail/private-variant-xc.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ pub fn main() {
66
let _ = private_variant_xc::Bar;
77
let _ = private_variant_xc::Baz; //~ ERROR unresolved name
88
}
9+

trunk/src/test/compile-fail/use-from-trait-xc.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ use use_from_trait_xc::Foo::new; //~ ERROR cannot import from a trait or type
99

1010
fn main() {
1111
}
12+

trunk/src/test/compile-fail/use-from-trait.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ impl Foo {
1414
}
1515

1616
fn main() {}
17+

trunk/src/test/run-pass/const-struct-offsets.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ struct Bar {
1111
static bar: Bar = Bar { i: 0, v: IntVal(0) };
1212

1313
fn main() {}
14+

trunk/src/test/run-pass/issue-4735.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,5 @@ fn main() {
2626
let p = unsafe { transmute::<~int, *c_void>(t) };
2727
let z = NonCopyable(p);
2828
}
29+
30+

trunk/src/test/run-pass/monomorphize-abi-alignment.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ struct A((u32, u32));
2424
struct B(u64);
2525

2626
pub fn main() {
27-
static Ca: S<A> = S { i: 0, t: A((13, 104)) };
28-
static Cb: S<B> = S { i: 0, t: B(31337) };
29-
assert_eq!(*(Ca.unwrap()), (13, 104));
30-
assert_eq!(*(Cb.unwrap()), 31337);
27+
static Ca: S<A> = S { i: 0, t: A((13, 104)) };
28+
static Cb: S<B> = S { i: 0, t: B(31337) };
29+
assert_eq!(*(Ca.unwrap()), (13, 104));
30+
assert_eq!(*(Cb.unwrap()), 31337);
3131
}

trunk/src/test/run-pass/multi-let.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ pub fn main() {
1313
let y = x;
1414
assert!((y == 10));
1515
}
16+

trunk/src/test/run-pass/pub-extern-privacy.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ fn main() {
1111
a::free(transmute(0));
1212
}
1313
}
14+

0 commit comments

Comments
 (0)