]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoUse the right target ratio in Algorithm M quickstart.
Robin Kruppe [Tue, 26 Jan 2016 21:08:01 +0000 (22:08 +0100)]
Use the right target ratio in Algorithm M quickstart.

Using f64's bit size probably wasn't actually *wrong*, but it would overshoot for no reason. This might have slowed down f32 parsing significantly.

8 years agoAddress nits on build/scope.rs
Simonas Kazlauskas [Tue, 2 Feb 2016 20:50:26 +0000 (22:50 +0200)]
Address nits on build/scope.rs

8 years agoTranslation part of drop panic recovery
Simonas Kazlauskas [Sat, 30 Jan 2016 17:32:50 +0000 (19:32 +0200)]
Translation part of drop panic recovery

With this commit we now finally execute all the leftover drops once some drop panics for some
reason!

8 years agoConvert Drop statement into terminator
Simonas Kazlauskas [Fri, 29 Jan 2016 22:18:47 +0000 (00:18 +0200)]
Convert Drop statement into terminator

The structure of the old translator as well as MIR assumed that drop glue cannot possibly panic and
translated the drops accordingly. However, in presence of `Drop::drop` this assumption can be
trivially shown to be untrue. As such, the Rust code like the following would never print number 2:

```rust
struct Droppable(u32);
impl Drop for Droppable {
    fn drop(&mut self) {
        if self.0 == 1 { panic!("Droppable(1)") } else { println!("{}", self.0) }
    }
}
fn main() {
    let x = Droppable(2);
    let y = Droppable(1);
}
```

While the behaviour is allowed according to the language rules (we allow drops to not run), that’s
a very counter-intuitive behaviour. We fix this in MIR by allowing `Drop` to have a target to take
on divergence and connect the drops in such a way so the leftover drops are executed when some drop
unwinds.

Note, that this commit still does not implement the translator part of changes necessary for the
grand scheme of things to fully work, so the actual observed behaviour does not change yet. Coming
soon™.

See #14875.

8 years agoRemove the CallKind
Simonas Kazlauskas [Fri, 29 Jan 2016 18:42:02 +0000 (20:42 +0200)]
Remove the CallKind

We used to have CallKind only because there was a requirement to have all successors in a
contiguous memory block. Now that the requirement is gone, remove the CallKind and instead just
have the necessary information inline.

Awesome!

8 years agoChange successor{,_mut} to return a Vec
Simonas Kazlauskas [Fri, 29 Jan 2016 17:06:23 +0000 (19:06 +0200)]
Change successor{,_mut} to return a Vec

This helps to avoid the unpleasant restriction of being unable to have multiple successors in
non-contiguous block of memory.

8 years agoSynthesize calls to box_free language item
Simonas Kazlauskas [Thu, 28 Jan 2016 21:59:00 +0000 (23:59 +0200)]
Synthesize calls to box_free language item

This gets rid of Drop(Free, _) MIR construct by synthesizing a call to language item which
takes care of dropping instead.

8 years agoAuto merge of #31161 - sfackler:slice-to-socket-addrs, r=alexcrichton
bors [Thu, 4 Feb 2016 13:41:42 +0000 (13:41 +0000)]
Auto merge of #31161 - sfackler:slice-to-socket-addrs, r=alexcrichton

This is useful when you have an API that takes a `T: ToSocketAddrs` and needs to turn that into an owned value which will be passed to another API taking `T: ToSocketAddrs` at a later time, for example: https://github.com/sfackler/rust-hyper-socks/blob/master/src/lib.rs#L15

8 years agoAuto merge of #31069 - sfackler:file-try-clone, r=alexcrichton
bors [Thu, 4 Feb 2016 11:39:27 +0000 (11:39 +0000)]
Auto merge of #31069 - sfackler:file-try-clone, r=alexcrichton

I have it set as stable right now under the rationale that it's extending an existing, stable API to another type in the "obvious" way.

r? @alexcrichton

cc @reem

8 years agoImplement ToSocketAddrs for &[SocketAddr]
Steven Fackler [Sun, 24 Jan 2016 08:31:22 +0000 (00:31 -0800)]
Implement ToSocketAddrs for &[SocketAddr]

8 years agoAdd File::try_clone
Steven Fackler [Thu, 21 Jan 2016 05:24:23 +0000 (21:24 -0800)]
Add File::try_clone

8 years agoAuto merge of #31378 - nagisa:target-man, r=alexcrichton
bors [Thu, 4 Feb 2016 09:38:15 +0000 (09:38 +0000)]
Auto merge of #31378 - nagisa:target-man, r=alexcrichton

8 years agoFix unclear make_mut docs
Richard Bradfield [Wed, 3 Feb 2016 22:18:04 +0000 (22:18 +0000)]
Fix unclear make_mut docs

Changed the description of the `make_mut` copy-on-write behaviour in arc.rs

The sentence "doesn't have one strong reference and no weak references." is a
hard to understand double negative, which can be much more easily explained.

8 years agoAuto merge of #31326 - sdleffler:master, r=nikomatsakis
bors [Thu, 4 Feb 2016 06:07:26 +0000 (06:07 +0000)]
Auto merge of #31326 - sdleffler:master, r=nikomatsakis

After the truly incredible and embarrassing mess I managed to make in my last pull request, this should be a bit less messy.

Fixes #31267 - with this change, the code mentioned in the issue compiles.

Found and fixed another issue as well - constants of zero-size types, when used in ExprRepeats inside associated constants, were causing the compiler to crash at the same place as #31267. An example of this:
```

struct Bar;

const BAZ: Bar = Bar;

struct Foo([Bar; 1]);

struct Biz;

impl Biz {
    const BAZ: Foo = Foo([BAZ; 1]);
}

fn main() {
    let foo = Biz::BAZ;
    println!("{:?}", foo);
}
```
However, I'm fairly certain that my fix for this is not as elegant as it could be. The problem seems to occur only with an associated constant of a tuple struct containing a fixed size array which is initialized using a repeat expression, and when the element to be repeated provided to the repeat expression is another constant which is of a zero-sized type. The fix works by looking for constants and associated constants which are zero-width and consequently contain no data, but for which rustc is still attempting to emit an LLVM value; it simply stops rustc from attempting to emit anything. By my logic, this should work fine since the only values that are emitted in this case (according to the comments) are for closures with side effects, and constants will never have side effects, so it's fine to simply get rid of them. It fixes the error and things compile fine with it, but I have a sneaking suspicion that it could be done in a far better manner.

r? @nikomatsakis

8 years agotest #[derive(FromPrimitive)] triggers custom-derive error
Alex Burka [Thu, 4 Feb 2016 00:58:07 +0000 (19:58 -0500)]
test #[derive(FromPrimitive)] triggers custom-derive error

8 years agoAuto merge of #30962 - Amanieu:non_volatile_atomic, r=alexcrichton
bors [Thu, 4 Feb 2016 02:46:44 +0000 (02:46 +0000)]
Auto merge of #30962 - Amanieu:non_volatile_atomic, r=alexcrichton

Rust currently emits atomic loads and stores with the LLVM `volatile` qualifier. This is unnecessary and prevents LLVM from performing optimization on these atomic operations.

8 years agoremove dead #[derive(FromPrimitive)] code
Alex Burka [Thu, 4 Feb 2016 00:41:54 +0000 (19:41 -0500)]
remove dead #[derive(FromPrimitive)] code

8 years agoAuto merge of #30796 - GuillaumeGomez:impl_box_error, r=alexcrichton
bors [Thu, 4 Feb 2016 00:39:55 +0000 (00:39 +0000)]
Auto merge of #30796 - GuillaumeGomez:impl_box_error, r=alexcrichton

Fixes #30349

8 years agoRemove unneeded borrows and slices
Jeffrey Seyfried [Fri, 29 Jan 2016 23:34:58 +0000 (23:34 +0000)]
Remove unneeded borrows and slices

8 years agoRemove unneeded use of Cell
Jeffrey Seyfried [Sun, 31 Jan 2016 00:41:26 +0000 (00:41 +0000)]
Remove unneeded use of Cell

8 years agoRefactor away resolve_item_by_name_in_lexical_scope
Jeffrey Seyfried [Sat, 30 Jan 2016 13:33:02 +0000 (13:33 +0000)]
Refactor away resolve_item_by_name_in_lexical_scope

8 years agoRefactor resolve_import_for_module
Jeffrey Seyfried [Sat, 16 Jan 2016 11:41:19 +0000 (11:41 +0000)]
Refactor resolve_import_for_module

8 years agoRefactor away resolve_module_in_lexical_scope
Jeffrey Seyfried [Sun, 31 Jan 2016 00:38:45 +0000 (00:38 +0000)]
Refactor away resolve_module_in_lexical_scope

8 years agoRefactor block_needs_anonymous_module
Jeffrey Seyfried [Wed, 27 Jan 2016 10:51:22 +0000 (10:51 +0000)]
Refactor block_needs_anonymous_module

8 years agoRefactor more functionality into record_import_use
Jeffrey Seyfried [Sat, 16 Jan 2016 12:09:13 +0000 (12:09 +0000)]
Refactor more functionality into record_import_use

8 years agoRefactor resolve_item_in_lexical_scope
Jeffrey Seyfried [Sun, 31 Jan 2016 04:27:39 +0000 (04:27 +0000)]
Refactor resolve_item_in_lexical_scope

8 years agoImprove detection of unused imports
Jeffrey Seyfried [Sun, 31 Jan 2016 04:25:49 +0000 (04:25 +0000)]
Improve detection of unused imports

8 years agoAvoid quadratic growth of functions due to cleanups
Björn Steinbrink [Wed, 3 Feb 2016 18:27:32 +0000 (19:27 +0100)]
Avoid quadratic growth of functions due to cleanups

If a new cleanup is added to a cleanup scope, the cached exits for that
scope are cleared, so all previous cleanups have to be translated
again. In the worst case this means that we get N distinct landing pads
where the last one has N cleanups, then N-1 and so on.

As new cleanups are to be executed before older ones, we can instead
cache the number of already translated cleanups in addition to the
block that contains them, and then only translate new ones, if any and
then jump to the cached ones, getting away with linear growth instead.

For the crate in #31381 this reduces the compile time for an optimized
build from >20 minutes (I cancelled the build at that point) to about 11
seconds. Testing a few crates that come with rustc show compile time
improvements somewhere between 1 and 8%. The "big" winner being
rustc_platform_intrinsics which features code similar to that in #31381.

Fixes #31381

8 years agoAuto merge of #31078 - nbaksalyar:illumos, r=alexcrichton
bors [Wed, 3 Feb 2016 22:40:32 +0000 (22:40 +0000)]
Auto merge of #31078 - nbaksalyar:illumos, r=alexcrichton

This pull request adds support for [Illumos](http://illumos.org/)-based operating systems: SmartOS, OpenIndiana, and others. For now it's x86-64 only, as I'm not sure if 32-bit installations are widespread. This PR is based on #28589 by @potatosalad, and also closes #21000, #25845, and #25846.

Required changes in libc are already merged: https://github.com/rust-lang-nursery/libc/pull/138

Here's a snapshot required to build a stage0 compiler:
https://s3-eu-west-1.amazonaws.com/nbaksalyar/rustc-sunos-snapshot.tar.gz
It passes all checks from `make check`.

There are some changes I'm not quite sure about, e.g. macro usage in `src/libstd/num/f64.rs` and `DirEntry` structure in `src/libstd/sys/unix/fs.rs`, so any comments on how to rewrite it better would be greatly appreciated.

Also, LLVM configure script might need to be patched to build it successfully, or a pre-built libLLVM should be used. Some details can be found here: https://llvm.org/bugs/show_bug.cgi?id=25409

Thanks!

r? @brson

8 years agoRemove redundant semicolon from "block_expr" in grammar reference
Matt Brubeck [Wed, 3 Feb 2016 21:42:23 +0000 (13:42 -0800)]
Remove redundant semicolon from "block_expr" in grammar reference

"stmt" already includes the terminating semicolon.

8 years agoAdd tests for `Cow::from` for strings, vectors and slices
Tobias Bucher [Wed, 3 Feb 2016 12:57:25 +0000 (13:57 +0100)]
Add tests for `Cow::from` for strings, vectors and slices

8 years agoAdd `Cow::from` for `Vec` and slices
Tobias Bucher [Wed, 3 Feb 2016 12:57:02 +0000 (13:57 +0100)]
Add `Cow::from` for `Vec` and slices

Fixes #31354.

8 years agoAuto merge of #30834 - reem:rwlock-read-guard-map, r=alexcrichton
bors [Wed, 3 Feb 2016 19:26:05 +0000 (19:26 +0000)]
Auto merge of #30834 - reem:rwlock-read-guard-map, r=alexcrichton

This is very useful when the RwLock is synchronizing access to a data
structure and you would like to return or store guards which contain
references to data inside the data structure instead of the data structure
itself.

8 years agoReformat comments
Paul Dicker [Wed, 3 Feb 2016 17:50:57 +0000 (18:50 +0100)]
Reformat comments

8 years agoAdress comments
Paul Dicker [Wed, 3 Feb 2016 17:23:33 +0000 (18:23 +0100)]
Adress comments

8 years agoAuto merge of #31056 - kamalmarhubi:std-process-nul-chars, r=alexcrichton
bors [Wed, 3 Feb 2016 17:19:10 +0000 (17:19 +0000)]
Auto merge of #31056 - kamalmarhubi:std-process-nul-chars, r=alexcrichton

This reports an error at the point of calling `Command::spawn()` or one of
its equivalents.

Fixes #30858
Fixes #30862

8 years agoFix rendering of single-char-span
mitaa [Wed, 3 Feb 2016 15:07:40 +0000 (16:07 +0100)]
Fix rendering of single-char-span

A span spanning only a single character would render like `^~`
instead of just `^`.

8 years agostd: Properly handle interior NULs in std::process
Kamal Marhubi [Fri, 15 Jan 2016 20:29:45 +0000 (15:29 -0500)]
std: Properly handle interior NULs in std::process

This reports an error at the point of calling `Command::spawn()` or one of
its equivalents.

Fixes https://github.com/rust-lang/rust/issues/30858
Fixes https://github.com/rust-lang/rust/issues/30862

8 years agocompiler-rt: Handle -Werror=* arguments in CFLAGS
Guillaume Bonnet [Wed, 3 Feb 2016 15:08:18 +0000 (16:08 +0100)]
compiler-rt: Handle -Werror=* arguments in CFLAGS

8 years agoAuto merge of #31371 - apasel422:docs, r=alexcrichton
bors [Wed, 3 Feb 2016 15:13:39 +0000 (15:13 +0000)]
Auto merge of #31371 - apasel422:docs, r=alexcrichton

r? @steveklabnik

8 years agoFix broken auto-mac-ios-opt build
Nikita Baksalyar [Wed, 3 Feb 2016 13:45:34 +0000 (16:45 +0300)]
Fix broken auto-mac-ios-opt build

8 years agoAuto merge of #31385 - oli-obk:doc/mir, r=nagisa
bors [Wed, 3 Feb 2016 13:05:18 +0000 (13:05 +0000)]
Auto merge of #31385 - oli-obk:doc/mir, r=nagisa

I didn't change any content, just added another slash so we can see those comments in the docs

r? @steveklabnik

8 years agoupgrade comments on MIR structures and functions to doc comments
Oliver Schneider [Wed, 3 Feb 2016 12:25:07 +0000 (13:25 +0100)]
upgrade comments on MIR structures and functions to doc comments

8 years agoAuto merge of #31375 - nagisa:path-docs, r=alexcrichton
bors [Wed, 3 Feb 2016 10:59:47 +0000 (10:59 +0000)]
Auto merge of #31375 - nagisa:path-docs, r=alexcrichton

8 years agoImprove wording of --target help
Simonas Kazlauskas [Wed, 3 Feb 2016 00:50:55 +0000 (02:50 +0200)]
Improve wording of --target help

8 years agoAuto merge of #31338 - dirk:dirk/add-name-bindings-for-bad-imports, r=nrc
bors [Wed, 3 Feb 2016 08:51:31 +0000 (08:51 +0000)]
Auto merge of #31338 - dirk:dirk/add-name-bindings-for-bad-imports, r=nrc

WIP implementation of #31209.

The goal is to insert fake/dummy definitions for names that we failed to import so that later resolver stages won't complain about them.

8 years agoChanged macro spans in CSVs to point to the macro name, bugfixed nested spans
Daniel Campbell [Wed, 3 Feb 2016 07:44:53 +0000 (20:44 +1300)]
Changed macro spans in CSVs to point to the macro name, bugfixed nested spans

8 years agoAuto merge of #31263 - dhuseby:fixing_bsd_builds, r=alexcrichton
bors [Wed, 3 Feb 2016 06:38:01 +0000 (06:38 +0000)]
Auto merge of #31263 - dhuseby:fixing_bsd_builds, r=alexcrichton

Something went haywire with github last night and the old PR https://github.com/rust-lang/rust/pull/31230 got closed somehow.  This new PR is to replace the old one.  This incorporates all of the feedback from the other PR.

@alexcrichton I incorporated the suggestion from @semarie and the result is cleaner and clearer.  I think this is ready to go.

8 years agotrying again at fixing stackp initialization
Dave Huseby [Wed, 3 Feb 2016 02:21:39 +0000 (18:21 -0800)]
trying again at fixing stackp initialization

8 years agosimplifying get_stack
Dave Huseby [Tue, 2 Feb 2016 17:23:33 +0000 (09:23 -0800)]
simplifying get_stack

8 years agorefactoring get_stack to be cleaner
Dave Huseby [Thu, 28 Jan 2016 00:46:45 +0000 (16:46 -0800)]
refactoring get_stack to be cleaner

8 years agounifying name_bytes now that the two blocks are the same
Dave Huseby [Wed, 27 Jan 2016 05:37:46 +0000 (21:37 -0800)]
unifying name_bytes now that the two blocks are the same

8 years agoFixes #31229
Dave Huseby [Wed, 27 Jan 2016 01:37:18 +0000 (17:37 -0800)]
Fixes #31229

8 years agoSpelling fix in `middle::def::Def`
Dirk Gadsden [Mon, 1 Feb 2016 04:44:10 +0000 (20:44 -0800)]
Spelling fix in `middle::def::Def`

8 years agoAdd fake import resolutions & targets for names in bad imports
Dirk Gadsden [Mon, 1 Feb 2016 03:26:16 +0000 (19:26 -0800)]
Add fake import resolutions & targets for names in bad imports

8 years agoAuto merge of #31319 - alexcrichton:msvc-backtraces, r=michaelwoerister
bors [Wed, 3 Feb 2016 03:06:52 +0000 (03:06 +0000)]
Auto merge of #31319 - alexcrichton:msvc-backtraces, r=michaelwoerister

This mirrors the behavior of `clang-cl.exe` by adding a `CodeView` global
variable when emitting debug information. This should in turn help stack traces
that are generated when code is compiled with debuginfo enabled.

Closes #28133

8 years agoAuto merge of #31370 - Manishearth:rollup, r=Manishearth
bors [Wed, 3 Feb 2016 00:58:37 +0000 (00:58 +0000)]
Auto merge of #31370 - Manishearth:rollup, r=Manishearth

- Successful merges: #27499, #31220, #31329, #31332, #31347, #31351, #31352, #31366
- Failed merges:

8 years agoAdd issue number to guard map methods.
Jonathan Reem [Sun, 31 Jan 2016 00:39:03 +0000 (16:39 -0800)]
Add issue number to guard map methods.

8 years agoImprove docs for Path::methods
Simonas Kazlauskas [Tue, 2 Feb 2016 23:16:58 +0000 (01:16 +0200)]
Improve docs for Path::methods

8 years agoAuto merge of #31361 - alexcrichton:revert-mk-changes, r=brson
bors [Tue, 2 Feb 2016 21:57:57 +0000 (21:57 +0000)]
Auto merge of #31361 - alexcrichton:revert-mk-changes, r=brson

This reverts commit d03712977d7c913044f2b863269c4491d7fa7c36.

8 years agoCorrect `linked_list::IntoIter` doc comment
Andrew Paseltiner [Tue, 2 Feb 2016 21:45:35 +0000 (16:45 -0500)]
Correct `linked_list::IntoIter` doc comment

8 years agoRollup merge of #31366 - paulsmith:patch-1, r=steveklabnik
Manish Goregaokar [Tue, 2 Feb 2016 21:24:25 +0000 (02:54 +0530)]
Rollup merge of #31366 - paulsmith:patch-1, r=steveklabnik

The context of the link is `Result` but it points to the docs on `Option`'s `expect`.

8 years agoRollup merge of #31352 - steveklabnik:gh31154, r=nikomatsakis
Manish Goregaokar [Tue, 2 Feb 2016 21:24:25 +0000 (02:54 +0530)]
Rollup merge of #31352 - steveklabnik:gh31154, r=nikomatsakis

Fixes #31154

8 years agoRollup merge of #31351 - steveklabnik:gh31318, r=alexcrichton
Manish Goregaokar [Tue, 2 Feb 2016 21:24:25 +0000 (02:54 +0530)]
Rollup merge of #31351 - steveklabnik:gh31318, r=alexcrichton

This is a behavior that some find confusing, so it deserves its own example.

Fixes #31318

I think this wording might be a bit strange, but I couldn't come up with anything better. Feedback very welcome.

8 years agoRollup merge of #31347 - GuillaumeGomez:fix_E0118, r=Manishearth
Manish Goregaokar [Tue, 2 Feb 2016 21:24:25 +0000 (02:54 +0530)]
Rollup merge of #31347 - GuillaumeGomez:fix_E0118, r=Manishearth

r? @eddyb

8 years agoRollup merge of #31332 - durka:errorck-fileline, r=brson
Manish Goregaokar [Tue, 2 Feb 2016 21:24:24 +0000 (02:54 +0530)]
Rollup merge of #31332 - durka:errorck-fileline, r=brson

Small modification to #31288. Shows full path and line number for unused error codes.

8 years agoRollup merge of #31329 - quodlibetor:no-const-doc-in-stable, r=alexcrichton
Manish Goregaokar [Tue, 2 Feb 2016 21:24:24 +0000 (02:54 +0530)]
Rollup merge of #31329 - quodlibetor:no-const-doc-in-stable, r=alexcrichton

Fixes #31098

AFAICT this is the only place where rustdoc explicitly checks if we are on stable before emitting content, so I can't tell if this is the sane way to handle this, or if anything else should be done to make sure that nobody forgets to remove this check when `const` is stabilized.

8 years agoRollup merge of #31220 - steveklabnik:gh30632, r=nikomatsakis
Manish Goregaokar [Tue, 2 Feb 2016 21:24:24 +0000 (02:54 +0530)]
Rollup merge of #31220 - steveklabnik:gh30632, r=nikomatsakis

Fixes #30632

I'm not sure if this explanation is good enough. If it is, I will add it to filter as well.

8 years agoRollup merge of #27499 - barosl:macro-doc-raw-str-hashes, r=nikomatsakis
Manish Goregaokar [Tue, 2 Feb 2016 21:24:24 +0000 (02:54 +0530)]
Rollup merge of #27499 - barosl:macro-doc-raw-str-hashes, r=nikomatsakis

Any documentation comments that contain raw-string-looking sequences may pretty-print invalid code when expanding them, as the current logic always uses the `r"literal"` form, without appending any `#`s.

This commit calculates the minimum number of `#`s required to wrap a comment correctly and appends `#`s appropriately.

Fixes #27489.

8 years agoAdded assertion ensuring zero-sized type.
Sean Leffler [Tue, 2 Feb 2016 19:41:19 +0000 (11:41 -0800)]
Added assertion ensuring zero-sized type.

8 years agoAuto merge of #31312 - alexcrichton:no-le-in-powerpc64le, r=alexcrichton
bors [Tue, 2 Feb 2016 17:11:48 +0000 (17:11 +0000)]
Auto merge of #31312 - alexcrichton:no-le-in-powerpc64le, r=alexcrichton

Currently the `mipsel-unknown-linux-gnu` target doesn't actually set the
`target_arch` value to `mipsel` but it rather uses `mips`. Alternatively the
`powerpc64le` target does indeed set the `target_arch` as `powerpc64le`,
causing a bit of inconsistency between theset two.

As these are just the same instance of one instruction set, let's use
`target_endian` to switch between them and only set the `target_arch` as one
value. This should cut down on the number of `#[cfg]` annotations necessary and
all around be a little more ergonomic.

8 years agoAdd note about temporaries
Steve Klabnik [Tue, 2 Feb 2016 16:15:45 +0000 (11:15 -0500)]
Add note about temporaries

8 years agoFix reference to `expect`
Paul Smith [Tue, 2 Feb 2016 14:47:23 +0000 (08:47 -0600)]
Fix reference to `expect`

The context of the link is `Result` but it points to the docs on `Option`'s `expect`.

8 years agoAuto merge of #31254 - tmiasko:macro-pretty-print-fix, r=sfackler
bors [Tue, 2 Feb 2016 14:00:50 +0000 (14:00 +0000)]
Auto merge of #31254 - tmiasko:macro-pretty-print-fix, r=sfackler

Pretty printing of macro with braces but without terminated semicolon
removed more boxes from stack than it put there, resulting in panic.
This fixes the issue #30731.

8 years agoAuto merge of #30991 - rthomas:master, r=Gankro
bors [Tue, 2 Feb 2016 10:45:06 +0000 (10:45 +0000)]
Auto merge of #30991 - rthomas:master, r=Gankro

Using the test @bluss suggested in #30983

8 years agoAuto merge of #31359 - steveklabnik:rollup, r=steveklabnik
bors [Tue, 2 Feb 2016 07:28:04 +0000 (07:28 +0000)]
Auto merge of #31359 - steveklabnik:rollup, r=steveklabnik

- Successful merges: #30971, #31202, #31247, #31270, #31281, #31327, #31339, #31340, #31342, #31344, #31345, #31346, #31348
- Failed merges:

8 years agoRevert "mk: fix some undefined variable warnings"
Alex Crichton [Tue, 2 Feb 2016 07:27:04 +0000 (23:27 -0800)]
Revert "mk: fix some undefined variable warnings"

This reverts commit d03712977d7c913044f2b863269c4491d7fa7c36.

8 years agoEnsure capacity returned of HashMap is max(capacity, length).
Ryan Thomas [Tue, 2 Feb 2016 06:15:27 +0000 (17:15 +1100)]
Ensure capacity returned of HashMap is max(capacity, length).

r? @Gankro

8 years agoEnable more fs tests on Windows
Paul Dicker [Tue, 2 Feb 2016 06:04:55 +0000 (07:04 +0100)]
Enable more fs tests on Windows

8 years agoRollup merge of #31348 - alexcrichton:shuffle-tiers, r=steveklabnik
Steve Klabnik [Tue, 2 Feb 2016 05:32:20 +0000 (00:32 -0500)]
Rollup merge of #31348 - alexcrichton:shuffle-tiers, r=steveklabnik

Some other shufflings as well:

* Three powerpc triples for Linux have been added recently
* An armv7 linux triple was added recently
* The 64-bit Solaris triple is now mentioned in tier 3

We are currently now also building nightlies for iOS, powerpc triples, and
armv7, but there hasn't been much vetting of the triples themselves so I've left
them in tier 3 for now.

8 years agoRollup merge of #31346 - alopatindev:fixes, r=aturon
Steve Klabnik [Tue, 2 Feb 2016 05:32:19 +0000 (00:32 -0500)]
Rollup merge of #31346 - alopatindev:fixes, r=aturon

Space character is missed after `let some_usize`

8 years agoRollup merge of #31345 - kamalmarhubi:book-docs-special-section-errors, r=steveklabnik
Steve Klabnik [Tue, 2 Feb 2016 05:32:19 +0000 (00:32 -0500)]
Rollup merge of #31345 - kamalmarhubi:book-docs-special-section-errors, r=steveklabnik

This matches the usage in the standard library's documentation.

8 years agoRollup merge of #31344 - steveklabnik:gh31334, r=alexcrichton
Steve Klabnik [Tue, 2 Feb 2016 05:32:19 +0000 (00:32 -0500)]
Rollup merge of #31344 - steveklabnik:gh31334, r=alexcrichton

Fixes #31334

This is just a quicker fix for this issue; since I'm working on the next draft of the book, I don't want to put a huuuge amount of work into improving it here.

8 years agoRollup merge of #31342 - reeze:patch-1, r=steveklabnik
Steve Klabnik [Tue, 2 Feb 2016 05:32:19 +0000 (00:32 -0500)]
Rollup merge of #31342 - reeze:patch-1, r=steveklabnik

8 years agoRollup merge of #31340 - pra85:patch-1, r=alexcrichton
Steve Klabnik [Tue, 2 Feb 2016 05:32:19 +0000 (00:32 -0500)]
Rollup merge of #31340 - pra85:patch-1, r=alexcrichton

Spelling mistake -
`familliar` > `familiar`

8 years agoRollup merge of #31339 - rthomas:doc, r=alexcrichton
Steve Klabnik [Tue, 2 Feb 2016 05:32:18 +0000 (00:32 -0500)]
Rollup merge of #31339 - rthomas:doc, r=alexcrichton

When trying to run a specific test, I found the contributing docs a bit confusing and through a bit of googling found out that TESTNAME takes the fully qual'd name of the test.

I'm unsure if this can also take the source file, but I was unable to get that to work.

8 years agoRollup merge of #31327 - dirk:dirk/process-child-safety-docs, r=alexcrichton
Steve Klabnik [Tue, 2 Feb 2016 05:32:18 +0000 (00:32 -0500)]
Rollup merge of #31327 - dirk:dirk/process-child-safety-docs, r=alexcrichton

`Drop` is not implemented for `Child`, so if it goes out of scope in Rust-land and gets deallocated the child process will continue to exist and execute. If users want a guarantee that the process has finished running and exited they must manually use `kill`, `wait`, or `wait_with_output`.

Fixes #31289.

r? @steveklabnik

8 years agoRollup merge of #31281 - oli-obk:patch-2, r=nikomatsakis
Steve Klabnik [Tue, 2 Feb 2016 05:32:18 +0000 (00:32 -0500)]
Rollup merge of #31281 - oli-obk:patch-2, r=nikomatsakis

8 years agoRollup merge of #31270 - ruud-v-a:improve-e0507, r=steveklabnik
Steve Klabnik [Tue, 2 Feb 2016 05:32:18 +0000 (00:32 -0500)]
Rollup merge of #31270 - ruud-v-a:improve-e0507, r=steveklabnik

E0507 can occur when you try to move out of a member of a mutably borrowed struct, in which case `mem::replace` can help. Mentioning that here hopefully saves future users a trip to Google.

8 years agoRollup merge of #31247 - tshepang:redundant-bindings, r=steveklabnik
Steve Klabnik [Tue, 2 Feb 2016 05:32:18 +0000 (00:32 -0500)]
Rollup merge of #31247 - tshepang:redundant-bindings, r=steveklabnik

8 years agoRollup merge of #31202 - steveklabnik:gh30459, r=alexcrichton
Steve Klabnik [Tue, 2 Feb 2016 05:32:17 +0000 (00:32 -0500)]
Rollup merge of #31202 - steveklabnik:gh30459, r=alexcrichton

Fixes #30459

Fun fact: i wanted to write "Arabic" and "Hebrew" in Arabic and Hebrew, but vim kept doing the copy/paste in the wrong direction.

8 years agoRollup merge of #30971 - SDX2000:docfixes, r=steveklabnik
Steve Klabnik [Tue, 2 Feb 2016 05:32:17 +0000 (00:32 -0500)]
Rollup merge of #30971 - SDX2000:docfixes, r=steveklabnik

Updated documentation to clarify the difference between `and_then` and `map`. This also explains why we need `and_then` in addition to `map`. Please look at the diff for more information.

r?  @alexcrichton

8 years agoAdd doctests for directionality
Steve Klabnik [Mon, 1 Feb 2016 16:26:23 +0000 (11:26 -0500)]
Add doctests for directionality

Thanks @nodakai

8 years agoRemove "powerpc64le" and "mipsel" target_arch
Alex Crichton [Sat, 30 Jan 2016 21:27:00 +0000 (13:27 -0800)]
Remove "powerpc64le" and "mipsel" target_arch

Currently the `mipsel-unknown-linux-gnu` target doesn't actually set the
`target_arch` value to `mipsel` but it rather uses `mips`. Alternatively the
`powerpc64le` target does indeed set the `target_arch` as `powerpc64le`,
causing a bit of inconsistency between theset two.

As these are just the same instance of one instruction set, let's use
`target_endian` to switch between them and only set the `target_arch` as one
value. This should cut down on the number of `#[cfg]` annotations necessary and
all around be a little more ergonomic.

8 years agoAuto merge of #31314 - alexcrichton:less-warnings, r=brson
bors [Tue, 2 Feb 2016 04:33:02 +0000 (04:33 +0000)]
Auto merge of #31314 - alexcrichton:less-warnings, r=brson

Help cleans up our build a bit and stays in line with the rest of our crates
denying warnings traditionally.

8 years agodocs: Standardize on 'Errors' header in std docs
Kamal Marhubi [Tue, 2 Feb 2016 02:41:29 +0000 (21:41 -0500)]
docs: Standardize on 'Errors' header in std docs

8 years agoAuto merge of #31279 - DanielJCampbell:MacroReferencing, r=nrc
bors [Tue, 2 Feb 2016 01:35:39 +0000 (01:35 +0000)]
Auto merge of #31279 - DanielJCampbell:MacroReferencing, r=nrc

r? @nrc

8 years agoUpdate TESTNAME description
Ryan Thomas [Mon, 1 Feb 2016 23:58:59 +0000 (10:58 +1100)]
Update TESTNAME description

8 years agoUpdate TESTNAME matching description
Ryan Thomas [Mon, 1 Feb 2016 23:57:24 +0000 (10:57 +1100)]
Update TESTNAME matching description

8 years agoMerge branch 'master' of https://github.com/rust-lang/rust into doc
Ryan Thomas [Mon, 1 Feb 2016 23:54:05 +0000 (10:54 +1100)]
Merge branch 'master' of https://github.com/rust-lang/rust into doc