]> git.lizzy.rs Git - rust.git/log
rust.git
7 years agoRollup merge of #36882 - jseyfried:fix_36881, r=eddyb
Manish Goregaokar [Sat, 1 Oct 2016 11:08:33 +0000 (16:38 +0530)]
Rollup merge of #36882 - jseyfried:fix_36881, r=eddyb

resolve: fix incorrect code in `module_to_string`

Fixes #36881.
r? @nrc or @eddyb

7 years agoRollup merge of #36880 - durka:debug-unsized-ptr, r=bluss
Manish Goregaokar [Sat, 1 Oct 2016 11:08:33 +0000 (16:38 +0530)]
Rollup merge of #36880 - durka:debug-unsized-ptr, r=bluss

impl Debug for raw pointers to unsized data

`?Sized` was missing from these impls for seemingly no reason.

Fixes #36870.

7 years agoRollup merge of #36877 - solson:rustc-version-build-issue, r=eddyb
Manish Goregaokar [Sat, 1 Oct 2016 11:08:32 +0000 (16:38 +0530)]
Rollup merge of #36877 - solson:rustc-version-build-issue, r=eddyb

Fix RUSTC_VERSION for 'documenting' build stage.

Previously the `env!("RUSTC_VERSION")` requirement would break the "Documenting rustc_metadata" stage of the rustc build, since that environment variable is only defined during the main build.

r? @eddyb

7 years agoRollup merge of #36873 - GuillaumeGomez:e0035_e0036, r=jonathandturner
Manish Goregaokar [Sat, 1 Oct 2016 11:08:32 +0000 (16:38 +0530)]
Rollup merge of #36873 - GuillaumeGomez:e0035_e0036, r=jonathandturner

Update E0035, E0036 and E0370 to new error format

Fixes #35634.
Fixes #35206.
Fixes #35207.

r? @jonathandturner

7 years agoRollup merge of #36872 - frewsxcv:rustdoc, r=GuillaumeGomez
Manish Goregaokar [Sat, 1 Oct 2016 11:08:32 +0000 (16:38 +0530)]
Rollup merge of #36872 - frewsxcv:rustdoc, r=GuillaumeGomez

A couple refactorings in librustdoc.

None

7 years agoRollup merge of #36865 - kallisti5:master, r=brson
Manish Goregaokar [Sat, 1 Oct 2016 11:08:32 +0000 (16:38 +0530)]
Rollup merge of #36865 - kallisti5:master, r=brson

Haiku: Fix target triplet delimiter

7 years agoFix `module_to_string`.
Jeffrey Seyfried [Sat, 1 Oct 2016 07:38:47 +0000 (07:38 +0000)]
Fix `module_to_string`.

7 years agoAuto merge of #36339 - brson:emscripten-new, r=alexcrichton
bors [Sat, 1 Oct 2016 02:00:36 +0000 (19:00 -0700)]
Auto merge of #36339 - brson:emscripten-new, r=alexcrichton

Working asmjs and wasm targets

This patch set results in a working standard library for the asmjs-unknown-emscripten and wasm32-unknown-emscripten targets. It is based on the work of @badboy and @rschulman.

It does a few things:

- Updates LLVM with the emscripten [fastcomp](https://github.com/rust-lang/llvm/pull/50) patches, which include the pnacl IR legalizer and the asm.js backend. This patch is thought not to have any significant effect on existing targets.
- Teaches rustbuild to correctly link C code with emscripten
- Updates gcc-rs to work correctly with emscripten
- Teaches rustbuild to run crate tests for emscripten with node
- Modifies Thread::new to return an error on emscripten, to facilitate debugging a common failure mode
- Modifies libtest to run in single-threaded mode for emscripten
- Ignores a host of tests that don't work yet, mostly dealing with threads and I/O
- Updates libc with wasm32 definitions (presently the same as asmjs)
- Adds a wasm32-unknown-emscripten target that feeds the output of LLVM's asmjs backend through emcc to generate wasm

Notes and caveats:

- This is only known to work with `--enable-rustbuild`.
- The wasm32 target can't be tested correctly yet because of issues in compiletest and limitations in node https://github.com/kripken/emscripten/issues/4542, but hello.rs does seem to work when run on node via the binaryen interpreter
- This requires an up to date installation of the emscripten sdk from its incoming branch
- Unwinding is very broken
- When enabling the emscripten targets jemalloc is disabled for all targets, which results in test failures for the host

Next steps are to fix the jemalloc issue, start building the two emscripten targets on the auto builders, then start producing nightlies.

https://github.com/rust-lang/rust/issues/36317 tracks work on this.

Fixes https://github.com/rust-lang/rust/issues/36515
Fixes https://github.com/rust-lang/rust/issues/36515
Fixes https://github.com/rust-lang/rust/issues/36356

7 years agoimpl Debug for raw pointers to unsized data
Alex Burka [Sat, 1 Oct 2016 01:50:56 +0000 (01:50 +0000)]
impl Debug for raw pointers to unsized data

7 years agoAuto merge of #36866 - alexcrichton:fix-hash-again, r=eddyb
bors [Fri, 30 Sep 2016 22:43:52 +0000 (15:43 -0700)]
Auto merge of #36866 - alexcrichton:fix-hash-again, r=eddyb

rustc: More fixes for arch-independent hashing

In another attempt to fix #36793 this commit attempts to head off any future
problems by adding a custom `WidentUsizeHasher` which will widen any hashing of
`isize` and `usize` to a `u64` as necessary. This obviates the need for a
previous number of `as u64` annotations and will hopefully protect us against
future problems here.

Closes #36793 (hopefully)

7 years agoFix RUSTC_VERSION for 'documenting' build stage.
Scott Olson [Fri, 30 Sep 2016 22:24:50 +0000 (16:24 -0600)]
Fix RUSTC_VERSION for 'documenting' build stage.

Previously the `env!("RUSTC_VERSION")` requirement would break the
"Documenting rustc_metadata" stage of the rustc build, since that
environment variable is only defined during the main build.

7 years agoUpdate E0370 to new error format
Guillaume Gomez [Fri, 30 Sep 2016 20:52:47 +0000 (22:52 +0200)]
Update E0370 to new error format

7 years agoUpdate E0036 to new error format
Guillaume Gomez [Fri, 30 Sep 2016 19:44:55 +0000 (21:44 +0200)]
Update E0036 to new error format

7 years agorustc: More fixes for arch-independent hashing
Alex Crichton [Fri, 30 Sep 2016 18:06:51 +0000 (11:06 -0700)]
rustc: More fixes for arch-independent hashing

In another attempt to fix #36793 this commit attempts to head off any future
problems by adding a custom `WidentUsizeHasher` which will widen any hashing of
`isize` and `usize` to a `u64` as necessary. This obviates the need for a
previous number of `as u64` annotations and will hopefully protect us against
future problems here.

Closes #36793 (hopefully)

7 years agoDon't build any native compiler-builtin components for emscripten
Brian Anderson [Wed, 28 Sep 2016 16:08:59 +0000 (16:08 +0000)]
Don't build any native compiler-builtin components for emscripten

7 years agoBuild a dummy alloc_jemalloc crate on platforms that don't support it
Brian Anderson [Tue, 27 Sep 2016 21:27:22 +0000 (21:27 +0000)]
Build a dummy alloc_jemalloc crate on platforms that don't support it

This is a hack to support building targets that don't support jemalloc
alongside hosts that do. The jemalloc build is controlled by a feature
of the std crate, and if that feature changes between targets, it
invalidates the fingerprint of std's build script (this is a cargo
bug); so we must ensure that the feature set used by std is the same
across all targets, which means we have to build the alloc_jemalloc
crate for targets like emscripten, even if we don't use it.

7 years agoDocument emscripten's unwind impl and remove unused function
Brian Anderson [Tue, 27 Sep 2016 21:25:52 +0000 (21:25 +0000)]
Document emscripten's unwind impl and remove unused function

7 years agoCleanup bootstrap
Brian Anderson [Tue, 27 Sep 2016 19:56:50 +0000 (19:56 +0000)]
Cleanup bootstrap

7 years agoUnignore some working emscripten tests
Brian Anderson [Tue, 27 Sep 2016 21:07:17 +0000 (21:07 +0000)]
Unignore some working emscripten tests

7 years agoCall emcc with ERROR_ON_UNDEFINED_SYMBOLS
Brian Anderson [Sun, 25 Sep 2016 20:47:00 +0000 (20:47 +0000)]
Call emcc with ERROR_ON_UNDEFINED_SYMBOLS

7 years agorustbuild: Only build 'dist' when building the host
Brian Anderson [Fri, 23 Sep 2016 01:25:51 +0000 (01:25 +0000)]
rustbuild: Only build 'dist' when building the host

Doing this step for the target results in the build system
trying to build rustc for asmjs, which doesn't work.

7 years agoIgnore various entire test modules on emscripten
Brian Anderson [Thu, 22 Sep 2016 20:04:48 +0000 (20:04 +0000)]
Ignore various entire test modules on emscripten

7 years agoRewrite emscripten unwinding to use libcxx
Brian Anderson [Thu, 22 Sep 2016 19:55:42 +0000 (19:55 +0000)]
Rewrite emscripten unwinding to use libcxx

7 years agoIgnore another emscripten test because missing intrinsics
Brian Anderson [Fri, 16 Sep 2016 18:07:17 +0000 (18:07 +0000)]
Ignore another emscripten test because missing intrinsics

7 years agoUpdate bootstrap and compiletest to use the detected nodejs
Brian Anderson [Thu, 15 Sep 2016 19:42:26 +0000 (19:42 +0000)]
Update bootstrap and compiletest to use the detected nodejs

7 years agoChange the sigs of set_print/set_panic to allow restoring the default objects
Brian Anderson [Wed, 14 Sep 2016 17:15:48 +0000 (17:15 +0000)]
Change the sigs of set_print/set_panic to allow restoring the default objects

7 years agoIgnore entire test modules on emscripten instead of individual tests
Brian Anderson [Wed, 14 Sep 2016 17:10:43 +0000 (17:10 +0000)]
Ignore entire test modules on emscripten instead of individual tests

7 years agoTidy
Brian Anderson [Thu, 8 Sep 2016 01:58:00 +0000 (01:58 +0000)]
Tidy

7 years agoUpdate LLVM with fastcomp patches
Brian Anderson [Wed, 7 Sep 2016 15:13:24 +0000 (15:13 +0000)]
Update LLVM with fastcomp patches

7 years agoIgnore all debuginfo tests on emscripten
Brian Anderson [Wed, 7 Sep 2016 15:10:57 +0000 (15:10 +0000)]
Ignore all debuginfo tests on emscripten

7 years agoIgnore lots and lots of std tests on emscripten
Brian Anderson [Wed, 7 Sep 2016 05:34:15 +0000 (05:34 +0000)]
Ignore lots and lots of std tests on emscripten

7 years agoImprove bootstrap crate testing for emscripten
Brian Anderson [Tue, 6 Sep 2016 20:36:14 +0000 (20:36 +0000)]
Improve bootstrap crate testing for emscripten

7 years agoUpdate libtest for single-threaded emscripten support
Brian Anderson [Tue, 6 Sep 2016 20:16:56 +0000 (20:16 +0000)]
Update libtest for single-threaded emscripten support

7 years agoPreliminary wasm32 support
Brian Anderson [Tue, 6 Sep 2016 00:41:50 +0000 (00:41 +0000)]
Preliminary wasm32 support

7 years agoAdding ignore-emscripten to failing tests.
Ross Schulman [Tue, 6 Sep 2016 00:00:09 +0000 (20:00 -0400)]
Adding ignore-emscripten to failing tests.

7 years agoAdapting bootstrap to run tests on asmjs.
Ross Schulman [Mon, 5 Sep 2016 23:56:48 +0000 (19:56 -0400)]
Adapting bootstrap to run tests on asmjs.

7 years agoUpdate gcc-rs for emscripten
Brian Anderson [Wed, 31 Aug 2016 20:47:11 +0000 (20:47 +0000)]
Update gcc-rs for emscripten

7 years agoSupport emscripten in rustbuild
Brian Anderson [Tue, 30 Aug 2016 22:56:26 +0000 (22:56 +0000)]
Support emscripten in rustbuild

7 years agoPatch panic_unwind to compile, but this is surely broken
Jan-Erik Rediger [Sat, 6 Aug 2016 22:14:33 +0000 (00:14 +0200)]
Patch panic_unwind to compile, but this is surely broken

7 years agoMake the jsbackend an optional component
Jan-Erik Rediger [Sat, 6 Aug 2016 19:13:14 +0000 (21:13 +0200)]
Make the jsbackend an optional component

7 years agoConfigure LLVM to use js backend
Jan-Erik Rediger [Sat, 6 Aug 2016 10:52:17 +0000 (12:52 +0200)]
Configure LLVM to use js backend

Initialize the asmjs backend for LLVM

7 years agoSimplify logic around Context's root_path.
Corey Farwell [Thu, 29 Sep 2016 04:40:32 +0000 (00:40 -0400)]
Simplify logic around Context's root_path.

Was previously cached and maintained in the `Context`, which to me seems
overkill.

7 years agoMigrate Item ➡ ItemType function to method.
Corey Farwell [Thu, 29 Sep 2016 02:53:35 +0000 (22:53 -0400)]
Migrate Item ➡ ItemType function to method.

7 years agoUpdate E0035 to new error format
Guillaume Gomez [Fri, 30 Sep 2016 19:30:05 +0000 (21:30 +0200)]
Update E0035 to new error format

7 years agoHaiku: Fix target triplet delimiter
Alex von Gluck IV [Fri, 30 Sep 2016 18:17:22 +0000 (13:17 -0500)]
Haiku: Fix target triplet delimiter

7 years agoAuto merge of #36864 - steveklabnik:rollup, r=steveklabnik
bors [Fri, 30 Sep 2016 18:08:58 +0000 (11:08 -0700)]
Auto merge of #36864 - steveklabnik:rollup, r=steveklabnik

Rollup of 13 pull requests

- Successful merges: #36529, #36535, #36576, #36623, #36711, #36750, #36810, #36829, #36833, #36841, #36842, #36851, #36860
- Failed merges:

7 years agoRollup merge of #36860 - wesleywiser:patch-2, r=Manishearth
Steve Klabnik [Fri, 30 Sep 2016 17:44:48 +0000 (13:44 -0400)]
Rollup merge of #36860 - wesleywiser:patch-2, r=Manishearth

Add `Send` and `Sync` traits to the reference

Fixes #36859

7 years agoRollup merge of #36851 - tmiasko:fix-read-until-docs, r=bluss
Steve Klabnik [Fri, 30 Sep 2016 17:44:48 +0000 (13:44 -0400)]
Rollup merge of #36851 - tmiasko:fix-read-until-docs, r=bluss

Fix BufRead::read_until documentation.

Second paragraph already fully explains what happens when EOF is
encountered. The third paragraph (removed one) is spurious and
misleading.

7 years agoRollup merge of #36842 - cjm00:release-notes-fix, r=brson
Steve Klabnik [Fri, 30 Sep 2016 17:44:48 +0000 (13:44 -0400)]
Rollup merge of #36842 - cjm00:release-notes-fix, r=brson

Fixed wrong link in release notes

The link for the pull request updating hash_map to implement Debug was a copy of the previous link, this changes the link to the correct PR.

7 years agoRollup merge of #36841 - GuillaumeGomez:process_doc, r=steveklabnik
Steve Klabnik [Fri, 30 Sep 2016 17:44:47 +0000 (13:44 -0400)]
Rollup merge of #36841 - GuillaumeGomez:process_doc, r=steveklabnik

Improve process module doc a bit

r? @steveklabnik

7 years agoRollup merge of #36833 - tmiasko:system-time-error, r=steveklabnik
Steve Klabnik [Fri, 30 Sep 2016 17:44:47 +0000 (13:44 -0400)]
Rollup merge of #36833 - tmiasko:system-time-error, r=steveklabnik

Reword description of SystemTimeError.

Repalce timestamp with a system time, to be more consistent with
remaining documentation.

r? @steveklabnik

7 years agoRollup merge of #36829 - apasel422:releases-typo, r=alexcrichton
Steve Klabnik [Fri, 30 Sep 2016 17:44:47 +0000 (13:44 -0400)]
Rollup merge of #36829 - apasel422:releases-typo, r=alexcrichton

Fix typo in RELEASES.md

7 years agoRollup merge of #36810 - GuillaumeGomez:ops_doc, r=steveklabnik
Steve Klabnik [Fri, 30 Sep 2016 17:44:47 +0000 (13:44 -0400)]
Rollup merge of #36810 - GuillaumeGomez:ops_doc, r=steveklabnik

Add missing urls for ops module

Part of #29365.

r? @steveklabnik

7 years agoRollup merge of #36750 - GuillaumeGomez:cmp_doc, r=steveklabnik
Steve Klabnik [Fri, 30 Sep 2016 17:44:47 +0000 (13:44 -0400)]
Rollup merge of #36750 - GuillaumeGomez:cmp_doc, r=steveklabnik

Add missing links on cmp module

r? @steveklabnik

7 years agoRollup merge of #36711 - pcn:patch-1, r=steveklabnik
Steve Klabnik [Fri, 30 Sep 2016 17:44:46 +0000 (13:44 -0400)]
Rollup merge of #36711 - pcn:patch-1, r=steveklabnik

Suggesting a change to a comment that puzzled me

While reading this, the comment made it difficult for me to simply absorb the concept.  It interrupted my reading flow, and I think this expresses the same meaning, but reads a bit better.  It's trivial, but makes it easier for me to move on to the next line.

7 years agoRollup merge of #36623 - GuillaumeGomez:doc_typos, r=steveklabnik
Steve Klabnik [Fri, 30 Sep 2016 17:44:46 +0000 (13:44 -0400)]
Rollup merge of #36623 - GuillaumeGomez:doc_typos, r=steveklabnik

Fix some typos and improve doc comments style

r? @steveklabnik

7 years agoRollup merge of #36576 - GuillaumeGomez:box_urls, r=steveklabnik
Steve Klabnik [Fri, 30 Sep 2016 17:44:46 +0000 (13:44 -0400)]
Rollup merge of #36576 - GuillaumeGomez:box_urls, r=steveklabnik

Add missing urls for Box doc

r? @steveklabnik

7 years agoRollup merge of #36535 - GuillaumeGomez:macro_url, r=steveklabnik
Steve Klabnik [Fri, 30 Sep 2016 17:44:46 +0000 (13:44 -0400)]
Rollup merge of #36535 - GuillaumeGomez:macro_url, r=steveklabnik

Update to new macro url syntax

r? @steveklabnik

7 years agoRollup merge of #36529 - bluss:index-doc, r=GuillaumeGomez
Steve Klabnik [Fri, 30 Sep 2016 17:44:45 +0000 (13:44 -0400)]
Rollup merge of #36529 - bluss:index-doc, r=GuillaumeGomez

Clarify Index/IndexMut trait docs

Use examples and placeholder variable names with more meaning, to not
make it so abstract.

7 years agoAuto merge of #36823 - durka:discriminant_value, r=nagisa
bors [Fri, 30 Sep 2016 14:35:04 +0000 (07:35 -0700)]
Auto merge of #36823 - durka:discriminant_value, r=nagisa

add wrapper for discriminant_value, take 2

[This is #34785 reopened, since @bors apparently gave up on that thread.]

add wrapper for discriminant_value intrinsic

Implementation of [RFC 1696](https://github.com/rust-lang/rfcs/blob/master/text/1696-discriminant.md).

Wraps the `discriminant_value` intrinsic under the name `std::mem::discriminant`. In order to avoid prematurely leaking information about the implementation of enums, the return value is an opaque type, generic over the enum type, which implements Copy, Clone, PartialEq, Eq, Hash, and Debug (notably not PartialOrd). There is currently no way to get the value out excepting printing the debug representation.

The wrapper is safe and can be stabilized soon as per discussion in #24263.

cc @aturon
r? @nagisa

7 years agoAdd `Send` and `Sync` traits to the reference
Wesley Wiser [Fri, 30 Sep 2016 13:56:58 +0000 (09:56 -0400)]
Add `Send` and `Sync` traits to the reference

Fixes #36859

7 years agoAuto merge of #36822 - Aatch:resolve-callee-expr, r=luqmana
bors [Fri, 30 Sep 2016 11:24:38 +0000 (04:24 -0700)]
Auto merge of #36822 - Aatch:resolve-callee-expr, r=luqmana

Resolve the callee type in check_call before autoderef

If the callee type is an associated type, then it needs to be normalized
before trying to deref it. This matches the behaviour of
`check_method_call` for autoderef behaviour in calls.

Fixes #36786

7 years agoFix BufRead::{read_until, read_line} documentation.
Tomasz Miąsko [Thu, 29 Sep 2016 22:00:00 +0000 (00:00 +0200)]
Fix BufRead::{read_until, read_line} documentation.

7 years agoAuto merge of #36819 - jseyfried:fix_ast_const_integer_ice, r=nrc
bors [Fri, 30 Sep 2016 08:15:50 +0000 (01:15 -0700)]
Auto merge of #36819 - jseyfried:fix_ast_const_integer_ice, r=nrc

Fix ICE on some macros in const integer positions (e.g. `[u8; m!()]`)

Fixes #36816.
r? @nrc

7 years agoAuto merge of #36557 - sfackler:fix-hashdos-docs, r=alexcrichton
bors [Fri, 30 Sep 2016 03:25:45 +0000 (20:25 -0700)]
Auto merge of #36557 - sfackler:fix-hashdos-docs, r=alexcrichton

Clean up hasher discussion on HashMap

* We never want to make guarantees about protecting against attacks.
* "True randomness" is not the right terminology to be using in this
    context.
* There is significantly more nuance to the performance of SipHash than
    "somewhat slow".

r? @steveklabnik

Follow up to discussion on #35371

7 years agoAuto merge of #36430 - llogiq:cow_add, r=alexcrichton
bors [Thu, 29 Sep 2016 22:50:32 +0000 (15:50 -0700)]
Auto merge of #36430 - llogiq:cow_add, r=alexcrichton

impl Add<{str, Cow<str>}> for Cow<str>

cc #35837

7 years agoFixed wrong link in release notes
Chris McDonald [Thu, 29 Sep 2016 22:26:02 +0000 (16:26 -0600)]
Fixed wrong link in release notes

7 years agoImprove process module doc a bit
Guillaume Gomez [Thu, 29 Sep 2016 22:10:42 +0000 (00:10 +0200)]
Improve process module doc a bit

7 years agoMention FNV
Steven Fackler [Thu, 29 Sep 2016 19:12:58 +0000 (21:12 +0200)]
Mention FNV

7 years agoAuto merge of #36377 - tormol:encode_utf, r=alexcrichton
bors [Thu, 29 Sep 2016 18:20:02 +0000 (11:20 -0700)]
Auto merge of #36377 - tormol:encode_utf, r=alexcrichton

Change encode_utf{8,16}() to write to a buffer and panic if it's too small

cc #27784

Should the "A buffer that's too small" examples be removed and replaced by tests?

7 years agoReword description of SystemTimeError.
Tomasz Miąsko [Wed, 28 Sep 2016 22:00:00 +0000 (00:00 +0200)]
Reword description of SystemTimeError.

Repalce timestamp with a system time, to be more consistent with
remaining documentation.

7 years agoAuto merge of #36752 - jonas-schievink:vartmparg, r=eddyb
bors [Thu, 29 Sep 2016 14:53:33 +0000 (07:53 -0700)]
Auto merge of #36752 - jonas-schievink:vartmparg, r=eddyb

Move MIR towards a single kind of local

This PR modifies MIR to handle function arguments (`Arg`), user-defined variable bindings (`Var`), compiler-generated temporaries (`Tmp`), as well as the return value pointer equally. All of them are replaced with a single `Local` type, a few functions for iterating over different kinds of locals, and a way to get the kind of local we're dealing with (mainly used in the constant qualification/propagation passes).

~~I haven't managed to fix one remaining issue: A `StorageDead` not getting emitted for a variable (see the `TODO` in the test). If that's fixed, this is basically good to go.~~ Found the issue (an off-by-one error), fix incoming.

r? @eddyb for changes to constant qualification and propagation I'm not quite sure about

7 years agoFix typo in RELEASES.md
Andrew Paseltiner [Thu, 29 Sep 2016 14:43:08 +0000 (10:43 -0400)]
Fix typo in RELEASES.md

7 years agoAdd missing urls for ops module
Guillaume Gomez [Wed, 28 Sep 2016 20:02:19 +0000 (22:02 +0200)]
Add missing urls for ops module

7 years agoimpl {Add, AddAssign}<{str, Cow<str>}> for Cow<str>
Andre Bogus [Mon, 12 Sep 2016 21:35:20 +0000 (23:35 +0200)]
impl {Add, AddAssign}<{str, Cow<str>}> for Cow<str>

This does not actually add anything that wasn't there, but is merely an
optimization for the given cases, which would have incurred additional
heap allocation for adding empty strings, and improving the ergonomics
of `Cow` with strings.

7 years agoAuto merge of #36456 - alexcrichton:rustbuild-dont-use-c, r=jonathandturner
bors [Thu, 29 Sep 2016 10:48:02 +0000 (03:48 -0700)]
Auto merge of #36456 - alexcrichton:rustbuild-dont-use-c, r=jonathandturner

rustbuild: Use current_dir instead of -C

Apparently some versions of git don't support the `-C` flag, so let's use the
guaranteed-to-work `current_dir` function.

7 years agoAuto merge of #36818 - jonathandturner:rollup, r=jonathandturner
bors [Thu, 29 Sep 2016 04:55:15 +0000 (21:55 -0700)]
Auto merge of #36818 - jonathandturner:rollup, r=jonathandturner

Rollup of 12 pull requests

- Successful merges: #35286, #35892, #36460, #36704, #36741, #36760, #36787, #36789, #36794, #36803, #36811, #36813
- Failed merges:

7 years agoResolve the callee type in check_call before autoderef
James Miller [Thu, 29 Sep 2016 04:07:03 +0000 (17:07 +1300)]
Resolve the callee type in check_call before autoderef

If the callee type is an associated type, then it needs to be normalized
before trying to deref it. This matches the behaviour of
`check_method_call` for autoderef behaviour in calls.

Fixes #36786

7 years agoAdd regression test.
Jeffrey Seyfried [Thu, 29 Sep 2016 03:52:04 +0000 (03:52 +0000)]
Add regression test.

7 years agoRollup merge of #36813 - palango:link-to-fmt, r=steveklabnik
Jonathan Turner [Thu, 29 Sep 2016 03:21:53 +0000 (20:21 -0700)]
Rollup merge of #36813 - palango:link-to-fmt, r=steveklabnik

Add link to format! docs

7 years agoRollup merge of #36811 - brson:bootstrap, r=alexcrichton
Jonathan Turner [Thu, 29 Sep 2016 03:21:52 +0000 (20:21 -0700)]
Rollup merge of #36811 - brson:bootstrap, r=alexcrichton

Update bootstrap compiler

7 years agoRollup merge of #36803 - brson:node, r=alexcrichton
Jonathan Turner [Thu, 29 Sep 2016 03:21:52 +0000 (20:21 -0700)]
Rollup merge of #36803 - brson:node, r=alexcrichton

Move nodejs detection into bootstrap

This avoids issues with mingw path conversions.

r? @alexcrichton

7 years agoRollup merge of #36794 - japaric:target-panic, r=alexcrichton
Jonathan Turner [Thu, 29 Sep 2016 03:21:52 +0000 (20:21 -0700)]
Rollup merge of #36794 - japaric:target-panic, r=alexcrichton

add a panic-strategy field to the target specification

Now a target can define its panic strategy in its specification. If a
user doesn't specify a panic strategy via the command line, i.e. '-C
panic', then the compiler will use the panic strategy defined by the
target specification.

Custom targets can pick their panic strategy via the "panic-strategy"
field of their target specification JSON file. If omitted in the
specification, the strategy defaults to "unwind".

closes #36647

---

I checked that compiling an executable for a custom target with "panic-strategy" set to "abort" doesn't need the "eh_personality" lang item and also that standard crates compiled for that custom target didn't contained undefined symbols to _Unwind_Resume. But this needs an actual unit test, any suggestion on how to test this?

Most of the noise in the diff is due to moving `PanicStrategy` from the `rustc` to the `rustc_back` crate.

r? @alexcrichton
cc @phil-opp

7 years agoRollup merge of #36789 - jseyfried:non_inline_mod_in_block, r=nikomatsakis
Jonathan Turner [Thu, 29 Sep 2016 03:21:52 +0000 (20:21 -0700)]
Rollup merge of #36789 - jseyfried:non_inline_mod_in_block, r=nikomatsakis

Allow more non-inline modules in blocks

Currently, non-inline modules without a `#[path]` attribute are not allowed in blocks.
This PR allows non-inline modules that have an ancestor module with a `#[path]` attribute, provided there is not a nearer ancestor block.

For example,
```rust
fn main() {
    #[path = "..."] mod foo {
        mod bar; //< allowed by this PR
        fn f() {
            mod bar; //< still an error
        }
    }
}
```

Fixes #36772.
r? @nikomatsakis

7 years agoRollup merge of #36787 - jseyfried:fix_test_harness_reexport_errors, r=nrc
Jonathan Turner [Thu, 29 Sep 2016 03:21:51 +0000 (20:21 -0700)]
Rollup merge of #36787 - jseyfried:fix_test_harness_reexport_errors, r=nrc

Avoid re-export errors in the generated test harness

Fixes #36768.
r? @nrc

7 years agoRollup merge of #36760 - nrc:input2, r=alexcrichton
Jonathan Turner [Thu, 29 Sep 2016 03:21:51 +0000 (20:21 -0700)]
Rollup merge of #36760 - nrc:input2, r=alexcrichton

Allow supplying an error destination via the compiler driver

Allows replacing stderr with a buffer from the client.

Also, some refactoring around run_compiler.

7 years agoRollup merge of #36741 - matklad:no-flacky-test, r=alexcrichton
Jonathan Turner [Thu, 29 Sep 2016 03:21:51 +0000 (20:21 -0700)]
Rollup merge of #36741 - matklad:no-flacky-test, r=alexcrichton

Remove CString drop test.

The test relies on the undefined behavior, and so may fail in some
circumstances. This can be worked around by stubbing a memory allocator
in the test, but it is a bit of work, and LLVM could still theoretically
eliminate the write of the zero byte in release mode (which is
intended).

So let's just remove the test and mark the function as inline. It
shouldn't be optimized away when inlined into the debug build of user's
code.

Supersedes #36607

r? @alexcrichton

7 years agoRollup merge of #36704 - Mark-Simulacrum:cleanup-cabi, r=Aatch
Jonathan Turner [Thu, 29 Sep 2016 03:21:51 +0000 (20:21 -0700)]
Rollup merge of #36704 - Mark-Simulacrum:cleanup-cabi, r=Aatch

Move ty_align and ty_size out of most C ABI code

s390x's C ABI ty_align and ty_size are not moved because the
implementation of ty_align varies in an atypical pattern: it calls
ty_size for the llvm::Vector type kind. ty_size then cannot be moved
since it indirectly calls ty_align through align.

Fixes #5116 (probably, not sure).

7 years agoRollup merge of #36460 - mikhail-m1:35123-map3, r=nikomatsakis
Jonathan Turner [Thu, 29 Sep 2016 03:21:50 +0000 (20:21 -0700)]
Rollup merge of #36460 - mikhail-m1:35123-map3, r=nikomatsakis

map crate numbers between compilations

?r nikomatsakis
issue #35123

7 years agoRollup merge of #35892 - srinivasreddy:typeck/coherence, r=nikomatsakis
Jonathan Turner [Thu, 29 Sep 2016 03:21:50 +0000 (20:21 -0700)]
Rollup merge of #35892 - srinivasreddy:typeck/coherence, r=nikomatsakis

run rustfmt on typecheck/coherence folder

7 years agoRollup merge of #35286 - dns2utf8:doc_never_expression, r=nikomatsakis
Jonathan Turner [Thu, 29 Sep 2016 03:21:50 +0000 (20:21 -0700)]
Rollup merge of #35286 - dns2utf8:doc_never_expression, r=nikomatsakis

Add docs for "!" Never type (rfc 1216)

Pull Request: https://github.com/rust-lang/rfcs/pull/1216
Tracking Issue: #35121

7 years agoFix ICE on a macro in a constant integer position that expands into other macros.
Jeffrey Seyfried [Thu, 29 Sep 2016 02:23:19 +0000 (02:23 +0000)]
Fix ICE on a macro in a constant integer position that expands into other macros.

7 years agoAuto merge of #36395 - durka:rangeinclusive-no-esi, r=alexcrichton
bors [Thu, 29 Sep 2016 01:31:07 +0000 (18:31 -0700)]
Auto merge of #36395 - durka:rangeinclusive-no-esi, r=alexcrichton

remove ExactSizeIterator from RangeInclusive<{u,i}{32,size}>

Fixes #36386.

This is a [breaking-change] for nightly users of `#![feature(inclusive_range_syntax)]` and/or `#![feature(inclusive_range)]`.

7 years agorustbuild: Use current_dir instead of -C
Alex Crichton [Tue, 13 Sep 2016 19:30:17 +0000 (12:30 -0700)]
rustbuild: Use current_dir instead of -C

Apparently some versions of git don't support the `-C` flag, so let's use the
guaranteed-to-work `current_dir` function.

7 years agoRemove MIR dump comments from mir-opt tests
Jonas Schievink [Wed, 28 Sep 2016 23:22:11 +0000 (01:22 +0200)]
Remove MIR dump comments from mir-opt tests

They're ignored by the test runner, so let's not suggest that they
matter

7 years agoRemove stage0 hacks
Brian Anderson [Wed, 28 Sep 2016 20:55:26 +0000 (20:55 +0000)]
Remove stage0 hacks

7 years agoChange the `local` prefix to `_`
Jonas Schievink [Wed, 28 Sep 2016 23:11:54 +0000 (01:11 +0200)]
Change the `local` prefix to `_`

There's no need for a long prefix, since there's nothing to distinguish
anymore.

7 years agoAdd regression test.
Jeffrey Seyfried [Tue, 27 Sep 2016 21:31:30 +0000 (21:31 +0000)]
Add regression test.

7 years agoAllow non-inline modules in more places.
Jeffrey Seyfried [Tue, 27 Sep 2016 21:14:45 +0000 (21:14 +0000)]
Allow non-inline modules in more places.

7 years agoAuto merge of #36805 - jonathandturner:rollup, r=jonathandturner
bors [Wed, 28 Sep 2016 22:03:26 +0000 (15:03 -0700)]
Auto merge of #36805 - jonathandturner:rollup, r=jonathandturner

Rollup of 11 pull requests

- Successful merges: #36376, #36672, #36740, #36757, #36765, #36769, #36782, #36783, #36784, #36795, #36796
- Failed merges: