Skip to content

Commit 0cc7ee1

Browse files
committed
---
yaml --- r: 193824 b: refs/heads/beta c: f798674 h: refs/heads/master v: v3
1 parent 07029ac commit 0cc7ee1

Some content is hidden

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

99 files changed

+1863
-1671
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ refs/heads/automation-fail: 1bf06495443584539b958873e04cc2f864ab10e4
3131
refs/heads/issue-18208-method-dispatch-3-quick-reject: 2009f85b9f99dedcec4404418eda9ddba90258a2
3232
refs/heads/batch: b7fd822592a4fb577552d93010c4a4e14f314346
3333
refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
34-
refs/heads/beta: 92dd995e1705a8c398a5266c8483e2519e494f47
34+
refs/heads/beta: f798674b86382929ca17c88de422a6e2fdb27f2a
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3636
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
3737
refs/heads/tmp: de8a23bbc3a7b9cbd7574b5b91a34af59bf030e6

branches/beta/configure

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -461,10 +461,7 @@ case $CFG_CPUTYPE in
461461
CFG_CPUTYPE=aarch64
462462
;;
463463

464-
# At some point, when ppc64[le] support happens, this will need to do
465-
# something clever. For now it's safe to assume that we're only ever
466-
# interested in building 32 bit.
467-
powerpc | ppc | ppc64)
464+
powerpc)
468465
CFG_CPUTYPE=powerpc
469466
;;
470467

@@ -826,11 +823,11 @@ then
826823
LLVM_VERSION=$($LLVM_CONFIG --version)
827824

828825
case $LLVM_VERSION in
829-
(3.[5-6]*)
826+
(3.[2-6]*)
830827
msg "found ok version of LLVM: $LLVM_VERSION"
831828
;;
832829
(*)
833-
err "bad LLVM version: $LLVM_VERSION, need >=3.5"
830+
err "bad LLVM version: $LLVM_VERSION, need >=3.0svn"
834831
;;
835832
esac
836833
fi

branches/beta/mk/main.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,6 @@ LLVM_VERSION_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --version)
290290
LLVM_BINDIR_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --bindir)
291291
LLVM_INCDIR_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --includedir)
292292
LLVM_LIBDIR_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --libdir)
293-
LLVM_LIBDIR_RUSTFLAGS_$(1)=-L "$$(LLVM_LIBDIR_$(1))"
294293
LLVM_LIBS_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --libs $$(LLVM_COMPONENTS))
295294
LLVM_LDFLAGS_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --ldflags)
296295
# On FreeBSD, it may search wrong headers (that are for pre-installed LLVM),

branches/beta/mk/target.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$(4): \
8484
$$(subst @,,$$(STAGE$(1)_T_$(2)_H_$(3))) \
8585
$$(RUST_LIB_FLAGS_ST$(1)) \
8686
-L "$$(RT_OUTPUT_DIR_$(2))" \
87-
$$(LLVM_LIBDIR_RUSTFLAGS_$(2)) \
87+
-L "$$(LLVM_LIBDIR_$(2))" \
8888
$$(LLVM_STDCPP_RUSTFLAGS_$(2)) \
8989
$$(RUSTFLAGS_$(4)) \
9090
--out-dir $$(@D) \

branches/beta/mk/tests.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ $(3)/stage$(1)/test/$(4)test-$(2)$$(X_$(2)): \
372372
$(Q)CFG_LLVM_LINKAGE_FILE=$$(LLVM_LINKAGE_PATH_$(3)) \
373373
$$(subst @,,$$(STAGE$(1)_T_$(2)_H_$(3))) -o $$@ $$< --test \
374374
-L "$$(RT_OUTPUT_DIR_$(2))" \
375-
$$(LLVM_LIBDIR_RUSTFLAGS_$(2)) \
375+
-L "$$(LLVM_LIBDIR_$(2))" \
376376
$$(RUSTFLAGS_$(4))
377377

378378
endef

branches/beta/src/compiletest/compiletest.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
#![feature(std_misc)]
2121
#![feature(test)]
2222
#![feature(core)]
23-
#![feature(net)]
2423
#![feature(path_ext)]
2524

2625
#![deny(warnings)]

branches/beta/src/doc/trpl/closures.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ is that a moving closure always takes ownership of all variables that
6868
it uses. Ordinary closures, in contrast, just create a reference into
6969
the enclosing stack frame. Moving closures are most useful with Rust's
7070
concurrency features, and so we'll just leave it at this for
71-
now. We'll talk about them more in the "Concurrency" chapter of the book.
71+
now. We'll talk about them more in the "Threads" section of the guide.
7272

7373
## Accepting closures as arguments
7474

branches/beta/src/doc/trpl/concurrency.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ fn main() {
339339
});
340340
}
341341
342-
rx.recv().ok().expect("Could not receive answer");
342+
rx.recv().ok().expect("Could not recieve answer");
343343
}
344344
```
345345

branches/beta/src/doc/trpl/method-syntax.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,13 +187,13 @@ impl CircleBuilder {
187187
}
188188
189189
fn coordinate(&mut self, coordinate: f64) -> &mut CircleBuilder {
190-
self.coordinate = coordinate;
191-
self
190+
self.coordinate = coordinate;
191+
self
192192
}
193193
194194
fn radius(&mut self, radius: f64) -> &mut CircleBuilder {
195-
self.radius = radius;
196-
self
195+
self.radius = radius;
196+
self
197197
}
198198
199199
fn finalize(&self) -> Circle {

branches/beta/src/libcollections/binary_heap.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -163,11 +163,6 @@ use vec::{self, Vec};
163163
/// A priority queue implemented with a binary heap.
164164
///
165165
/// This will be a max-heap.
166-
///
167-
/// It is a logic error for an item to be modified in such a way that the
168-
/// item's ordering relative to any other item, as determined by the `Ord`
169-
/// trait, changes while it is in the heap. This is normally only possible
170-
/// through `Cell`, `RefCell`, global state, I/O, or unsafe code.
171166
#[derive(Clone)]
172167
#[stable(feature = "rust1", since = "1.0.0")]
173168
pub struct BinaryHeap<T> {

branches/beta/src/libcollections/btree/map.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,6 @@ use super::node::{self, Node, Found, GoDown};
6464
/// and possibly other factors. Using linear search, searching for a random element is expected
6565
/// to take O(B log<sub>B</sub>n) comparisons, which is generally worse than a BST. In practice,
6666
/// however, performance is excellent.
67-
///
68-
/// It is a logic error for a key to be modified in such a way that the key's ordering relative to
69-
/// any other key, as determined by the `Ord` trait, changes while it is in the map. This is
70-
/// normally only possible through `Cell`, `RefCell`, global state, I/O, or unsafe code.
7167
#[derive(Clone)]
7268
#[stable(feature = "rust1", since = "1.0.0")]
7369
pub struct BTreeMap<K, V> {

branches/beta/src/libcollections/btree/node.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,8 +348,14 @@ impl<K, V> Node<K, V> {
348348
#[inline]
349349
pub fn as_slices<'a>(&'a self) -> (&'a [K], &'a [V]) {
350350
unsafe {(
351-
slice::from_raw_parts(*self.keys, self.len()),
352-
slice::from_raw_parts(*self.vals, self.len()),
351+
mem::transmute(raw::Slice {
352+
data: *self.keys as *const K,
353+
len: self.len()
354+
}),
355+
mem::transmute(raw::Slice {
356+
data: *self.vals as *const V,
357+
len: self.len()
358+
})
353359
)}
354360
}
355361

branches/beta/src/libcollections/btree/set.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ use Bound;
3030
///
3131
/// See BTreeMap's documentation for a detailed discussion of this collection's performance
3232
/// benefits and drawbacks.
33-
///
34-
/// It is a logic error for an item to be modified in such a way that the item's ordering relative
35-
/// to any other item, as determined by the `Ord` trait, changes while it is in the set. This is
36-
/// normally only possible through `Cell`, `RefCell`, global state, I/O, or unsafe code.
3733
#[derive(Clone, Hash, PartialEq, Eq, Ord, PartialOrd)]
3834
#[stable(feature = "rust1", since = "1.0.0")]
3935
pub struct BTreeSet<T>{

branches/beta/src/libcollections/enum_set.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,6 @@ use core::ops::{Sub, BitOr, BitAnd, BitXor};
2424

2525
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2626
/// A specialized set implementation to use enum types.
27-
///
28-
/// It is a logic error for an item to be modified in such a way that the transformation of the
29-
/// item to or from a `usize`, as determined by the `CLike` trait, changes while the item is in the
30-
/// set. This is normally only possible through `Cell`, `RefCell`, global state, I/O, or unsafe
31-
/// code.
3227
pub struct EnumSet<E> {
3328
// We must maintain the invariant that no bits are set
3429
// for which no variant exists

branches/beta/src/libcollections/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
#![feature(unsafe_destructor)]
3434
#![feature(unique)]
3535
#![feature(unsafe_no_drop_flag)]
36-
#![feature(step_by)]
3736
#![cfg_attr(test, feature(rand, rustc_private, test))]
3837
#![cfg_attr(test, allow(deprecated))] // rand
3938

branches/beta/src/libcollections/slice.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ use core::clone::Clone;
9292
use core::cmp::Ordering::{self, Greater, Less};
9393
use core::cmp::{self, Ord, PartialEq};
9494
use core::iter::{Iterator, IteratorExt};
95-
use core::iter::MultiplicativeIterator;
95+
use core::iter::{range_step, MultiplicativeIterator};
9696
use core::marker::Sized;
9797
use core::mem::size_of;
9898
use core::mem;
@@ -1387,7 +1387,7 @@ fn merge_sort<T, F>(v: &mut [T], mut compare: F) where F: FnMut(&T, &T) -> Order
13871387
// We could hardcode the sorting comparisons here, and we could
13881388
// manipulate/step the pointers themselves, rather than repeatedly
13891389
// .offset-ing.
1390-
for start in (0.. len).step_by(insertion) {
1390+
for start in range_step(0, len, insertion) {
13911391
// start <= i < len;
13921392
for i in start..cmp::min(start + insertion, len) {
13931393
// j satisfies: start <= j <= i;
@@ -1427,7 +1427,7 @@ fn merge_sort<T, F>(v: &mut [T], mut compare: F) where F: FnMut(&T, &T) -> Order
14271427
// a time, placing the result in `buf_tmp`.
14281428

14291429
// 0 <= start <= len.
1430-
for start in (0..len).step_by(2 * width) {
1430+
for start in range_step(0, len, 2 * width) {
14311431
// manipulate pointers directly for speed (rather than
14321432
// using a `for` loop with `range` and `.offset` inside
14331433
// that loop).

branches/beta/src/libcollections/string.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ use core::iter::{IntoIterator, FromIterator};
2424
use core::mem;
2525
use core::ops::{self, Deref, Add, Index};
2626
use core::ptr;
27-
use core::slice;
27+
use core::raw::Slice as RawSlice;
2828
use unicode::str as unicode_str;
2929
use unicode::str::Utf16Item;
3030

@@ -468,11 +468,11 @@ impl String {
468468
unsafe {
469469
// Attempt to not use an intermediate buffer by just pushing bytes
470470
// directly onto this string.
471-
let slice = slice::from_raw_parts_mut (
472-
self.vec.as_mut_ptr().offset(cur_len as isize),
473-
4
474-
);
475-
let used = ch.encode_utf8(slice).unwrap_or(0);
471+
let slice = RawSlice {
472+
data: self.vec.as_ptr().offset(cur_len as isize),
473+
len: 4,
474+
};
475+
let used = ch.encode_utf8(mem::transmute(slice)).unwrap_or(0);
476476
self.vec.set_len(cur_len + used);
477477
}
478478
}

branches/beta/src/libcollections/vec.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ use core::ops::{Index, IndexMut, Deref, Add};
6464
use core::ops;
6565
use core::ptr;
6666
use core::ptr::Unique;
67+
use core::raw::Slice as RawSlice;
6768
use core::slice;
6869
use core::usize;
6970

@@ -434,7 +435,10 @@ impl<T> Vec<T> {
434435
unsafe {
435436
let ptr = *self.ptr;
436437
assume(!ptr.is_null());
437-
slice::from_raw_parts_mut(ptr, self.len)
438+
mem::transmute(RawSlice {
439+
data: ptr,
440+
len: self.len,
441+
})
438442
}
439443
}
440444

@@ -1556,7 +1560,10 @@ impl<T> AsSlice<T> for Vec<T> {
15561560
unsafe {
15571561
let p = *self.ptr;
15581562
assume(p != 0 as *mut T);
1559-
slice::from_raw_parts(p, self.len)
1563+
mem::transmute(RawSlice {
1564+
data: p,
1565+
len: self.len
1566+
})
15601567
}
15611568
}
15621569
}

branches/beta/src/libcollections/vec_deque.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ use core::num::{Int, UnsignedInt};
2929
use core::num::wrapping::WrappingOps;
3030
use core::ops::{Index, IndexMut};
3131
use core::ptr::{self, Unique};
32-
use core::slice;
32+
use core::raw::Slice as RawSlice;
3333

3434
use core::hash::{Hash, Hasher};
3535
use core::cmp;
@@ -91,13 +91,13 @@ impl<T> VecDeque<T> {
9191
/// Turn ptr into a slice
9292
#[inline]
9393
unsafe fn buffer_as_slice(&self) -> &[T] {
94-
slice::from_raw_parts(*self.ptr, self.cap)
94+
mem::transmute(RawSlice { data: *self.ptr as *const T, len: self.cap })
9595
}
9696

9797
/// Turn ptr into a mut slice
9898
#[inline]
9999
unsafe fn buffer_as_mut_slice(&mut self) -> &mut [T] {
100-
slice::from_raw_parts_mut(*self.ptr, self.cap)
100+
mem::transmute(RawSlice { data: *self.ptr as *const T, len: self.cap })
101101
}
102102

103103
/// Moves an element out of the buffer

0 commit comments

Comments
 (0)