Skip to content

Commit 3938215

Browse files
committed
---
yaml --- r: 127352 b: refs/heads/master c: e59fb9e h: refs/heads/master v: v3
1 parent bb09745 commit 3938215

Some content is hidden

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

43 files changed

+298
-1138
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: 0cdeb15c316c2fbecd7c10a79baa117d5a1c1f00
2+
refs/heads/master: e59fb9eb628d5c2242568731396259bf02d50768
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 12e0f72f517516ac4fce2aed85e6142e9b874bce
55
refs/heads/try: 850af8feebe925207829017f837be826401d71a7

trunk/CONTRIBUTING.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ please do two things:
1616

1717
2. Run the full Rust test suite with the `make check` command. You're
1818
not off the hook even if you just stick to documentation; code
19-
examples in the docs are tested as well! Although for simple
20-
wording or grammar fixes, this is probably unnecessary.
19+
examples in the docs are tested as well!
2120

2221
Pull requests will be treated as "review requests", and we will give
2322
feedback we expect to see corrected on

trunk/mk/main.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,10 @@ endif
139139
RUSTFLAGS_STAGE0 += -C prefer-dynamic
140140
RUSTFLAGS_STAGE1 += -C prefer-dynamic
141141

142+
# Landing pads require a lot of codegen. We can get through bootstrapping faster
143+
# by not emitting them.
144+
RUSTFLAGS_STAGE0 += -Z no-landing-pads
145+
142146
# platform-specific auto-configuration
143147
include $(CFG_SRC_DIR)mk/platform.mk
144148

trunk/src/libcollections/ringbuf.rs

Lines changed: 3 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -403,11 +403,11 @@ impl<'a, T> ExactSize<&'a mut T> for MutItems<'a, T> {}
403403
fn grow<T>(nelts: uint, loptr: &mut uint, elts: &mut Vec<Option<T>>) {
404404
assert_eq!(nelts, elts.len());
405405
let lo = *loptr;
406-
elts.reserve(nelts * 2);
407-
let newlen = elts.capacity();
406+
let newlen = nelts * 2;
407+
elts.reserve(newlen);
408408

409409
/* fill with None */
410-
for _ in range(elts.len(), newlen) {
410+
for _ in range(elts.len(), elts.capacity()) {
411411
elts.push(None);
412412
}
413413

@@ -750,47 +750,6 @@ mod tests {
750750
assert_eq!(d.len(), 1);
751751
}
752752

753-
#[test]
754-
fn test_with_capacity_non_power_two() {
755-
let mut d3 = RingBuf::with_capacity(3);
756-
d3.push(1i);
757-
758-
// X = None, | = lo
759-
// [|1, X, X]
760-
assert_eq!(d3.pop_front(), Some(1));
761-
// [X, |X, X]
762-
assert_eq!(d3.front(), None);
763-
764-
// [X, |3, X]
765-
d3.push(3);
766-
// [X, |3, 6]
767-
d3.push(6);
768-
// [X, X, |6]
769-
assert_eq!(d3.pop_front(), Some(3));
770-
771-
// Pushing the lo past half way point to trigger
772-
// the 'B' scenario for growth
773-
// [9, X, |6]
774-
d3.push(9);
775-
// [9, 12, |6]
776-
d3.push(12);
777-
778-
d3.push(15);
779-
// There used to be a bug here about how the
780-
// RingBuf made growth assumptions about the
781-
// underlying Vec which didn't hold and lead
782-
// to corruption.
783-
// (Vec grows to next power of two)
784-
//good- [9, 12, 15, X, X, X, X, |6]
785-
//bug- [15, 12, X, X, X, |6, X, X]
786-
assert_eq!(d3.pop_front(), Some(6));
787-
788-
// Which leads us to the following state which
789-
// would be a failure case.
790-
//bug- [15, 12, X, X, X, X, |X, X]
791-
assert_eq!(d3.front(), Some(&9));
792-
}
793-
794753
#[test]
795754
fn test_reserve_exact() {
796755
let mut d = RingBuf::new();

trunk/src/libcore/num/f32.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ impl Float for f32 {
293293
#[inline]
294294
fn frac_pi_8() -> f32 { consts::FRAC_PI_8 }
295295

296-
/// 1.0 / pi
296+
/// 1 .0/ pi
297297
#[inline]
298298
fn frac_1_pi() -> f32 { consts::FRAC_1_PI }
299299

trunk/src/librustc/back/link.rs

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1400,20 +1400,6 @@ fn link_args(cmd: &mut Command,
14001400
cmd.arg("-Wl,--gc-sections");
14011401
}
14021402

1403-
let used_link_args = sess.cstore.get_used_link_args().borrow();
1404-
1405-
// Dynamically linked executables can be compiled as position independent if the default
1406-
// relocation model of position independent code is not changed. This is a requirement to take
1407-
// advantage of ASLR, as otherwise the functions in the executable are not randomized and can
1408-
// be used during an exploit of a vulnerability in any code.
1409-
if sess.targ_cfg.os == abi::OsLinux {
1410-
let mut args = sess.opts.cg.link_args.iter().chain(used_link_args.iter());
1411-
if !dylib && sess.opts.cg.relocation_model.as_slice() == "pic" &&
1412-
!args.any(|x| x.as_slice() == "-static") {
1413-
cmd.arg("-pie");
1414-
}
1415-
}
1416-
14171403
if sess.targ_cfg.os == abi::OsLinux || sess.targ_cfg.os == abi::OsDragonfly {
14181404
// GNU-style linkers will use this to omit linking to libraries which
14191405
// don't actually fulfill any relocations, but only for libraries which
@@ -1582,7 +1568,9 @@ fn link_args(cmd: &mut Command,
15821568
// Finally add all the linker arguments provided on the command line along
15831569
// with any #[link_args] attributes found inside the crate
15841570
cmd.args(sess.opts.cg.link_args.as_slice());
1585-
cmd.args(used_link_args.as_slice());
1571+
for arg in sess.cstore.get_used_link_args().borrow().iter() {
1572+
cmd.arg(arg.as_slice());
1573+
}
15861574
}
15871575

15881576
// # Native library linking

0 commit comments

Comments
 (0)