Skip to content

Commit dc74c8b

Browse files
committed
---
yaml --- r: 138953 b: refs/heads/try2 c: 24efea7 h: refs/heads/master i: 138951: e99ad57 v: v3
1 parent 4c1987f commit dc74c8b

Some content is hidden

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

69 files changed

+673
-3857
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 15d78fc398527c5035c092c1c67db600543902d5
8+
refs/heads/try2: 24efea720860e1dc8d4d1035f1ea8d56a3498614
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/RELEASES.txt

Lines changed: 2 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -1,85 +1,8 @@
1-
Version 0.6 (March 2013)
1+
Version 0.6 (?)
22
---------------------------
33

4-
* ~??? changes, numerous bugfixes
5-
6-
* TODO:
7-
* Ord/Cmp
8-
* Lifetime changes
9-
* Implicit self
10-
* Remove `static` keyword
11-
* Static method syntax
12-
* `as Trait`
13-
* `copy` removed?
14-
15-
* Syntax changes
16-
* The self type parameter in traits is now spelled `Self`
17-
* Replaced the `Durable` trait with the `'static` lifetime
18-
* The old closure type syntax with the trailing sigil has been
19-
removed in favor of the more consistent leading sigil
20-
* `super` is a keyword, and may be prefixed to paths
21-
* Trait bounds are separated with `+` instead of whitespace
22-
* Traits are implemented with `impl Trait for Type`
23-
instead of `impl Type: Trait`
24-
* The `export` keyword has finally been removed
25-
* The `move` keyword has been removed (linear types move by default)
26-
* The interior mutability qualifier on vectors, `[mut T]`, has been
27-
removed. Use `&mut [T]`, etc.
28-
* `mut` is no longer valid in `~mut T`. Use inherited mutability
29-
* `fail` is no longer a keyword. Use `fail!()`
30-
* `assert` is no longer a keyword. Use `assert!()`
31-
* `log` is no longer a keyword. use `debug!`, etc.
32-
* 1-tuples may be represented as `(T,)`
33-
* Struct fields may no longer be `mut`. Use inherited mutability,
34-
`@mut T`, `core::mut` or `core::cell`
35-
* `extern mod { ... }` is no longer valid syntax for foreign
36-
function modules. Use extern blocks: `extern { ... }`
37-
* Newtype enums removed. Used tuple-structs.
38-
* Trait implementations no longer support visibility modifiers
39-
40-
* Semantic changes
41-
* Linear types move by default, eliminating the `move` keyword
42-
* All foreign functions are considered unsafe
43-
* &mut is now unaliasable
44-
* Writes to borrowed @mut pointers are prevented dynamically
45-
* () has size 0
46-
* The name of the main function can be customized using #[main]
47-
* The default type of an inferred closure is &fn instead of @fn
48-
* Name resolution continues to be tweaked
49-
* Method visibility is inherited from the implementation declaration
50-
51-
* Other language changes
52-
* Structural records have been removed
53-
* Many more types can be used in constants, including enums
54-
`static lifetime pointers and vectors
55-
* Pattern matching over vectors improved and expanded
56-
* Typechecking of closure types has been overhauled to
57-
improve inference and eliminate unsoundness
58-
594
* Libraries
60-
* Lots of effort to organize the container API's around `core::container`
61-
* `core::send_map` renamed to `core::hashmap`
62-
* Added big integers to `std::bigint`
63-
* Removed `core::oldcomm` module
64-
* Added pipe-based `core::comm` module
65-
* Reimplemented `std::treemap`
66-
* Numeric traits have been reorganized under `core::num`
67-
* `core::dvec` removed. Use `@mut ~[T]` or other language types
68-
* `vec::slice` finally returns a slice
69-
* `debug!` and friends don't require a format string, e.g. `debug!(Foo)`
70-
71-
* Tools
72-
* Replaced the 'cargo' package manager with 'rustpkg'
73-
* Added all-purpose 'rust' tool
74-
* `rustc --test` now supports a benchmarks with the `#[bench]` attribute
75-
* rustc now attempts to offer spelling suggestions
76-
77-
* Misc
78-
* Improved support for ARM and Android
79-
* Preliminary MIPS backend
80-
* Improved foreign function ABI implementation for x86, x86_64
81-
* Various and memory usage improvements
82-
* Rust code may be embedded in foreign code under limited circumstances
5+
* `core::send_map` renamed to `core::hashmap`
836

847
Version 0.5 (December 2012)
858
---------------------------

branches/try2/src/etc/local_stage0.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,3 @@ cp ${PREFIX}/lib/rustc/${TARG_DIR}/${LIBDIR}/* ${TARG_DIR}/stage0/${LIBDIR}/
4646
cp ${PREFIX}/lib/librust*${LIB_SUF} ${TARG_DIR}/stage0/${LIBDIR}/
4747
cp ${PREFIX}/lib/libcore*${LIB_SUF} ${TARG_DIR}/stage0/${LIBDIR}/
4848
cp ${PREFIX}/lib/libstd*${LIB_SUF} ${TARG_DIR}/stage0/${LIBDIR}/
49-
cp ${PREFIX}/lib/libsyntax*${LIB_SUF} ${TARG_DIR}/stage0/${LIBDIR}/

branches/try2/src/libcore/core.rc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ Implicitly, all crates behave as if they included the following prologue:
5858
#[cfg(target_os = "linux")]
5959
pub mod linkhack {
6060
#[link_args="-lrustrt -lrt"]
61-
#[link_args = "-lpthread"]
6261
extern {
6362
}
6463
}
@@ -243,8 +242,7 @@ pub mod unicode;
243242
#[path = "num/cmath.rs"]
244243
pub mod cmath;
245244
pub mod stackwalk;
246-
#[path = "rt/mod.rs"]
247-
pub mod rt;
245+
248246

249247
// A curious inner-module that's not exported that contains the binding
250248
// 'core' so that macro-expanded references to core::error and such

branches/try2/src/libcore/libc.rs

Lines changed: 2 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -534,8 +534,6 @@ pub mod types {
534534

535535
pub type LPCWSTR = *WCHAR;
536536
pub type LPCSTR = *CHAR;
537-
pub type LPCTSTR = *CHAR;
538-
pub type LPTCH = *CHAR;
539537

540538
pub type LPWSTR = *mut WCHAR;
541539
pub type LPSTR = *mut CHAR;
@@ -794,7 +792,6 @@ pub mod consts {
794792

795793
pub const ERROR_SUCCESS : int = 0;
796794
pub const ERROR_INSUFFICIENT_BUFFER : int = 122;
797-
pub const INVALID_HANDLE_VALUE: int = -1;
798795
}
799796
}
800797

@@ -1118,7 +1115,6 @@ pub mod funcs {
11181115
pub mod string {
11191116
use libc::types::common::c95::c_void;
11201117
use libc::types::os::arch::c95::{c_char, c_int, size_t};
1121-
use libc::types::os::arch::c95::{wchar_t};
11221118

11231119
pub extern {
11241120
unsafe fn strcpy(dst: *c_char, src: *c_char) -> *c_char;
@@ -1142,7 +1138,6 @@ pub mod funcs {
11421138
unsafe fn strtok(s: *c_char, t: *c_char) -> *c_char;
11431139
unsafe fn strxfrm(s: *c_char, ct: *c_char, n: size_t)
11441140
-> size_t;
1145-
unsafe fn wcslen(buf: *wchar_t) -> size_t;
11461141

11471142
// These are fine to execute on the Rust stack. They must be,
11481143
// in fact, because LLVM generates calls to them!
@@ -1386,28 +1381,9 @@ pub mod funcs {
13861381
use libc::types::os::arch::c95::{c_char, c_int, c_long};
13871382

13881383
pub extern {
1389-
// default bindings for opendir and readdir in
1390-
// non-macos unix
1391-
#[cfg(target_os = "linux")]
1392-
#[cfg(target_os = "android")]
1393-
#[cfg(target_os = "freebsd")]
13941384
unsafe fn opendir(dirname: *c_char) -> *DIR;
1395-
#[cfg(target_os = "linux")]
1396-
#[cfg(target_os = "android")]
1397-
#[cfg(target_os = "freebsd")]
1398-
unsafe fn readdir(dirp: *DIR) -> *dirent_t;
1399-
// on OSX (particularly when running with a
1400-
// 64bit kernel), we have an issue where there
1401-
// are separate bindings for opendir and readdir,
1402-
// which we have to explicitly link, as below.
1403-
#[cfg(target_os = "macos")]
1404-
#[link_name = "opendir$INODE64"]
1405-
unsafe fn opendir(dirname: *c_char) -> *DIR;
1406-
#[cfg(target_os = "macos")]
1407-
#[link_name = "readdir$INODE64"]
1408-
unsafe fn readdir(dirp: *DIR) -> *dirent_t;
1409-
14101385
unsafe fn closedir(dirp: *DIR) -> c_int;
1386+
unsafe fn readdir(dirp: *DIR) -> *dirent_t;
14111387
unsafe fn rewinddir(dirp: *DIR);
14121388
unsafe fn seekdir(dirp: *DIR, loc: c_long);
14131389
unsafe fn telldir(dirp: *DIR) -> c_long;
@@ -1618,9 +1594,8 @@ pub mod funcs {
16181594

16191595
pub mod kernel32 {
16201596
use libc::types::os::arch::extra::{BOOL, DWORD, HMODULE};
1621-
use libc::types::os::arch::extra::{LPCWSTR, LPWSTR, LPTCH};
1597+
use libc::types::os::arch::extra::{LPCWSTR, LPWSTR};
16221598
use libc::types::os::arch::extra::{LPSECURITY_ATTRIBUTES};
1623-
use libc::types::os::arch::extra::{HANDLE};
16241599

16251600
#[abi = "stdcall"]
16261601
pub extern {
@@ -1630,8 +1605,6 @@ pub mod funcs {
16301605
-> DWORD;
16311606
unsafe fn SetEnvironmentVariableW(n: LPCWSTR, v: LPCWSTR)
16321607
-> BOOL;
1633-
unsafe fn GetEnvironmentStringsA() -> LPTCH;
1634-
unsafe fn FreeEnvironmentStringsA(env_ptr: LPTCH) -> BOOL;
16351608

16361609
unsafe fn GetModuleFileNameW(hModule: HMODULE,
16371610
lpFilename: LPWSTR,
@@ -1650,13 +1623,6 @@ pub mod funcs {
16501623
unsafe fn SetCurrentDirectoryW(lpPathName: LPCWSTR) -> BOOL;
16511624

16521625
unsafe fn GetLastError() -> DWORD;
1653-
unsafe fn FindFirstFileW(fileName: *u16,
1654-
findFileData: HANDLE)
1655-
-> HANDLE;
1656-
unsafe fn FindNextFileW(findFile: HANDLE,
1657-
findFileData: HANDLE)
1658-
-> BOOL;
1659-
unsafe fn FindClose(findFile: HANDLE) -> BOOL;
16601626
}
16611627
}
16621628

branches/try2/src/libcore/nil.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Functions for the unit type.
1515
*/
1616

1717
#[cfg(notest)]
18-
use cmp::{Eq, Ord, TotalOrd, Ordering, Equal};
18+
use cmp::{Eq, Ord};
1919

2020
#[cfg(notest)]
2121
impl Eq for () {
@@ -37,8 +37,3 @@ impl Ord for () {
3737
pure fn gt(&self, _other: &()) -> bool { false }
3838
}
3939

40-
#[cfg(notest)]
41-
impl TotalOrd for () {
42-
#[inline(always)]
43-
pure fn cmp(&self, _other: &()) -> Ordering { Equal }
44-
}

branches/try2/src/libcore/option.rs

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ let unwrapped_msg = match msg {
4242
*/
4343

4444
use cmp::{Eq,Ord};
45-
use ops::Add;
4645
use kinds::Copy;
4746
use util;
4847
use num::Zero;
@@ -86,18 +85,6 @@ impl<T:Ord> Ord for Option<T> {
8685
}
8786
}
8887

89-
impl<T: Copy + Add<T,T>> Add<Option<T>, Option<T>> for Option<T> {
90-
#[inline(always)]
91-
pure fn add(&self, other: &Option<T>) -> Option<T> {
92-
match (*self, *other) {
93-
(None, None) => None,
94-
(_, None) => *self,
95-
(None, _) => *other,
96-
(Some(ref lhs), Some(ref rhs)) => Some(*lhs + *rhs)
97-
}
98-
}
99-
}
100-
10188
#[inline(always)]
10289
pub pure fn get<T:Copy>(opt: Option<T>) -> T {
10390
/*!
@@ -143,27 +130,6 @@ pub pure fn get_ref<T>(opt: &r/Option<T>) -> &r/T {
143130
}
144131
}
145132
146-
pub pure fn get_mut_ref<T>(opt: &r/mut Option<T>) -> &r/mut T {
147-
/*!
148-
Gets a mutable reference to the value inside an option.
149-
150-
# Failure
151-
152-
Fails if the value equals `None`
153-
154-
# Safety note
155-
156-
In general, because this function may fail, its use is discouraged
157-
(calling `get` on `None` is akin to dereferencing a null pointer).
158-
Instead, prefer to use pattern matching and handle the `None`
159-
case explicitly.
160-
*/
161-
match *opt {
162-
Some(ref mut x) => x,
163-
None => fail!(~"option::get_mut_ref none")
164-
}
165-
}
166-
167133
#[inline(always)]
168134
pub pure fn map<T, U>(opt: &r/Option<T>, f: &fn(x: &r/T) -> U) -> Option<U> {
169135
//! Maps a `some` value by reference from one type to another
@@ -398,23 +364,6 @@ pub impl<T> Option<T> {
398364
#[inline(always)]
399365
pure fn get_ref(&self) -> &self/T { get_ref(self) }
400366
401-
/**
402-
Gets a mutable reference to the value inside an option.
403-
404-
# Failure
405-
406-
Fails if the value equals `None`
407-
408-
# Safety note
409-
410-
In general, because this function may fail, its use is discouraged
411-
(calling `get` on `None` is akin to dereferencing a null pointer).
412-
Instead, prefer to use pattern matching and handle the `None`
413-
case explicitly.
414-
*/
415-
#[inline(always)]
416-
pure fn get_mut_ref(&mut self) -> &self/mut T { get_mut_ref(self) }
417-
418367
/**
419368
* Gets the value out of an option without copying.
420369
*

0 commit comments

Comments
 (0)