Skip to content

Commit f29af22

Browse files
committed
---
yaml --- r: 106598 b: refs/heads/try c: 3cc761f h: refs/heads/master v: v3
1 parent bdc9ca8 commit f29af22

File tree

10 files changed

+54
-16
lines changed

10 files changed

+54
-16
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: b8ef9fd9c9f642ce7b8aed82782a1ed745d08d64
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: b8601a3d8b91ad3b653d143307611f2f5c75617e
5-
refs/heads/try: 4a891fe80dfc5c64d72ddb842751bf410dc7a3a8
5+
refs/heads/try: 3cc761f3f97b0a5ff5e355430bb4e52b15f567b6
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/librustc/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ 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)];
3031
#[feature(macro_rules, globs, struct_variant, managed_boxes)];
3132
#[feature(quote)];
3233

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

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

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

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

branches/try/src/libstd/vec.rs

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2311,11 +2311,13 @@ 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>}
2314+
marker: marker::ContravariantLifetime::<'a>,
2315+
marker2: marker::NoPod}
23152316
} else {
23162317
MutItems{ptr: p,
23172318
end: p.offset(self.len() as int),
2318-
marker: marker::ContravariantLifetime::<'a>}
2319+
marker: marker::ContravariantLifetime::<'a>,
2320+
marker2: marker::NoPod}
23192321
}
23202322
}
23212323
}
@@ -2682,15 +2684,23 @@ impl<A> Default for ~[A] {
26822684
fn default() -> ~[A] { ~[] }
26832685
}
26842686

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+
26852702
macro_rules! iterator {
26862703
(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-
26942704
impl<'a, T> Iterator<$elem> for $name<'a, T> {
26952705
#[inline]
26962706
fn next(&mut self) -> Option<$elem> {

branches/try/src/libstd/vec_ng.rs

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

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

branches/try/src/libsyntax/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ 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)];
3334
#[deny(non_camel_case_types)];
3435

3536
extern crate serialize;
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
-include ../tools.mk
2+
3+
all: $(call STATICLIB,foo) $(call STATICLIB,bar)
4+
$(RUSTC) main.rs
5+
$(call RUN,main)
6+
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
extern void foo();
2+
3+
void bar() { foo(); }
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
void foo() {}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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+
#[link(name = "foo")]
12+
#[link(name = "bar")]
13+
#[link(name = "foo")]
14+
extern {
15+
fn bar();
16+
}
17+
18+
fn main() {
19+
unsafe { bar() }
20+
}

0 commit comments

Comments
 (0)