Skip to content

Commit b63b1d8

Browse files
committed
---
yaml --- r: 120637 b: refs/heads/dist-snap c: 43f942f h: refs/heads/master i: 120635: 61a5b0b v: v3
1 parent b01c4c1 commit b63b1d8

Some content is hidden

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

90 files changed

+769
-1075
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: 1813e5aa1a03b0596b8de7abd1af31edf5d6098f
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: 9a8379deb296b7a8b543fca635c52307d13f6daf
9+
refs/heads/dist-snap: 43f942f88656f6b6cb2ff143e496a8875ea157ac
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/mk/platform.mk

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,6 @@ endef
9797
$(foreach cvar,CC CXX CPP CFLAGS CXXFLAGS CPPFLAGS,\
9898
$(eval $(call SET_FROM_CFG,$(cvar))))
9999

100-
ifeq ($(CFG_USING_CLANG),1)
101-
# The -Qunused-arguments sidesteps spurious warnings from clang
102-
CFLAGS += -Qunused-arguments
103-
CXXFLAGS += -Qunused-arguments
104-
CPPFLAGS += -Qunused-arguments
105-
endif
106-
107100
CFG_RLIB_GLOB=lib$(1)-*.rlib
108101

109102
# x86_64-unknown-linux-gnu configuration
@@ -516,6 +509,21 @@ CFG_LDPATH_x86_64-unknown-freebsd :=
516509
CFG_RUN_x86_64-unknown-freebsd=$(2)
517510
CFG_RUN_TARG_x86_64-unknown-freebsd=$(call CFG_RUN_x86_64-unknown-freebsd,,$(2))
518511

512+
513+
# The -Qunused-arguments sidesteps spurious warnings from clang
514+
define FILTER_FLAGS
515+
ifeq ($$(CFG_USING_CLANG),1)
516+
ifneq ($(findstring clang,$$(shell $(CC_$(1)) -v)),)
517+
CFG_GCCISH_CFLAGS_$(1) += -Qunused-arguments
518+
CFG_GCCISH_CXXFLAGS_$(1) += -Qunused-arguments
519+
endif
520+
endif
521+
endef
522+
523+
$(foreach target,$(CFG_TARGET),\
524+
$(eval $(call FILTER_FLAGS,$(target))))
525+
526+
519527
ifeq ($(CFG_CCACHE_CPP2),1)
520528
CCACHE_CPP2=1
521529
export CCACHE_CPP

branches/dist-snap/src/libcollections/bitv.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
use std::cmp;
1515
use std::iter::RandomAccessIterator;
16-
use std::iter::{Rev, Enumerate, Repeat, Map, Zip};
16+
use std::iter::{Enumerate, Repeat, Map, Zip};
1717
use std::ops;
1818
use std::slice;
1919
use std::strbuf::StrBuf;
@@ -466,12 +466,6 @@ impl Bitv {
466466
Bits {bitv: self, next_idx: 0, end_idx: self.nbits}
467467
}
468468

469-
#[inline]
470-
#[deprecated = "replaced by .iter().rev()"]
471-
pub fn rev_iter<'a>(&'a self) -> Rev<Bits<'a>> {
472-
self.iter().rev()
473-
}
474-
475469
/// Returns `true` if all bits are 0
476470
pub fn none(&self) -> bool {
477471
match self.rep {

branches/dist-snap/src/libcollections/dlist.rs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
// Backlinks over DList::prev are raw pointers that form a full chain in
2222
// the reverse direction.
2323

24-
use std::iter::Rev;
2524
use std::iter;
2625
use std::mem;
2726
use std::ptr;
@@ -369,12 +368,6 @@ impl<T> DList<T> {
369368
Items{nelem: self.len(), head: &self.list_head, tail: self.list_tail}
370369
}
371370

372-
#[inline]
373-
#[deprecated = "replaced by .iter().rev()"]
374-
pub fn rev_iter<'a>(&'a self) -> Rev<Items<'a, T>> {
375-
self.iter().rev()
376-
}
377-
378371
/// Provide a forward iterator with mutable references
379372
#[inline]
380373
pub fn mut_iter<'a>(&'a mut self) -> MutItems<'a, T> {
@@ -390,24 +383,12 @@ impl<T> DList<T> {
390383
}
391384
}
392385

393-
#[inline]
394-
#[deprecated = "replaced by .mut_iter().rev()"]
395-
pub fn mut_rev_iter<'a>(&'a mut self) -> Rev<MutItems<'a, T>> {
396-
self.mut_iter().rev()
397-
}
398-
399386

400387
/// Consume the list into an iterator yielding elements by value
401388
#[inline]
402389
pub fn move_iter(self) -> MoveItems<T> {
403390
MoveItems{list: self}
404391
}
405-
406-
#[inline]
407-
#[deprecated = "replaced by .move_iter().rev()"]
408-
pub fn move_rev_iter(self) -> Rev<MoveItems<T>> {
409-
self.move_iter().rev()
410-
}
411392
}
412393

413394
impl<T: TotalOrd> DList<T> {

branches/dist-snap/src/libcollections/lru_cache.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ impl<K: Hash + TotalEq, V> LruCache<K, V> {
9292
let cache = LruCache {
9393
map: HashMap::new(),
9494
max_size: capacity,
95-
head: unsafe{ mem::transmute(box mem::uninit::<LruEntry<K, V>>()) },
95+
head: unsafe{ mem::transmute(box mem::uninitialized::<LruEntry<K, V>>()) },
9696
};
9797
unsafe {
9898
(*cache.head).next = cache.head;

branches/dist-snap/src/libcollections/ringbuf.rs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
//! collections::deque::Deque`.
1515
1616
use std::cmp;
17-
use std::iter::{Rev, RandomAccessIterator};
17+
use std::iter::RandomAccessIterator;
1818

1919
use deque::Deque;
2020

@@ -190,11 +190,6 @@ impl<T> RingBuf<T> {
190190
Items{index: 0, rindex: self.nelts, lo: self.lo, elts: self.elts.as_slice()}
191191
}
192192

193-
#[deprecated = "replaced by .iter().rev()"]
194-
pub fn rev_iter<'a>(&'a self) -> Rev<Items<'a, T>> {
195-
self.iter().rev()
196-
}
197-
198193
/// Front-to-back iterator which returns mutable values.
199194
pub fn mut_iter<'a>(&'a mut self) -> MutItems<'a, T> {
200195
let start_index = raw_index(self.lo, self.elts.len(), 0);
@@ -220,11 +215,6 @@ impl<T> RingBuf<T> {
220215
nelts: self.nelts }
221216
}
222217
}
223-
224-
#[deprecated = "replaced by .mut_iter().rev()"]
225-
pub fn mut_rev_iter<'a>(&'a mut self) -> Rev<MutItems<'a, T>> {
226-
self.mut_iter().rev()
227-
}
228218
}
229219

230220
/// RingBuf iterator

branches/dist-snap/src/libcollections/smallintmap.rs

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
#![allow(missing_doc)]
1717

18-
use std::iter::{Enumerate, FilterMap, Rev};
18+
use std::iter::{Enumerate, FilterMap};
1919
use std::mem::replace;
2020
use std::{vec, slice};
2121

@@ -142,16 +142,6 @@ impl<V> SmallIntMap<V> {
142142
}
143143
}
144144

145-
#[deprecated = "replaced by .iter().rev()"]
146-
pub fn rev_iter<'r>(&'r self) -> Rev<Entries<'r, V>> {
147-
self.iter().rev()
148-
}
149-
150-
#[deprecated = "replaced by .mut_iter().rev()"]
151-
pub fn mut_rev_iter<'r>(&'r mut self) -> Rev<MutEntries<'r, V>> {
152-
self.mut_iter().rev()
153-
}
154-
155145
/// Empties the hash map, moving all values into the specified closure
156146
pub fn move_iter(&mut self)
157147
-> FilterMap<(uint, Option<V>), (uint, V),
@@ -243,8 +233,6 @@ pub struct Entries<'a, T> {
243233

244234
iterator!(impl Entries -> (uint, &'a T), get_ref)
245235
double_ended_iterator!(impl Entries -> (uint, &'a T), get_ref)
246-
#[deprecated = "replaced by Rev<Entries<'a, T>>"]
247-
pub type RevEntries<'a, T> = Rev<Entries<'a, T>>;
248236

249237
pub struct MutEntries<'a, T> {
250238
front: uint,
@@ -254,8 +242,6 @@ pub struct MutEntries<'a, T> {
254242

255243
iterator!(impl MutEntries -> (uint, &'a mut T), get_mut_ref)
256244
double_ended_iterator!(impl MutEntries -> (uint, &'a mut T), get_mut_ref)
257-
#[deprecated = "replaced by Rev<MutEntries<'a, T>"]
258-
pub type RevMutEntries<'a, T> = Rev<MutEntries<'a, T>>;
259245

260246
#[cfg(test)]
261247
mod test_map {

branches/dist-snap/src/libcore/cell.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,10 @@
8888
//! ```
8989
//! extern crate collections;
9090
//!
91-
//! use collections::HashMap;
9291
//! use std::cell::RefCell;
9392
//!
9493
//! struct Graph {
95-
//! edges: HashMap<uint, uint>,
94+
//! edges: Vec<(uint, uint)>,
9695
//! span_tree_cache: RefCell<Option<Vec<(uint, uint)>>>
9796
//! }
9897
//!

branches/dist-snap/src/libcore/finally.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ also be used. See that function for more details.
2020
# Example
2121
2222
```
23-
use std::unstable::finally::Finally;
23+
use std::finally::Finally;
2424
2525
(|| {
2626
// ...
@@ -75,7 +75,7 @@ impl<T> Finally<T> for fn() -> T {
7575
* # Example
7676
*
7777
* ```
78-
* use std::unstable::finally::try_finally;
78+
* use std::finally::try_finally;
7979
*
8080
* struct State<'a> { buffer: &'a mut [u8], len: uint }
8181
* # let mut buf = [];

branches/dist-snap/src/libcore/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
//! The Rust Core Library
11+
//! # The Rust Core Library
1212
//!
1313
//! The Rust Core Library is the dependency-free foundation of [The
1414
//! Rust Standard Library](../std/index.html). It is the portable glue
@@ -53,7 +53,7 @@
5353
html_root_url = "http://doc.rust-lang.org/")]
5454

5555
#![no_std]
56-
#![feature(globs, macro_rules, managed_boxes, phase)]
56+
#![feature(globs, macro_rules, managed_boxes, phase, simd)]
5757
#![deny(missing_doc)]
5858

5959
#[cfg(test)] extern crate realcore = "core";
@@ -124,6 +124,7 @@ pub mod iter;
124124
pub mod option;
125125
pub mod raw;
126126
pub mod result;
127+
pub mod simd;
127128
pub mod slice;
128129
pub mod str;
129130
pub mod tuple;

branches/dist-snap/src/libcore/mem.rs

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ pub fn size_of<T>() -> uint {
2626

2727
/// Returns the size of the type that `_val` points to in bytes.
2828
#[inline]
29-
#[unstable = "the name of this function may change slightly before stabilizing"]
29+
#[stable]
3030
pub fn size_of_val<T>(_val: &T) -> uint {
3131
size_of::<T>()
3232
}
@@ -64,7 +64,7 @@ pub fn min_align_of<T>() -> uint {
6464
/// Returns the ABI-required minimum alignment of the type of the value that
6565
/// `_val` points to
6666
#[inline]
67-
#[unstable = "the name of this function may change slightly before stabilizing"]
67+
#[stable]
6868
pub fn min_align_of_val<T>(_val: &T) -> uint {
6969
min_align_of::<T>()
7070
}
@@ -90,7 +90,7 @@ pub fn align_of<T>() -> uint {
9090
/// as trait objects (in the future), returning the alignment for an arbitrary
9191
/// value at runtime.
9292
#[inline]
93-
#[unstable = "the name of this function may change slightly before stabilizing"]
93+
#[stable]
9494
pub fn align_of_val<T>(_val: &T) -> uint {
9595
align_of::<T>()
9696
}
@@ -117,7 +117,7 @@ pub fn pref_align_of_val<T>(val: &T) -> uint { align_of_val(val) }
117117
///
118118
/// This is useful for FFI functions sometimes, but should generally be avoided.
119119
#[inline]
120-
#[unstable = "the name of this function is subject to change"]
120+
#[stable]
121121
pub unsafe fn zeroed<T>() -> T {
122122
intrinsics::init()
123123
}
@@ -136,7 +136,14 @@ pub unsafe fn init<T>() -> T { zeroed() }
136136
///
137137
/// This is useful for FFI functions sometimes, but should generally be avoided.
138138
#[inline]
139-
#[unstable = "the name of this function is subject to change"]
139+
#[stable]
140+
pub unsafe fn uninitialized<T>() -> T {
141+
intrinsics::uninit()
142+
}
143+
144+
/// Deprecated, use `uninitialized` instead.
145+
#[inline]
146+
#[deprecated = "this function has been renamed to `uninitialized`"]
140147
pub unsafe fn uninit<T>() -> T {
141148
intrinsics::uninit()
142149
}
@@ -148,7 +155,7 @@ pub unsafe fn uninit<T>() -> T {
148155
/// contained at the location `dst`. This could leak allocations or resources,
149156
/// so care must be taken to previously deallocate the value at `dst`.
150157
#[inline]
151-
#[unstable = "the name of this function is subject to change"]
158+
#[stable]
152159
pub unsafe fn overwrite<T>(dst: *mut T, src: T) {
153160
intrinsics::move_val_init(&mut *dst, src)
154161
}
@@ -315,7 +322,7 @@ pub fn from_be64(x: u64) -> u64 { x }
315322
pub fn swap<T>(x: &mut T, y: &mut T) {
316323
unsafe {
317324
// Give ourselves some scratch space to work with
318-
let mut t: T = uninit();
325+
let mut t: T = uninitialized();
319326

320327
// Perform the swap, `&mut` pointers never alias
321328
ptr::copy_nonoverlapping_memory(&mut t, &*x, 1);

branches/dist-snap/src/libcore/ptr.rs

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,18 @@
1010

1111
// FIXME: talk about offset, copy_memory, copy_nonoverlapping_memory
1212

13-
//! Conveniences for working with unsafe pointers, the `*T`, and `*mut T` types.
13+
//! Operations on unsafe pointers, `*T`, and `*mut T`.
1414
//!
15-
//! Working with unsafe pointers in Rust is fairly uncommon,
16-
//! and often limited to some narrow use cases: holding
17-
//! an unsafe pointer when safe pointers are unsuitable;
18-
//! checking for null; and converting back to safe pointers.
19-
//! As a result, there is not yet an abundance of library code
20-
//! for working with unsafe pointers, and in particular,
21-
//! since pointer math is fairly uncommon in Rust, it is not
22-
//! all that convenient.
15+
//! Working with unsafe pointers in Rust is uncommon,
16+
//! typically limited to a few patterns.
2317
//!
2418
//! Use the [`null` function](fn.null.html) to create null pointers,
2519
//! the [`is_null`](trait.RawPtr.html#tymethod.is_null)
2620
//! and [`is_not_null`](trait.RawPtr.html#method.is_not_null)
2721
//! methods of the [`RawPtr` trait](trait.RawPtr.html) to check for null.
2822
//! The `RawPtr` trait is imported by the prelude, so `is_null` etc.
29-
//! work everywhere.
23+
//! work everywhere. The `RawPtr` also defines the `offset` method,
24+
//! for pointer math.
3025
//!
3126
//! # Common ways to create unsafe pointers
3227
//!
@@ -201,7 +196,7 @@ pub unsafe fn copy_memory<T>(dst: *mut T, src: *T, count: uint) {
201196
/// fn swap<T>(x: &mut T, y: &mut T) {
202197
/// unsafe {
203198
/// // Give ourselves some scratch space to work with
204-
/// let mut t: T = mem::uninit();
199+
/// let mut t: T = mem::uninitialized();
205200
///
206201
/// // Perform the swap, `&mut` pointers never alias
207202
/// ptr::copy_nonoverlapping_memory(&mut t, &*x, 1);
@@ -244,7 +239,7 @@ pub unsafe fn zero_memory<T>(dst: *mut T, count: uint) {
244239
#[inline]
245240
pub unsafe fn swap<T>(x: *mut T, y: *mut T) {
246241
// Give ourselves some scratch space to work with
247-
let mut tmp: T = mem::uninit();
242+
let mut tmp: T = mem::uninitialized();
248243
let t: *mut T = &mut tmp;
249244

250245
// Perform the swap
@@ -268,7 +263,7 @@ pub unsafe fn replace<T>(dest: *mut T, mut src: T) -> T {
268263
/// Reads the value from `*src` and returns it.
269264
#[inline(always)]
270265
pub unsafe fn read<T>(src: *T) -> T {
271-
let mut tmp: T = mem::uninit();
266+
let mut tmp: T = mem::uninitialized();
272267
copy_nonoverlapping_memory(&mut tmp, src, 1);
273268
tmp
274269
}
@@ -316,7 +311,7 @@ pub unsafe fn array_each<T>(arr: **T, cb: |*T|) {
316311
array_each_with_len(arr, len, cb);
317312
}
318313

319-
/// Extension methods for raw pointers.
314+
/// Methods on raw pointers
320315
pub trait RawPtr<T> {
321316
/// Returns the null pointer.
322317
fn null() -> Self;

0 commit comments

Comments
 (0)