Skip to content

Commit 345c788

Browse files
committed
---
yaml --- r: 89959 b: refs/heads/master c: 76d4848 h: refs/heads/master i: 89957: 2cbe845 89955: 6f1e7ae 89951: 77915df v: v3
1 parent 6a050aa commit 345c788

File tree

6 files changed

+29
-24
lines changed

6 files changed

+29
-24
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: 0036f7bbba5d14f5c019098ed0d30f06da045840
2+
refs/heads/master: 76d484805074dba56dc544db15702ee542cd0711
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: a6d3e57dca68fde4effdda3e4ae2887aa535fcd6
55
refs/heads/try: b160761e35efcd1207112b3b782c06633cf441a8

trunk/configure

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -520,14 +520,20 @@ then
520520
fi
521521
fi
522522

523+
BIN_SUF=
524+
if [ $CFG_OSTYPE = "pc-mingw32" ]
525+
then
526+
BIN_SUF=.exe
527+
fi
528+
523529
if [ ! -z "$CFG_ENABLE_LOCAL_RUST" ]
524530
then
525-
if [ ! -f ${CFG_LOCAL_RUST_ROOT}/bin/rustc ]
531+
if [ ! -f ${CFG_LOCAL_RUST_ROOT}/bin/rustc${BIN_SUF} ]
526532
then
527533
err "no local rust to use"
528534
else
529-
LRV=`${CFG_LOCAL_RUST_ROOT}/bin/rustc --version`
530-
step_msg "using rustc at: ${CFG_LOCAL_RUST_ROOT} with version: " $LRV
535+
LRV=`${CFG_LOCAL_RUST_ROOT}/bin/rustc${BIN_SUF} --version`
536+
step_msg "using rustc at: ${CFG_LOCAL_RUST_ROOT} with version: $LRV"
531537
fi
532538
fi
533539

trunk/doc/rust.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1131,9 +1131,8 @@ block.
11311131
let fptr: extern "C" fn() -> ~[int] = new_vec;
11321132
~~~~
11331133

1134-
Extern functions may be called from Rust code, but
1135-
caution must be taken with respect to the size of the stack
1136-
segment, just as when calling an extern function normally.
1134+
Extern functions may be called directly from Rust code as Rust uses large,
1135+
contiguous stack segments like C.
11371136

11381137
### Type definitions
11391138

@@ -3597,9 +3596,9 @@ and releases them back to its environment when they are no longer needed.
35973596
The default implementation of the service-provider interface
35983597
consists of the C runtime functions `malloc` and `free`.
35993598

3600-
The runtime memory-management system, in turn, supplies Rust tasks
3601-
with facilities for allocating, extending and releasing stacks,
3602-
as well as allocating and freeing heap data.
3599+
The runtime memory-management system, in turn, supplies Rust tasks with
3600+
facilities for allocating releasing stacks, as well as allocating and freeing
3601+
heap data.
36033602

36043603
### Built in types
36053604

@@ -3762,7 +3761,6 @@ have come and gone during the course of Rust's development:
37623761

37633762
Additional specific influences can be seen from the following languages:
37643763

3765-
* The stack-growth implementation of Go.
37663764
* The structural algebraic types and compilation manager of SML.
37673765
* The attribute and assembly systems of C#.
37683766
* The references and deterministic destructor system of C++.

trunk/src/etc/local_stage0.sh

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
TARG_DIR=$1
44
PREFIX=$2
55

6-
BINDIR=bin
7-
LIBDIR=lib
6+
LIB_DIR=lib
7+
LIB_PREFIX=lib
88

99
OS=`uname -s`
1010
case $OS in
@@ -21,7 +21,8 @@ case $OS in
2121
(*)
2222
BIN_SUF=.exe
2323
LIB_SUF=.dll
24-
LIBDIR=bin
24+
LIB_DIR=bin
25+
LIB_PREFIX=
2526
break
2627
;;
2728
esac
@@ -31,7 +32,7 @@ if [ -z $PREFIX ]; then
3132
exit 1
3233
fi
3334

34-
if [ ! -e ${PREFIX}/bin/rustc ]; then
35+
if [ ! -e ${PREFIX}/bin/rustc${BIN_SUF} ]; then
3536
echo "No local rust installed at ${PREFIX}"
3637
exit 1
3738
fi
@@ -41,9 +42,9 @@ if [ -z $TARG_DIR ]; then
4142
exit 1
4243
fi
4344

44-
cp ${PREFIX}/bin/rustc ${TARG_DIR}/stage0/bin/
45-
cp ${PREFIX}/lib/rustc/${TARG_DIR}/${LIBDIR}/* ${TARG_DIR}/stage0/${LIBDIR}/
46-
cp ${PREFIX}/lib/libextra*${LIB_SUF} ${TARG_DIR}/stage0/${LIBDIR}/
47-
cp ${PREFIX}/lib/librust*${LIB_SUF} ${TARG_DIR}/stage0/${LIBDIR}/
48-
cp ${PREFIX}/lib/libstd*${LIB_SUF} ${TARG_DIR}/stage0/${LIBDIR}/
49-
cp ${PREFIX}/lib/libsyntax*${LIB_SUF} ${TARG_DIR}/stage0/${LIBDIR}/
45+
cp ${PREFIX}/bin/rustc${BIN_SUF} ${TARG_DIR}/stage0/bin/
46+
cp ${PREFIX}/${LIB_DIR}/rustc/${TARG_DIR}/${LIB_DIR}/* ${TARG_DIR}/stage0/${LIB_DIR}/
47+
cp ${PREFIX}/${LIB_DIR}/${LIB_PREFIX}extra*${LIB_SUF} ${TARG_DIR}/stage0/${LIB_DIR}/
48+
cp ${PREFIX}/${LIB_DIR}/${LIB_PREFIX}rust*${LIB_SUF} ${TARG_DIR}/stage0/${LIB_DIR}/
49+
cp ${PREFIX}/${LIB_DIR}/${LIB_PREFIX}std*${LIB_SUF} ${TARG_DIR}/stage0/${LIB_DIR}/
50+
cp ${PREFIX}/${LIB_DIR}/${LIB_PREFIX}syntax*${LIB_SUF} ${TARG_DIR}/stage0/${LIB_DIR}/

trunk/src/libstd/ptr.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ pub unsafe fn replace_ptr<T>(dest: *mut T, mut src: T) -> T {
155155
* Reads the value from `*src` and returns it. Does not copy `*src`.
156156
*/
157157
#[inline(always)]
158-
pub unsafe fn read_ptr<T>(src: *mut T) -> T {
158+
pub unsafe fn read_ptr<T>(src: *T) -> T {
159159
let mut tmp: T = intrinsics::uninit();
160160
copy_nonoverlapping_memory(&mut tmp, src, 1);
161161
tmp
@@ -168,7 +168,7 @@ pub unsafe fn read_ptr<T>(src: *mut T) -> T {
168168
#[inline(always)]
169169
pub unsafe fn read_and_zero_ptr<T>(dest: *mut T) -> T {
170170
// Copy the data out from `dest`:
171-
let tmp = read_ptr(dest);
171+
let tmp = read_ptr(&*dest);
172172

173173
// Now zero out `dest`:
174174
zero_memory(dest, 1);

trunk/src/libstd/vec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1527,7 +1527,7 @@ impl<T> OwnedVector<T> for ~[T] {
15271527
let valptr = ptr::to_mut_unsafe_ptr(&mut self[ln - 1u]);
15281528
unsafe {
15291529
raw::set_len(self, ln - 1u);
1530-
Some(ptr::read_ptr(valptr))
1530+
Some(ptr::read_ptr(&*valptr))
15311531
}
15321532
}
15331533
}

0 commit comments

Comments
 (0)