Skip to content

Commit eb0f1b4

Browse files
committed
---
yaml --- r: 155435 b: refs/heads/try2 c: e520bb1 h: refs/heads/master i: 155433: 2facaf2 155431: 9a2e9f9 v: v3
1 parent 02d30d8 commit eb0f1b4

File tree

140 files changed

+2401
-2877
lines changed

Some content is hidden

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

140 files changed

+2401
-2877
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: d64b4103d688f38c2e9e2daf966d50beeb383f1e
8+
refs/heads/try2: e520bb1b2f1667f17c3503af71273921c4fc9989
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/mk/crates.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ CRATES := $(TARGET_CRATES) $(HOST_CRATES)
5959
TOOLS := compiletest rustdoc rustc
6060

6161
DEPS_core :=
62-
DEPS_libc := core
6362
DEPS_rlibc := core
6463
DEPS_unicode := core
6564
DEPS_alloc := core libc native:jemalloc

branches/try2/mk/rt.mk

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,6 @@ LIBUV_CFLAGS_$(1) := $(subst -Werror,,$(CFG_GCCISH_CFLAGS_$(1)))
203203

204204
$$(LIBUV_MAKEFILE_$(1)): $$(LIBUV_DEPS) $$(MKFILE_DEPS) $$(LIBUV_STAMP_$(1))
205205
(cd $(S)src/libuv/ && \
206-
CC="$$(CC_$(1))" \
207-
CXX="$$(CXX_$(1))" \
208-
AR="$$(AR_$(1))" \
209206
$$(CFG_PYTHON) ./gyp_uv.py -f make -Dtarget_arch=$$(LIBUV_ARCH_$(1)) \
210207
-D ninja \
211208
-DOS=$$(LIBUV_OSTYPE_$(1)) \
@@ -228,9 +225,6 @@ else ifeq ($(OSTYPE_$(1)), apple-ios) # iOS
228225
$$(LIBUV_XCODEPROJ_$(1)): $$(LIBUV_DEPS) $$(MKFILE_DEPS) $$(LIBUV_STAMP_$(1))
229226
cp -rf $(S)src/libuv/ $$(LIBUV_BUILD_DIR_$(1))
230227
(cd $$(LIBUV_BUILD_DIR_$(1)) && \
231-
CC="$$(CC_$(1))" \
232-
CXX="$$(CXX_$(1))" \
233-
AR="$$(AR_$(1))" \
234228
$$(CFG_PYTHON) ./gyp_uv.py -f xcode \
235229
-D ninja \
236230
-R libuv)

branches/try2/mk/tests.mk

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,11 @@ ifdef VERBOSE
6060
CTEST_TESTARGS += --verbose
6161
endif
6262

63-
# Setting locale ensures that gdb's output remains consistent.
64-
# This prevents tests from failing with some locales (fixes #17423).
65-
export LC_ALL=C
66-
6763
# If we're running perf then set this environment variable
6864
# to put the benchmarks into 'hard mode'
6965
ifeq ($(MAKECMDGOALS),perf)
70-
export RUST_BENCH=1
66+
RUST_BENCH=1
67+
export RUST_BENCH
7168
endif
7269

7370
TEST_LOG_FILE=tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).log

branches/try2/src/compiletest/runtest.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -444,8 +444,7 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
444444
"-nx".to_string(),
445445
format!("-command={}", debugger_script.as_str().unwrap()));
446446

447-
let mut gdb_path = tool_path;
448-
gdb_path.push_str("/bin/arm-linux-androideabi-gdb");
447+
let gdb_path = tool_path.append("/bin/arm-linux-androideabi-gdb");
449448
let procsrv::Result {
450449
out,
451450
err,

branches/try2/src/doc/guide-unsafe.md

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ fn start(_argc: int, _argv: *const *const u8) -> int {
466466
// provided by libstd.
467467
#[lang = "stack_exhausted"] extern fn stack_exhausted() {}
468468
#[lang = "eh_personality"] extern fn eh_personality() {}
469-
#[lang = "fail_fmt"] fn fail_fmt() -> ! { loop {} }
469+
#[lang = "sized"] trait Sized { }
470470
# // fn main() {} tricked you, rustdoc!
471471
```
472472

@@ -489,28 +489,32 @@ pub extern fn main(argc: int, argv: *const *const u8) -> int {
489489
490490
#[lang = "stack_exhausted"] extern fn stack_exhausted() {}
491491
#[lang = "eh_personality"] extern fn eh_personality() {}
492-
#[lang = "fail_fmt"] fn fail_fmt() -> ! { loop {} }
492+
#[lang = "sized"] trait Sized { }
493493
# // fn main() {} tricked you, rustdoc!
494494
```
495495

496496

497497
The compiler currently makes a few assumptions about symbols which are available
498498
in the executable to call. Normally these functions are provided by the standard
499-
library, but without it you must define your own.
499+
xlibrary, but without it you must define your own.
500500

501-
The first of these three functions, `stack_exhausted`, is invoked whenever stack
501+
The first of these two functions, `stack_exhausted`, is invoked whenever stack
502502
overflow is detected. This function has a number of restrictions about how it
503503
can be called and what it must do, but if the stack limit register is not being
504504
maintained then a task always has an "infinite stack" and this function
505505
shouldn't get triggered.
506506

507-
The second of these three functions, `eh_personality`, is used by the
508-
failure mechanisms of the compiler. This is often mapped to GCC's
509-
personality function (see the
510-
[libstd implementation](std/rt/unwind/index.html) for more
511-
information), but crates which do not trigger failure can be assured
512-
that this function is never called. The final function, `fail_fmt`, is
513-
also used by the failure mechanisms of the compiler.
507+
The second of these two functions, `eh_personality`, is used by the failure
508+
mechanisms of the compiler. This is often mapped to GCC's personality function
509+
(see the [libstd implementation](std/rt/unwind/index.html) for more
510+
information), but crates which do not trigger failure can be assured that this
511+
function is never called.
512+
513+
The final item in the example is a trait called `Sized`. This a trait
514+
that represents data of a known static size: it is integral to the
515+
Rust type system, and so the compiler expects the standard library to
516+
provide it. Since you are not using the standard library, you have to
517+
provide it yourself.
514518

515519
## Using libcore
516520

@@ -569,8 +573,8 @@ pub extern fn dot_product(a: *const u32, a_len: u32,
569573
return ret;
570574
}
571575
572-
#[lang = "fail_fmt"]
573-
extern fn fail_fmt(args: &core::fmt::Arguments,
576+
#[lang = "begin_unwind"]
577+
extern fn begin_unwind(args: &core::fmt::Arguments,
574578
file: &str,
575579
line: uint) -> ! {
576580
loop {}
@@ -583,8 +587,8 @@ extern fn fail_fmt(args: &core::fmt::Arguments,
583587
```
584588

585589
Note that there is one extra lang item here which differs from the examples
586-
above, `fail_fmt`. This must be defined by consumers of libcore because the
587-
core library declares failure, but it does not define it. The `fail_fmt`
590+
above, `begin_unwind`. This must be defined by consumers of libcore because the
591+
core library declares failure, but it does not define it. The `begin_unwind`
588592
lang item is this crate's definition of failure, and it must be guaranteed to
589593
never return.
590594

@@ -690,7 +694,7 @@ fn main(argc: int, argv: *const *const u8) -> int {
690694
691695
#[lang = "stack_exhausted"] extern fn stack_exhausted() {}
692696
#[lang = "eh_personality"] extern fn eh_personality() {}
693-
#[lang = "fail_fmt"] fn fail_fmt() -> ! { loop {} }
697+
#[lang = "sized"] trait Sized {}
694698
```
695699

696700
Note the use of `abort`: the `exchange_malloc` lang item is assumed to
@@ -702,7 +706,7 @@ Other features provided by lang items include:
702706
`==`, `<`, dereferencing (`*`) and `+` (etc.) operators are all
703707
marked with lang items; those specific four are `eq`, `ord`,
704708
`deref`, and `add` respectively.
705-
- stack unwinding and general failure; the `eh_personality`, `fail`
709+
- stack unwinding and general failure; the `eh_personality`, `fail_`
706710
and `fail_bounds_checks` lang items.
707711
- the traits in `std::kinds` used to indicate types that satisfy
708712
various kinds; lang items `send`, `sync` and `copy`.

branches/try2/src/etc/vim/compiler/cargo.vim

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

branches/try2/src/libcollections/dlist.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -844,7 +844,6 @@ mod tests {
844844
}
845845

846846
#[test]
847-
#[allow(deprecated)]
848847
fn test_append() {
849848
{
850849
let mut m = DList::new();

branches/try2/src/libcollections/slice.rs

Lines changed: 4 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -850,16 +850,6 @@ mod tests {
850850
assert_eq!(a.as_slice().head().unwrap(), &11);
851851
}
852852

853-
#[test]
854-
fn test_head_mut() {
855-
let mut a = vec![];
856-
assert_eq!(a.as_mut_slice().head_mut(), None);
857-
a = vec![11i];
858-
assert_eq!(*a.as_mut_slice().head_mut().unwrap(), 11);
859-
a = vec![11i, 12];
860-
assert_eq!(*a.as_mut_slice().head_mut().unwrap(), 11);
861-
}
862-
863853
#[test]
864854
fn test_tail() {
865855
let mut a = vec![11i];
@@ -870,39 +860,22 @@ mod tests {
870860
assert_eq!(a.tail(), b);
871861
}
872862

873-
#[test]
874-
fn test_tail_mut() {
875-
let mut a = vec![11i];
876-
let b: &mut [int] = &mut [];
877-
assert!(a.as_mut_slice().tail_mut() == b);
878-
a = vec![11i, 12];
879-
let b: &mut [int] = &mut [12];
880-
assert!(a.as_mut_slice().tail_mut() == b);
881-
}
882-
883863
#[test]
884864
#[should_fail]
885865
fn test_tail_empty() {
886866
let a: Vec<int> = vec![];
887867
a.tail();
888868
}
889869

890-
#[test]
891-
#[should_fail]
892-
fn test_tail_mut_empty() {
893-
let mut a: Vec<int> = vec![];
894-
a.as_mut_slice().tail_mut();
895-
}
896-
897870
#[test]
898871
#[allow(deprecated)]
899872
fn test_tailn() {
900873
let mut a = vec![11i, 12, 13];
901-
let b: &mut [int] = &mut [11, 12, 13];
902-
assert!(a.tailn(0) == b);
874+
let b: &[int] = &[11, 12, 13];
875+
assert_eq!(a.tailn(0), b);
903876
a = vec![11i, 12, 13];
904-
let b: &mut [int] = &mut [13];
905-
assert!(a.tailn(2) == b);
877+
let b: &[int] = &[13];
878+
assert_eq!(a.tailn(2), b);
906879
}
907880

908881
#[test]
@@ -923,30 +896,13 @@ mod tests {
923896
assert_eq!(a.init(), b);
924897
}
925898

926-
#[test]
927-
fn test_init_mut() {
928-
let mut a = vec![11i];
929-
let b: &mut [int] = &mut [];
930-
assert!(a.as_mut_slice().init_mut() == b);
931-
a = vec![11i, 12];
932-
let b: &mut [int] = &mut [11];
933-
assert!(a.as_mut_slice().init_mut() == b);
934-
}
935-
936899
#[test]
937900
#[should_fail]
938901
fn test_init_empty() {
939902
let a: Vec<int> = vec![];
940903
a.init();
941904
}
942905

943-
#[test]
944-
#[should_fail]
945-
fn test_init_mut_empty() {
946-
let mut a: Vec<int> = vec![];
947-
a.as_mut_slice().init_mut();
948-
}
949-
950906
#[test]
951907
#[allow(deprecated)]
952908
fn test_initn() {
@@ -976,16 +932,6 @@ mod tests {
976932
assert_eq!(a.as_slice().last().unwrap(), &12);
977933
}
978934

979-
#[test]
980-
fn test_last_mut() {
981-
let mut a = vec![];
982-
assert_eq!(a.as_mut_slice().last_mut(), None);
983-
a = vec![11i];
984-
assert_eq!(*a.as_mut_slice().last_mut().unwrap(), 11);
985-
a = vec![11i, 12];
986-
assert_eq!(*a.as_mut_slice().last_mut().unwrap(), 12);
987-
}
988-
989935
#[test]
990936
fn test_slice() {
991937
// Test fixed length vector.
@@ -1131,7 +1077,6 @@ mod tests {
11311077
}
11321078

11331079
#[test]
1134-
#[allow(deprecated)]
11351080
fn test_grow_set() {
11361081
let mut v = vec![1i, 2, 3];
11371082
v.grow_set(4u, &4, 5);
@@ -1665,7 +1610,6 @@ mod tests {
16651610

16661611
#[test]
16671612
#[should_fail]
1668-
#[allow(deprecated)]
16691613
fn test_copy_memory_oob() {
16701614
unsafe {
16711615
let mut a = [1i, 2, 3, 4];
@@ -1849,26 +1793,6 @@ mod tests {
18491793
assert_eq!(xs.splitn(1, |x| *x == 5).collect::<Vec<&[int]>>().as_slice(), splits);
18501794
}
18511795

1852-
#[test]
1853-
fn test_splitnator_mut() {
1854-
let xs = &mut [1i,2,3,4,5];
1855-
1856-
let splits: &[&mut [int]] = &[&mut [1,2,3,4,5]];
1857-
assert_eq!(xs.splitn_mut(0, |x| *x % 2 == 0).collect::<Vec<&mut [int]>>().as_slice(),
1858-
splits);
1859-
let splits: &[&mut [int]] = &[&mut [1], &mut [3,4,5]];
1860-
assert_eq!(xs.splitn_mut(1, |x| *x % 2 == 0).collect::<Vec<&mut [int]>>().as_slice(),
1861-
splits);
1862-
let splits: &[&mut [int]] = &[&mut [], &mut [], &mut [], &mut [4,5]];
1863-
assert_eq!(xs.splitn_mut(3, |_| true).collect::<Vec<&mut [int]>>().as_slice(),
1864-
splits);
1865-
1866-
let xs: &mut [int] = &mut [];
1867-
let splits: &[&mut [int]] = &[&mut []];
1868-
assert_eq!(xs.splitn_mut(1, |x| *x == 5).collect::<Vec<&mut [int]>>().as_slice(),
1869-
splits);
1870-
}
1871-
18721796
#[test]
18731797
fn test_rsplitator() {
18741798
let xs = &[1i,2,3,4,5];

branches/try2/src/libcollections/str.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,7 @@ pub trait StrAllocating: Str {
698698
let me = self.as_slice();
699699
let mut out = String::with_capacity(me.len());
700700
for c in me.chars() {
701-
c.escape_default(|c| out.push(c));
701+
c.escape_default(|c| out.push_char(c));
702702
}
703703
out
704704
}
@@ -708,7 +708,7 @@ pub trait StrAllocating: Str {
708708
let me = self.as_slice();
709709
let mut out = String::with_capacity(me.len());
710710
for c in me.chars() {
711-
c.escape_unicode(|c| out.push(c));
711+
c.escape_unicode(|c| out.push_char(c));
712712
}
713713
out
714714
}

0 commit comments

Comments
 (0)