Skip to content

Commit 4b5cd0f

Browse files
bleibigalexcrichton
authored andcommitted
---
yaml --- r: 106488 b: refs/heads/try c: bbec2c5 h: refs/heads/master v: v3
1 parent f5551a5 commit 4b5cd0f

File tree

10 files changed

+273
-179
lines changed

10 files changed

+273
-179
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: f203fc7daf8d598a7eacee1a135f2fd92dc6382e
5+
refs/heads/try: bbec2c54edd347b084734d01826675ae2dffc636
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/mk/dist.mk

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ PKG_ICO = $(S)src/etc/pkg/rust-logo.ico
1212
PKG_EXE = $(PKG_DIR)-install.exe
1313
endif
1414

15+
ifeq ($(CFG_OSTYPE), apple-darwin)
16+
PKG_OSX = $(PKG_DIR).pkg
17+
endif
18+
1519
PKG_GITMODULES := $(S)src/libuv $(S)src/llvm $(S)src/gyp $(S)src/compiler-rt
1620

1721
PKG_FILES := \
@@ -41,10 +45,10 @@ PKG_FILES := \
4145

4246
UNROOTED_PKG_FILES := $(patsubst $(S)%,./%,$(PKG_FILES))
4347

44-
ifdef CFG_ISCC
4548
LICENSE.txt: $(S)COPYRIGHT $(S)LICENSE-APACHE $(S)LICENSE-MIT
4649
cat $^ > $@
4750

51+
ifdef CFG_ISCC
4852
%.iss: $(S)src/etc/pkg/%.iss
4953
cp $< $@
5054

@@ -124,3 +128,31 @@ distcheck: $(PKG_TAR)
124128
@echo -----------------------------------------------
125129

126130
endif
131+
132+
ifeq ($(CFG_OSTYPE), apple-darwin)
133+
134+
dist-prepare-osx: PREPARE_HOST=$(CFG_BUILD)
135+
dist-prepare-osx: PREPARE_TARGETS=$(CFG_BUILD)
136+
dist-prepare-osx: PREPARE_DEST_DIR=pkgroot
137+
dist-prepare-osx: PREPARE_STAGE=2
138+
dist-prepare-osx: PREPARE_DIR_CMD=$(DEFAULT_PREPARE_DIR_CMD)
139+
dist-prepare-osx: PREPARE_BIN_CMD=$(DEFAULT_PREPARE_BIN_CMD)
140+
dist-prepare-osx: PREPARE_LIB_CMD=$(DEFAULT_PREPARE_LIB_CMD)
141+
dist-prepare-osx: PREPARE_MAN_CMD=$(DEFAULT_PREPARE_MAN_CMD)
142+
dist-prepare-osx: prepare-base
143+
144+
$(PKG_OSX): Distribution.xml LICENSE.txt dist-prepare-osx
145+
@$(call E, making OS X pkg)
146+
$(Q)pkgbuild --identifier org.rust-lang.rust --root pkgroot rust.pkg
147+
$(Q)productbuild --distribution Distribution.xml --resources . $(PKG_OSX)
148+
$(Q)rm -rf pkgroot rust.pkg
149+
150+
dist-osx: $(PKG_OSX)
151+
152+
distcheck-osx: $(PKG_OSX)
153+
@echo
154+
@echo -----------------------------------------------
155+
@echo $(PKG_OSX) ready for distribution
156+
@echo -----------------------------------------------
157+
158+
endif

branches/try/src/doc/rust.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3256,10 +3256,10 @@ An example of a *recursive* type and its use:
32563256
~~~~
32573257
enum List<T> {
32583258
Nil,
3259-
Cons(T, ~List<T>)
3259+
Cons(T, @List<T>)
32603260
}
32613261
3262-
let a: List<int> = Cons(7, ~Cons(13, ~Nil));
3262+
let a: List<int> = Cons(7, @Cons(13, @Nil));
32633263
~~~~
32643264

32653265
### Pointer types
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="utf-8" standalone="no"?>
2+
<installer-gui-script minSpecVersion="2">
3+
<title>Rust</title>
4+
<license file="LICENSE.txt" mime-type="text/plain"/>
5+
<pkg-ref id="org.rust-lang.rust"/>
6+
<options customize="never" require-scripts="false" hostArchitectures="i386,x86_64"/>
7+
<volume-check>
8+
<allowed-os-versions>
9+
<os-version min="10.7"/>
10+
</allowed-os-versions>
11+
</volume-check>
12+
<choices-outline>
13+
<line choice="default">
14+
<line choice="org.rust-lang.rust"/>
15+
</line>
16+
</choices-outline>
17+
<choice id="default"/>
18+
<choice id="org.rust-lang.rust" visible="false">
19+
<pkg-ref id="org.rust-lang.rust"/>
20+
</choice>
21+
<pkg-ref id="org.rust-lang.rust" version="0" onConclusion="none">rust.pkg</pkg-ref>
22+
</installer-gui-script>

branches/try/src/libarena/lib.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
extern crate collections;
2626

2727
use collections::list::{List, Cons, Nil};
28+
use collections::list;
2829

2930
use std::cast::{transmute, transmute_mut, transmute_mut_region};
3031
use std::cast;
@@ -43,7 +44,7 @@ use std::vec;
4344
// The way arena uses arrays is really deeply awful. The arrays are
4445
// allocated, and have capacities reserved, but the fill for the array
4546
// will always stay at 0.
46-
#[deriving(Clone, Eq)]
47+
#[deriving(Clone)]
4748
struct Chunk {
4849
data: Rc<RefCell<~[u8]>>,
4950
fill: Cell<uint>,
@@ -118,11 +119,13 @@ impl Drop for Arena {
118119
fn drop(&mut self) {
119120
unsafe {
120121
destroy_chunk(&self.head);
121-
for chunk in self.chunks.get().iter() {
122+
123+
list::each(self.chunks.get(), |chunk| {
122124
if !chunk.is_pod.get() {
123125
destroy_chunk(chunk);
124126
}
125-
}
127+
true
128+
});
126129
}
127130
}
128131
}

0 commit comments

Comments
 (0)