Skip to content

Commit aa9251b

Browse files
committed
---
yaml --- r: 102351 b: refs/heads/master c: 4a891fe h: refs/heads/master i: 102349: 1af9d21 102347: 0764910 102343: 90447c2 102335: e685cad v: v3
1 parent 5a43819 commit aa9251b

File tree

12 files changed

+31
-60
lines changed

12 files changed

+31
-60
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: f1955e028cd3ea5097845f183f8cd099014ac6d8
2+
refs/heads/master: 4a891fe80dfc5c64d72ddb842751bf410dc7a3a8
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 6e7f170fedd3c526a643c0b2d13863acd982be02
55
refs/heads/try: a97642026c18a624ff6ea01075dd9550f8ed07ff

trunk/src/librustc/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ This API is completely unstable and subject to change.
2727
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
2828
html_root_url = "http://static.rust-lang.org/doc/master")];
2929

30-
#[allow(deprecated)];
3130
#[feature(macro_rules, globs, struct_variant, managed_boxes)];
3231
#[feature(quote)];
3332

trunk/src/librustc/metadata/cstore.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,15 @@ impl CStore {
154154
.collect()
155155
}
156156

157-
pub fn add_used_library(&self, lib: ~str, kind: NativeLibaryKind) {
157+
pub fn add_used_library(&self, lib: ~str, kind: NativeLibaryKind)
158+
-> bool {
158159
assert!(!lib.is_empty());
159160
let mut used_libraries = self.used_libraries.borrow_mut();
161+
if used_libraries.get().iter().any(|&(ref x, _)| x == &lib) {
162+
return false;
163+
}
160164
used_libraries.get().push((lib, kind));
165+
true
161166
}
162167

163168
pub fn get_used_libraries<'a>(&'a self)

trunk/src/libstd/vec.rs

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2311,13 +2311,11 @@ impl<'a,T> MutableVector<'a, T> for &'a mut [T] {
23112311
if mem::size_of::<T>() == 0 {
23122312
MutItems{ptr: p,
23132313
end: (p as uint + self.len()) as *mut T,
2314-
marker: marker::ContravariantLifetime::<'a>,
2315-
marker2: marker::NoPod}
2314+
marker: marker::ContravariantLifetime::<'a>}
23162315
} else {
23172316
MutItems{ptr: p,
23182317
end: p.offset(self.len() as int),
2319-
marker: marker::ContravariantLifetime::<'a>,
2320-
marker2: marker::NoPod}
2318+
marker: marker::ContravariantLifetime::<'a>}
23212319
}
23222320
}
23232321
}
@@ -2684,23 +2682,15 @@ impl<A> Default for ~[A] {
26842682
fn default() -> ~[A] { ~[] }
26852683
}
26862684

2687-
/// Immutable slice iterator
2688-
pub struct Items<'a, T> {
2689-
priv ptr: *T,
2690-
priv end: *T,
2691-
priv marker: marker::ContravariantLifetime<'a>
2692-
}
2693-
2694-
/// Mutable slice iterator
2695-
pub struct MutItems<'a, T> {
2696-
priv ptr: *mut T,
2697-
priv end: *mut T,
2698-
priv marker: marker::ContravariantLifetime<'a>,
2699-
priv marker2: marker::NoPod
2700-
}
2701-
27022685
macro_rules! iterator {
27032686
(struct $name:ident -> $ptr:ty, $elem:ty) => {
2687+
/// An iterator for iterating over a vector.
2688+
pub struct $name<'a, T> {
2689+
priv ptr: $ptr,
2690+
priv end: $ptr,
2691+
priv marker: marker::ContravariantLifetime<'a>,
2692+
}
2693+
27042694
impl<'a, T> Iterator<$elem> for $name<'a, T> {
27052695
#[inline]
27062696
fn next(&mut self) -> Option<$elem> {

trunk/src/libstd/vec_ng.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,6 @@ impl<T> Vec<T> {
369369
}
370370

371371
#[inline]
372-
#[deprecated="Use `xs.iter().map(closure)` instead."]
373372
pub fn map<U>(&self, f: |t: &T| -> U) -> Vec<U> {
374373
self.iter().map(f).collect()
375374
}

trunk/src/libsyntax/ext/expand.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ macro_rules! with_exts_frame (
248248
// When we enter a module, record it, for the sake of `module!`
249249
pub fn expand_item(it: @ast::Item, fld: &mut MacroExpander)
250250
-> SmallVector<@ast::Item> {
251-
let mut decorator_items = SmallVector::zero();
251+
let mut decorator_items: SmallVector<@ast::Item> = SmallVector::zero();
252252
for attr in it.attrs.rev_iter() {
253253
let mname = attr.name();
254254

@@ -262,20 +262,21 @@ pub fn expand_item(it: @ast::Item, fld: &mut MacroExpander)
262262
span: None
263263
}
264264
});
265+
265266
// we'd ideally decorator_items.push_all(expand_item(item, fld)),
266267
// but that double-mut-borrows fld
268+
let mut items: SmallVector<@ast::Item> = SmallVector::zero();
267269
dec_fn(fld.cx, attr.span, attr.node.value, it,
268-
|item| decorator_items.push(item));
270+
|item| items.push(item));
271+
decorator_items.extend(&mut items.move_iter()
272+
.flat_map(|item| expand_item(item, fld).move_iter()));
273+
269274
fld.cx.bt_pop();
270275
}
271276
_ => {}
272277
}
273278
}
274279

275-
let decorator_items = decorator_items.move_iter()
276-
.flat_map(|item| expand_item(item, fld).move_iter())
277-
.collect();
278-
279280
let mut new_items = match it.node {
280281
ast::ItemMac(..) => expand_item_mac(it, fld),
281282
ast::ItemMod(_) | ast::ItemForeignMod(_) => {

trunk/src/libsyntax/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ This API is completely unstable and subject to change.
3030
#[allow(unknown_features)];// Note: remove it after a snapshot.
3131
#[feature(quote)];
3232

33-
#[allow(deprecated)];
3433
#[deny(non_camel_case_types)];
3534

3635
extern crate serialize;

trunk/src/libsyntax/util/small_vector.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,14 @@ impl<T> FromIterator<T> for SmallVector<T> {
3939
}
4040
}
4141

42+
impl<T> Extendable<T> for SmallVector<T> {
43+
fn extend<I: Iterator<T>>(&mut self, iter: &mut I) {
44+
for val in *iter {
45+
self.push(val);
46+
}
47+
}
48+
}
49+
4250
impl<T> SmallVector<T> {
4351
pub fn zero() -> SmallVector<T> {
4452
Zero

trunk/src/test/run-make/no-duplicate-libs/Makefile

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

trunk/src/test/run-make/no-duplicate-libs/bar.c

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

trunk/src/test/run-make/no-duplicate-libs/foo.c

Lines changed: 0 additions & 1 deletion
This file was deleted.

trunk/src/test/run-make/no-duplicate-libs/main.rs

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

0 commit comments

Comments
 (0)