Skip to content

Commit 92fddf7

Browse files
committed
---
yaml --- r: 190919 b: refs/heads/auto c: a257288 h: refs/heads/master i: 190917: 093f2db 190915: 0ff428d 190911: 96f21c6 v: v3
1 parent 29eb549 commit 92fddf7

Some content is hidden

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

89 files changed

+1442
-1455
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1010
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1111
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1212
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
13-
refs/heads/auto: f798674b86382929ca17c88de422a6e2fdb27f2a
13+
refs/heads/auto: a2572885ab62512a2508868a27c22d615382174a
1414
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1515
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1616
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/configure

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

464-
powerpc)
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)
465468
CFG_CPUTYPE=powerpc
466469
;;
467470

@@ -823,11 +826,11 @@ then
823826
LLVM_VERSION=$($LLVM_CONFIG --version)
824827

825828
case $LLVM_VERSION in
826-
(3.[2-6]*)
829+
(3.[5-6]*)
827830
msg "found ok version of LLVM: $LLVM_VERSION"
828831
;;
829832
(*)
830-
err "bad LLVM version: $LLVM_VERSION, need >=3.0svn"
833+
err "bad LLVM version: $LLVM_VERSION, need >=3.5"
831834
;;
832835
esac
833836
fi

branches/auto/mk/main.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@ 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))"
293294
LLVM_LIBS_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --libs $$(LLVM_COMPONENTS))
294295
LLVM_LDFLAGS_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --ldflags)
295296
# On FreeBSD, it may search wrong headers (that are for pre-installed LLVM),

branches/auto/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-
-L "$$(LLVM_LIBDIR_$(2))" \
87+
$$(LLVM_LIBDIR_RUSTFLAGS_$(2)) \
8888
$$(LLVM_STDCPP_RUSTFLAGS_$(2)) \
8989
$$(RUSTFLAGS_$(4)) \
9090
--out-dir $$(@D) \

branches/auto/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-
-L "$$(LLVM_LIBDIR_$(2))" \
375+
$$(LLVM_LIBDIR_RUSTFLAGS_$(2)) \
376376
$$(RUSTFLAGS_$(4))
377377

378378
endef

branches/auto/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 "Threads" section of the guide.
71+
now. We'll talk about them more in the "Concurrency" chapter of the book.
7272

7373
## Accepting closures as arguments
7474

branches/auto/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 recieve answer");
342+
rx.recv().ok().expect("Could not receive answer");
343343
}
344344
```
345345

branches/auto/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/auto/src/libcollections/binary_heap.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,11 @@ 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.
166171
#[derive(Clone)]
167172
#[stable(feature = "rust1", since = "1.0.0")]
168173
pub struct BinaryHeap<T> {

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ 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.
6771
#[derive(Clone)]
6872
#[stable(feature = "rust1", since = "1.0.0")]
6973
pub struct BTreeMap<K, V> {

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

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -348,14 +348,8 @@ impl<K, V> Node<K, V> {
348348
#[inline]
349349
pub fn as_slices<'a>(&'a self) -> (&'a [K], &'a [V]) {
350350
unsafe {(
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-
})
351+
slice::from_raw_parts(*self.keys, self.len()),
352+
slice::from_raw_parts(*self.vals, self.len()),
359353
)}
360354
}
361355

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ 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.
3337
#[derive(Clone, Hash, PartialEq, Eq, Ord, PartialOrd)]
3438
#[stable(feature = "rust1", since = "1.0.0")]
3539
pub struct BTreeSet<T>{

branches/auto/src/libcollections/enum_set.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ 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.
2732
pub struct EnumSet<E> {
2833
// We must maintain the invariant that no bits are set
2934
// for which no variant exists

branches/auto/src/libcollections/lib.rs

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

branches/auto/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::{range_step, MultiplicativeIterator};
95+
use core::iter::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 range_step(0, len, insertion) {
1390+
for start in (0.. len).step_by(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 range_step(0, len, 2 * width) {
1430+
for start in (0..len).step_by(2 * width) {
14311431
// manipulate pointers directly for speed (rather than
14321432
// using a `for` loop with `range` and `.offset` inside
14331433
// that loop).

branches/auto/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::raw::Slice as RawSlice;
27+
use core::slice;
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 = 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);
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);
476476
self.vec.set_len(cur_len + used);
477477
}
478478
}

branches/auto/src/libcollections/vec.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ 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;
6867
use core::slice;
6968
use core::usize;
7069

@@ -435,10 +434,7 @@ impl<T> Vec<T> {
435434
unsafe {
436435
let ptr = *self.ptr;
437436
assume(!ptr.is_null());
438-
mem::transmute(RawSlice {
439-
data: ptr,
440-
len: self.len,
441-
})
437+
slice::from_raw_parts_mut(ptr, self.len)
442438
}
443439
}
444440

@@ -1560,10 +1556,7 @@ impl<T> AsSlice<T> for Vec<T> {
15601556
unsafe {
15611557
let p = *self.ptr;
15621558
assume(p != 0 as *mut T);
1563-
mem::transmute(RawSlice {
1564-
data: p,
1565-
len: self.len
1566-
})
1559+
slice::from_raw_parts(p, self.len)
15671560
}
15681561
}
15691562
}

branches/auto/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::raw::Slice as RawSlice;
32+
use core::slice;
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-
mem::transmute(RawSlice { data: *self.ptr as *const T, len: self.cap })
94+
slice::from_raw_parts(*self.ptr, 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-
mem::transmute(RawSlice { data: *self.ptr as *const T, len: self.cap })
100+
slice::from_raw_parts_mut(*self.ptr, self.cap)
101101
}
102102

103103
/// Moves an element out of the buffer

0 commit comments

Comments
 (0)