Skip to content

Rolling up PRs in the queue #18719

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 63 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
6998853
Add tests for E-needstest issues
Nov 2, 2014
071c411
Translate SIMD construction as `insertelement`s and a single store.
huonw Nov 4, 2014
0514e54
std::error: fix stray doc comment
aturon Nov 4, 2014
769fa48
test: correct spelling error & inverted match.
huonw Nov 4, 2014
2c09da7
librustc_back: Fix triple for linux armhf.
luqmana Nov 4, 2014
20c1945
librustc: Call return_type only for functions.
luqmana Nov 5, 2014
04dd61d
Make trans::adt know that some structs are unsized
nrc Nov 3, 2014
9af15e3
Test
nrc Nov 3, 2014
2f215f6
debuginfo: Make LLDB test make targets dependent on lldb python scripts.
michaelwoerister Nov 5, 2014
37a823b
debuginfo: Add timeout before running executable in LLDB tests.
michaelwoerister Nov 5, 2014
23913ec
rename deprecated non_uppercase_statics to non_upper_case_globals
Nov 5, 2014
a31e3d6
Rename misspelled module reference.
jbcrail Nov 5, 2014
1d4b024
Add missing dragonfly module.
jbcrail Nov 5, 2014
36088ab
debuginfo: Add a timeout for LLDB tests.
michaelwoerister Nov 5, 2014
e479425
Fix example in HashMap::new() docs
Nov 5, 2014
f383ce6
rustc: Add some more checks to the stability lint
brson Nov 5, 2014
cfae691
fix typo in librustc target spec
thestinger Nov 6, 2014
dddef44
Make x86_64-unknown-linux-gnu.json true to its name
edef1c Nov 6, 2014
4e35289
Restructure parsing of paths, which is quite tortured
nikomatsakis Oct 29, 2014
221edba
Support parenthesized paths `Foo(A,B) -> C` that expand to `Foo<(A,B)…
nikomatsakis Nov 4, 2014
d0fa4c6
Remove the unboxed closure `|:|` notation from types and trait refere…
nikomatsakis Nov 4, 2014
fdf5195
std::rand::OsRng: Use `getrandom` syscall on Linux
klutzy Nov 5, 2014
2cde618
Make Filetype Clonable
Nov 4, 2014
d108613
expand description of the link attribute
steveklabnik Oct 27, 2014
00ae767
Update guide.md
tshakah Nov 6, 2014
cf3b2e4
Implement low-hanging fruit of collection conventions
Gankra Nov 6, 2014
eec145b
Fallout from collection conventions
Gankra Nov 6, 2014
f230e78
Fix a couple of build warnings
fabricedesre Nov 6, 2014
c4fe781
link to raw string docs in libregex docs
steveklabnik Nov 6, 2014
679eb91
DTSify libserialize traits
Nov 6, 2014
73b86e4
Implement Default for Box<[T]>
Nov 6, 2014
5272e6c
Add tests
Nov 6, 2014
31ce92d
14.3 - helpfully implied code sample is broken
qwitwa Nov 6, 2014
bb5f03b
mk: Add -C prefer-dynamic to stage3 libs
alexcrichton Nov 6, 2014
8a25e07
rollup merge of #18605 : Gankro/collect-fruit
alexcrichton Nov 6, 2014
fcfd307
rollup merge of #18373 : steveklabnik/gh18288
alexcrichton Nov 6, 2014
73aaeb0
rollup merge of #18555 : jakub-/e-needstest
alexcrichton Nov 6, 2014
b747f70
rollup merge of #18591 : nick29581/dst-bug-str
alexcrichton Nov 6, 2014
3f3fc0c
rollup merge of #18615 : huonw/simd
alexcrichton Nov 6, 2014
08ddfc1
rollup merge of #18628 : aturon/fixup-error-comment
alexcrichton Nov 6, 2014
76d2abe
rollup merge of #18630 : nikomatsakis/purge-the-bars
alexcrichton Nov 6, 2014
b3ed448
rollup merge of #18633 : huonw/target-spec-spelling
alexcrichton Nov 6, 2014
b5ca21e
rollup merge of #18636 : luqmana/armf
alexcrichton Nov 6, 2014
e3ade0f
rollup merge of #18644 : luqmana/pefc
alexcrichton Nov 6, 2014
4fa22d9
rollup merge of #18647 : jbcrail/rename-dragonfly
alexcrichton Nov 6, 2014
fa530ff
rollup merge of #18656 : thiagopnts/rename-deprecated-non_uppercase_s…
alexcrichton Nov 6, 2014
6783afc
rollup merge of #18664 : klutzy/getrandom
alexcrichton Nov 6, 2014
29b2b58
rollup merge of #18665 : scribu/patch-1
alexcrichton Nov 6, 2014
b39f1dc
Remove rlibc from the distribution
alexcrichton Nov 4, 2014
90bfcec
rollup merge of #18679 : brson/lint-trait
alexcrichton Nov 6, 2014
11a4f7b
rollup merge of #18683 : thestinger/typo
alexcrichton Nov 6, 2014
ec983c6
rollup merge of #18684 : nathan7/patch-1
alexcrichton Nov 6, 2014
15e5779
rollup merge of #18695 : steveklabnik/gh17023
alexcrichton Nov 6, 2014
0047b84
rollup merge of #18696 : tshakah/patch-1
alexcrichton Nov 6, 2014
2a3f0bb
rollup merge of #18705 : fabricedesre/patch-1
alexcrichton Nov 6, 2014
953302f
rollup merge of #18707 : japaric/moar-dst
alexcrichton Nov 6, 2014
3c81f33
rollup merge of #18708 : qwitwa/master
alexcrichton Nov 6, 2014
f87ff76
rollup merge of #18654 : michaelwoerister/lldb-test-timeout
alexcrichton Nov 6, 2014
e4cf9c4
rollup merge of #18691 : subhashb/add_clone_trait_to_filetype
alexcrichton Nov 6, 2014
03006c7
rollup merge of #18625 : alexcrichton/no-more-rlibc
alexcrichton Nov 6, 2014
65805bf
Test fixes and rebase conflicts
alexcrichton Nov 6, 2014
2655abd
fix EnumSet::is_subset
alexcrichton Nov 6, 2014
d27039d
rollup merge of #18709 : alexcrichton/fix-windows
alexcrichton Nov 6, 2014
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions mk/crates.mk
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@

TARGET_CRATES := libc std green native flate arena term \
serialize sync getopts collections test time rand \
log regex graphviz core rbml rlibc alloc rustrt \
log regex graphviz core rbml alloc rustrt \
unicode
HOST_CRATES := syntax rustc rustdoc regex_macros fmt_macros \
rustc_llvm rustc_back
Expand All @@ -60,7 +60,6 @@ TOOLS := compiletest rustdoc rustc

DEPS_core :=
DEPS_libc := core
DEPS_rlibc := core
DEPS_unicode := core
DEPS_alloc := core libc native:jemalloc
DEPS_rustrt := alloc core libc collections native:rustrt_native
Expand Down Expand Up @@ -104,7 +103,6 @@ TOOL_SOURCE_rustc := $(S)src/driver/driver.rs

ONLY_RLIB_core := 1
ONLY_RLIB_libc := 1
ONLY_RLIB_rlibc := 1
ONLY_RLIB_alloc := 1
ONLY_RLIB_rand := 1
ONLY_RLIB_collections := 1
Expand Down
1 change: 1 addition & 0 deletions mk/main.mk
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ endif
RUSTFLAGS_STAGE0 += -C prefer-dynamic
RUSTFLAGS_STAGE1 += -C prefer-dynamic
RUST_LIB_FLAGS_ST2 += -C prefer-dynamic
RUST_LIB_FLAGS_ST3 += -C prefer-dynamic

# Landing pads require a lot of codegen. We can get through bootstrapping faster
# by not emitting them.
Expand Down
4 changes: 3 additions & 1 deletion mk/tests.mk
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,9 @@ CTEST_DEPS_cfail_$(1)-T-$(2)-H-$(3) = $$(CFAIL_TESTS)
CTEST_DEPS_bench_$(1)-T-$(2)-H-$(3) = $$(BENCH_TESTS)
CTEST_DEPS_perf_$(1)-T-$(2)-H-$(3) = $$(PERF_TESTS)
CTEST_DEPS_debuginfo-gdb_$(1)-T-$(2)-H-$(3) = $$(DEBUGINFO_GDB_TESTS)
CTEST_DEPS_debuginfo-lldb_$(1)-T-$(2)-H-$(3) = $$(DEBUGINFO_LLDB_TESTS)
CTEST_DEPS_debuginfo-lldb_$(1)-T-$(2)-H-$(3) = $$(DEBUGINFO_LLDB_TESTS) \
$(S)src/etc/lldb_batchmode.py \
$(S)src/etc/lldb_rust_formatters.py
CTEST_DEPS_codegen_$(1)-T-$(2)-H-$(3) = $$(CODEGEN_TESTS)

endef
Expand Down
6 changes: 3 additions & 3 deletions src/doc/guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -1149,7 +1149,7 @@ enum StringResult {
}
```
Where a `StringResult` is either an `StringOK`, with the result of a computation, or an
`ErrorReason` with a `String` explaining what caused the computation to fail. This kind of
`ErrorReason` with a `String` explaining what caused the computation to fail. These kinds of
`enum`s are actually very useful and are even part of the standard library.

As you can see `enum`s with values are quite a powerful tool for data representation,
Expand Down Expand Up @@ -1901,8 +1901,8 @@ result is a link to
click on that result, we'll be taken to its documentation page.

This page shows us a few things: the type signature of the function, some
explanatory text, and then an example. Let's modify our code to add in the
`random` function:
explanatory text, and then an example. Let's try to modify our code to add in the
`random` function and see what happens:

```{rust,ignore}
use std::io;
Expand Down
6 changes: 4 additions & 2 deletions src/doc/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -1961,8 +1961,10 @@ On an `extern` block, the following attributes are interpreted:
name and type. This is feature gated and the exact behavior is
implementation-defined (due to variety of linker invocation syntax).
- `link` - indicate that a native library should be linked to for the
declarations in this block to be linked correctly. See [external
blocks](#external-blocks)
declarations in this block to be linked correctly. `link` supports an optional `kind`
key with three possible values: `dylib`, `static`, and `framework`. See [external blocks](#external-blocks) for more about external blocks. Two
examples: `#[link(name = "readline")]` and
`#[link(name = "CoreFoundation", kind = "framework")]`.

On declarations inside an `extern` block, the following attributes are
interpreted:
Expand Down
25 changes: 25 additions & 0 deletions src/etc/lldb_batchmode.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@
import os
import sys
import threading
import thread
import re
import atexit
import time

# Set this to True for additional output
DEBUG_OUTPUT = False
Expand Down Expand Up @@ -130,6 +132,22 @@ def listen():
target.GetBroadcaster().AddListener(listener, lldb.SBTarget.eBroadcastBitBreakpointChanged)


def start_watchdog():
"Starts a watchdog thread that will terminate the process after a certain period of time"
watchdog_start_time = time.clock()
watchdog_max_time = watchdog_start_time + 30

def watchdog():
while time.clock() < watchdog_max_time:
time.sleep(1)
print("TIMEOUT: lldb_batchmode.py has been running for too long. Aborting!")
thread.interrupt_main()

# Start the listener and let it run as a daemon
watchdog_thread = threading.Thread(target = watchdog)
watchdog_thread.daemon = True
watchdog_thread.start()

####################################################################################################
# ~main
####################################################################################################
Expand All @@ -147,6 +165,9 @@ def listen():
print("Target executable is '%s'." % target_path)
print("Current working directory is '%s'" % os.getcwd())

# Start the timeout watchdog
start_watchdog()

# Create a new debugger instance
debugger = lldb.SBDebugger.Create()

Expand Down Expand Up @@ -175,6 +196,10 @@ def listen():

for line in script_file:
command = line.strip()
if command == "run" or command == "r" or re.match("^process\s+launch.*", command):
# Before starting to run the program, let the thread sleep a bit, so all
# breakpoint added events can be processed
time.sleep(0.5)
if command != '':
execute_command(command_interpreter, command)

Expand Down
2 changes: 1 addition & 1 deletion src/etc/unicode.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

// NOTE: The following code was generated by "src/etc/unicode.py", do not edit directly

#![allow(missing_docs, non_uppercase_statics, non_snake_case)]
#![allow(missing_docs, non_upper_case_globals, non_snake_case)]
'''

# Mapping taken from Table 12 from:
Expand Down
4 changes: 4 additions & 0 deletions src/liballoc/boxed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ impl<T: Default> Default for Box<T> {
fn default() -> Box<T> { box Default::default() }
}

impl<T> Default for Box<[T]> {
fn default() -> Box<[T]> { box [] }
}

#[unstable]
impl<T: Clone> Clone for Box<T> {
/// Returns a copy of the owned box.
Expand Down
50 changes: 40 additions & 10 deletions src/libcollections/binary_heap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ use core::ptr;
use slice;
use vec::Vec;

// FIXME(conventions): implement into_iter

/// A priority queue implemented with a binary heap.
///
/// This will be a max-heap.
Expand All @@ -184,6 +186,7 @@ impl<T: Ord> BinaryHeap<T> {
/// use std::collections::BinaryHeap;
/// let pq: BinaryHeap<uint> = BinaryHeap::new();
/// ```
#[unstable = "matches collection reform specification, waiting for dust to settle"]
pub fn new() -> BinaryHeap<T> { BinaryHeap{data: vec!(),} }

/// Creates an empty `BinaryHeap` with a specific capacity.
Expand All @@ -197,6 +200,7 @@ impl<T: Ord> BinaryHeap<T> {
/// use std::collections::BinaryHeap;
/// let pq: BinaryHeap<uint> = BinaryHeap::with_capacity(10u);
/// ```
#[unstable = "matches collection reform specification, waiting for dust to settle"]
pub fn with_capacity(capacity: uint) -> BinaryHeap<T> {
BinaryHeap { data: Vec::with_capacity(capacity) }
}
Expand Down Expand Up @@ -234,6 +238,7 @@ impl<T: Ord> BinaryHeap<T> {
/// println!("{}", x);
/// }
/// ```
#[unstable = "matches collection reform specification, waiting for dust to settle"]
pub fn iter<'a>(&'a self) -> Items<'a, T> {
Items { iter: self.data.iter() }
}
Expand Down Expand Up @@ -268,10 +273,19 @@ impl<T: Ord> BinaryHeap<T> {
/// let pq: BinaryHeap<uint> = BinaryHeap::with_capacity(100u);
/// assert!(pq.capacity() >= 100u);
/// ```
#[unstable = "matches collection reform specification, waiting for dust to settle"]
pub fn capacity(&self) -> uint { self.data.capacity() }

/// Reserves capacity for exactly `n` elements in the `BinaryHeap`.
/// Do nothing if the capacity is already sufficient.
/// Reserves the minimum capacity for exactly `additional` more elements to be inserted in the
/// given `BinaryHeap`. Does nothing if the capacity is already sufficient.
///
/// Note that the allocator may give the collection more space than it requests. Therefore
/// capacity can not be relied upon to be precisely minimal. Prefer `reserve` if future
/// insertions are expected.
///
/// # Panics
///
/// Panics if the new capacity overflows `uint`.
///
/// # Example
///
Expand All @@ -280,12 +294,17 @@ impl<T: Ord> BinaryHeap<T> {
///
/// let mut pq: BinaryHeap<uint> = BinaryHeap::new();
/// pq.reserve_exact(100u);
/// assert!(pq.capacity() == 100u);
/// assert!(pq.capacity() >= 100u);
/// ```
pub fn reserve_exact(&mut self, n: uint) { self.data.reserve_exact(n) }
#[unstable = "matches collection reform specification, waiting for dust to settle"]
pub fn reserve_exact(&mut self, additional: uint) { self.data.reserve_exact(additional) }

/// Reserves capacity for at least `n` elements in the `BinaryHeap`.
/// Do nothing if the capacity is already sufficient.
/// Reserves capacity for at least `additional` more elements to be inserted in the
/// `BinaryHeap`. The collection may reserve more space to avoid frequent reallocations.
///
/// # Panics
///
/// Panics if the new capacity overflows `uint`.
///
/// # Example
///
Expand All @@ -296,8 +315,15 @@ impl<T: Ord> BinaryHeap<T> {
/// pq.reserve(100u);
/// assert!(pq.capacity() >= 100u);
/// ```
pub fn reserve(&mut self, n: uint) {
self.data.reserve(n)
#[unstable = "matches collection reform specification, waiting for dust to settle"]
pub fn reserve(&mut self, additional: uint) {
self.data.reserve(additional)
}

/// Discards as much additional capacity as possible.
#[unstable = "matches collection reform specification, waiting for dust to settle"]
pub fn shrink_to_fit(&mut self) {
self.data.shrink_to_fit()
}

/// Removes the greatest item from a queue and returns it, or `None` if it
Expand All @@ -314,6 +340,7 @@ impl<T: Ord> BinaryHeap<T> {
/// assert_eq!(pq.pop(), Some(1i));
/// assert_eq!(pq.pop(), None);
/// ```
#[unstable = "matches collection reform specification, waiting for dust to settle"]
pub fn pop(&mut self) -> Option<T> {
match self.data.pop() {
None => { None }
Expand Down Expand Up @@ -342,6 +369,7 @@ impl<T: Ord> BinaryHeap<T> {
/// assert_eq!(pq.len(), 3);
/// assert_eq!(pq.top(), Some(&5i));
/// ```
#[unstable = "matches collection reform specification, waiting for dust to settle"]
pub fn push(&mut self, item: T) {
self.data.push(item);
let new_len = self.len() - 1;
Expand Down Expand Up @@ -495,12 +523,15 @@ impl<T: Ord> BinaryHeap<T> {
}

/// Returns the length of the queue.
#[unstable = "matches collection reform specification, waiting for dust to settle"]
pub fn len(&self) -> uint { self.data.len() }

/// Returns true if the queue contains no elements
#[unstable = "matches collection reform specification, waiting for dust to settle"]
pub fn is_empty(&self) -> bool { self.len() == 0 }

/// Drops all items from the queue.
#[unstable = "matches collection reform specification, waiting for dust to settle"]
pub fn clear(&mut self) { self.data.truncate(0) }
}

Expand Down Expand Up @@ -528,8 +559,7 @@ impl<T: Ord> Extendable<T> for BinaryHeap<T> {
fn extend<Iter: Iterator<T>>(&mut self, mut iter: Iter) {
let (lower, _) = iter.size_hint();

let len = self.capacity();
self.reserve(len + lower);
self.reserve(lower);

for elem in iter {
self.push(elem);
Expand Down
Loading