Skip to content

Commit b5e2693

Browse files
committed
---
yaml --- r: 63276 b: refs/heads/snap-stage3 c: 5954668 h: refs/heads/master v: v3
1 parent 5b3701e commit b5e2693

File tree

6 files changed

+46
-38
lines changed

6 files changed

+46
-38
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: e6503995abafd30175fdf490a4c38f5187d64931
4+
refs/heads/snap-stage3: 59546689d5c218c89515828f0ecb4021a3fd35d5
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/RELEASES.txt

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,37 @@ Version 0.7 (July 2013)
33

44
* ??? changes, numerous bugfixes
55

6+
* Syntax changes
7+
* `#[deriving(Encodable)]`, `#[deriving(Decodable)]`
8+
69
* Semantic changes
7-
* The `self` parameter no longer implicitly means `&'self self`, and can be explicitly marked
8-
with a lifetime.
10+
* The `self` parameter no longer implicitly means `&'self self`,
11+
and can be explicitly marked with a lifetime.
12+
* Structs with the `#[packed]` attribute have byte alignment and
13+
no padding between fields.
914

1015
* Libraries
11-
* New `core::iterator` module for external iterator objects
16+
17+
**Note: in 0.7 `core` was renamed `std` and `std` to `extra.
18+
These notes use the new crate names.**
19+
20+
* The `core` crate was renamed to `std`.
21+
* The `std` crate was renamed to `extra`.
22+
* `std::mut` removed.
23+
* std: `iterator` module for external iterator objects.
24+
* std: many types implement `Clone` - tuples, @, @mut. TODO
25+
* std: `path` type renamed to `Path`.
26+
* std: Many standalone functions removed in favor of methods in
27+
`vec`, `str`, TODO. In the future methods will also work as functions.
28+
* extra: `FileInput` implements `std::io::Reader`.
29+
* extra: `Complex` number type and `complex` module.
30+
* extra: `Rational` number type and `rational` module.
31+
* extra: `BigInt`, `BigUint` implement numeric and comparison traits.
32+
33+
* Other
34+
* `unused_unsafe` lint mode for detecting unnecessary `unsafe` blocks.
35+
* More and improved library documentation.
36+
* The `rusti` command has been rewritten and a number of bugs addressed.
1237

1338
Version 0.6 (April 2013)
1439
------------------------

branches/snap-stage3/mk/rt.mk

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -210,17 +210,6 @@ $$(LIBUV_LIB_$(1)_$(2)): $$(LIBUV_DEPS)
210210
V=$$(VERBOSE)
211211
endif
212212

213-
ifeq ($(OSTYPE_$(1)), linux-androideabi)
214-
$$(JEMALLOC_LIB_$(1)_$(2)):
215-
cd $$(CFG_BUILD_DIR)/rt/$(1)/stage$(2)/jemalloc; $(S)src/rt/jemalloc/configure \
216-
--disable-experimental --build=$(CFG_BUILD_TRIPLE) --host=$(1) --disable-tls \
217-
EXTRA_CFLAGS="$$(CFG_GCCISH_CFLAGS) $$(LIBUV_FLAGS_$$(HOST_$(1))) $$(SNAP_DEFINES)" \
218-
LDFLAGS="$$(CFG_GCCISH_LINK_FLAGS) $$(LIBUV_FLAGS_$$(HOST_$(1)))" \
219-
CC="$$(CC_$(1))" \
220-
CXX="$$(CXX_$(1))" \
221-
AR="$$(AR_$(1))"
222-
$$(Q)$$(MAKE) -C $$(CFG_BUILD_DIR)/rt/$(1)/stage$(2)/jemalloc
223-
else
224213
$$(JEMALLOC_LIB_$(1)_$(2)):
225214
cd $$(CFG_BUILD_DIR)/rt/$(1)/stage$(2)/jemalloc; $(S)src/rt/jemalloc/configure \
226215
--disable-experimental --build=$(CFG_BUILD_TRIPLE) --host=$(1) \
@@ -230,7 +219,6 @@ $$(JEMALLOC_LIB_$(1)_$(2)):
230219
CXX="$$(CXX_$(1))" \
231220
AR="$$(AR_$(1))"
232221
$$(Q)$$(MAKE) -C $$(CFG_BUILD_DIR)/rt/$(1)/stage$(2)/jemalloc
233-
endif
234222

235223

236224
# These could go in rt.mk or rustllvm.mk, they're needed for both.

branches/snap-stage3/src/libstd/str.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1953,6 +1953,18 @@ impl NullTerminatedStr for @str {
19531953
slice
19541954
}
19551955
}
1956+
// static strings are the only slices guaranteed to a nul-terminator
1957+
impl NullTerminatedStr for &'static str {
1958+
/**
1959+
* Work with the byte buffer of a string as a byte slice.
1960+
*
1961+
* The byte slice does include the null terminator.
1962+
*/
1963+
#[inline]
1964+
fn as_bytes_with_null(&self) -> &'static [u8] {
1965+
unsafe { ::cast::transmute(*self) }
1966+
}
1967+
}
19561968
19571969
#[allow(missing_doc)]
19581970
pub trait OwnedStr {
@@ -2913,6 +2925,10 @@ mod tests {
29132925
109, 0
29142926
];
29152927
2928+
assert_eq!("".as_bytes_with_null(), &[0]);
2929+
assert_eq!("abc".as_bytes_with_null(), &['a' as u8, 'b' as u8, 'c' as u8, 0]);
2930+
assert_eq!("ศไทย中华Việt Nam".as_bytes_with_null(), v);
2931+
29162932
let s1 = @"";
29172933
let s2 = @"abc";
29182934
let s3 = @"ศไทย中华Việt Nam";

branches/snap-stage3/src/test/bench/shootout-fasta-redux.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ impl RepeatFasta {
9393
let stdout = self.stdout;
9494
let alu_len = self.alu.len();
9595
let mut buf = vec::from_elem(alu_len + LINE_LEN, 0u8);
96-
let alu: &[u8] = self.alu.as_bytes();
96+
let alu: &[u8] = self.alu.as_bytes_with_null();
9797

9898
copy_memory(buf, alu, alu_len);
9999
copy_memory(vec::mut_slice(buf, alu_len, buf.len()),

branches/snap-stage3/src/test/compile-fail/static-slice-not-null-terminated.rs

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)