]> git.lizzy.rs Git - rust.git/log
rust.git
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 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 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 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 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 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 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:

7 years agoAdd link to format! docs
Paul Lange [Wed, 28 Sep 2016 21:59:56 +0000 (23:59 +0200)]
Add link to format! docs

7 years agoUpdate bootstrap compiler
Brian Anderson [Wed, 28 Sep 2016 20:20:25 +0000 (20:20 +0000)]
Update bootstrap compiler

7 years agoAuto merge of #36795 - TimNN:fix-36793, r=eddyb
bors [Wed, 28 Sep 2016 18:52:25 +0000 (11:52 -0700)]
Auto merge of #36795 - TimNN:fix-36793, r=eddyb

TypeIdHasher: hash usize as u64

Fixes #36793.

7 years agoRollup merge of #36796 - TimNN:mips64-data-layout, r=japaric
Jonathan Turner [Wed, 28 Sep 2016 17:33:58 +0000 (10:33 -0700)]
Rollup merge of #36796 - TimNN:mips64-data-layout, r=japaric

update mips64* data-layout

I tried to compile some (`#![no_core]`) code for the `mips64` targets on the latest nightly and got ICE's about mismatched data layouts. I updated the data layouts to match the listed llvm defaults.

cc @japaric

Funnily enough, this seems to be the exact reverse of what @japaric did in 2222d437a75dec627a21c0b68b32bee080fa1f5a as part of #36024.

7 years agoRollup merge of #36795 - TimNN:fix-36793, r=eddyb
Jonathan Turner [Wed, 28 Sep 2016 17:33:58 +0000 (10:33 -0700)]
Rollup merge of #36795 - TimNN:fix-36793, r=eddyb

TypeIdHasher: hash usize as u64

Fixes #36793.

7 years agoRollup merge of #36784 - jonathandturner:env_var, r=alexcrichton
Jonathan Turner [Wed, 28 Sep 2016 17:33:57 +0000 (10:33 -0700)]
Rollup merge of #36784 - jonathandturner:env_var, r=alexcrichton

Remove requirement to use 10.7 (fixes macOS)

Fixes https://github.com/rust-lang/rust/issues/36650 by removing the requirement to use 10.7.  @alexcrichton pointed out that the buildbots won't be affected, since they set the requirement with an environment variable.

This should now allow rustbuild to build Rust on macOS (nee OS X)

r? @alexcrichton

7 years agoRollup merge of #36783 - die4taoam:master, r=alexcrichton
Jonathan Turner [Wed, 28 Sep 2016 17:33:57 +0000 (10:33 -0700)]
Rollup merge of #36783 - die4taoam:master, r=alexcrichton

testcase about issue-18088

this testcase is associated with issue #18088 . you can find that here. https://github.com/rust-lang/rust/issues/18088.

7 years agoRollup merge of #36782 - alexcrichton:rustc-macro-expand-order, r=nrc
Jonathan Turner [Wed, 28 Sep 2016 17:33:57 +0000 (10:33 -0700)]
Rollup merge of #36782 - alexcrichton:rustc-macro-expand-order, r=nrc

rustc: Tweak expansion order of custom derive

This commit alters the expansion order of custom macros-1.1 style `#[derive]`
modes. Instead of left-to-right the expansion now happens in three categories,
each of which is internally left-to-right:

* Old-style custom derive (`#[derive_Foo]`) is expanded
* New-style custom derive (macros 1.1) is expanded
* Built in derive modes are expanded

This gives built in derive modes maximal knowledge about the struct that's being
expanded and also avoids pesky issues like exposing `#[structural_match]` or
`#[rustc_copy_clone_marker]`.

cc #35900

7 years agoRollup merge of #36769 - nathanmusoke:master, r=apasel422
Jonathan Turner [Wed, 28 Sep 2016 17:33:57 +0000 (10:33 -0700)]
Rollup merge of #36769 - nathanmusoke:master, r=apasel422

doc: Fix minor typo in book/variable-bindings.md

r? @steveklabnik

7 years agoRollup merge of #36765 - frewsxcv:ptr-write-bytes, r=steveklabnik
Jonathan Turner [Wed, 28 Sep 2016 17:33:56 +0000 (10:33 -0700)]
Rollup merge of #36765 - frewsxcv:ptr-write-bytes, r=steveklabnik

Add basic doc example for `core::ptr::write_bytes`.

None

7 years agoRollup merge of #36757 - KiChjang:E0025-format, r=jonathandturner
Jonathan Turner [Wed, 28 Sep 2016 17:33:56 +0000 (10:33 -0700)]
Rollup merge of #36757 - KiChjang:E0025-format, r=jonathandturner

Update E0025 to new error format

Part of #35233.
Fixes #35198.

r? @jonathandturner

7 years agoRollup merge of #36740 - frehberg:apidoc, r=steveklabnik
Jonathan Turner [Wed, 28 Sep 2016 17:33:56 +0000 (10:33 -0700)]
Rollup merge of #36740 - frehberg:apidoc, r=steveklabnik

Document init of HashSet/HashMap from vector

7 years agoRollup merge of #36672 - LinkiTools:master, r=steveklabnik
Jonathan Turner [Wed, 28 Sep 2016 17:33:56 +0000 (10:33 -0700)]
Rollup merge of #36672 - LinkiTools:master, r=steveklabnik

Improve documention troubleshooting missing linker. Fix #32208.

@steveklabnik is this in the direction on how you want to see #32208 fixed?

7 years agoRollup merge of #36376 - GuillaumeGomez:e0050, r=jonathandturner
Jonathan Turner [Wed, 28 Sep 2016 17:33:56 +0000 (10:33 -0700)]
Rollup merge of #36376 - GuillaumeGomez:e0050, r=jonathandturner

Update E0050 to new error format

Part of #35233.
Fixes #35211.

r? @jonathandturner

7 years agoMove nodejs detection into bootstrap
Brian Anderson [Wed, 28 Sep 2016 14:56:37 +0000 (07:56 -0700)]
Move nodejs detection into bootstrap

This avoids issues with mingw path conversions.

7 years agofix librustc test: panic is Option<PanicStrategy> now
Jorge Aparicio [Wed, 28 Sep 2016 15:57:31 +0000 (10:57 -0500)]
fix librustc test: panic is Option<PanicStrategy> now

7 years agoAuto merge of #36780 - brson:bump, r=alexcrichton
bors [Wed, 28 Sep 2016 15:33:09 +0000 (08:33 -0700)]
Auto merge of #36780 - brson:bump, r=alexcrichton

Bump version to 1.14

r? @alexcrichton

7 years agoAdd testcase for issue-18088.
ParkHanbum [Wed, 28 Sep 2016 13:44:28 +0000 (22:44 +0900)]
Add testcase for issue-18088.
ref : https://github.com/rust-lang/rust/issues/18088.

7 years agoAuto merge of #36777 - tmiasko:chain-read-eof, r=alexcrichton
bors [Wed, 28 Sep 2016 12:04:54 +0000 (05:04 -0700)]
Auto merge of #36777 - tmiasko:chain-read-eof, r=alexcrichton

[std::io::Chain] Mark first as done only when reading into non-zero length buffer.

Fixes #36771.

7 years agoUpdate E0050 to new error format
Guillaume Gomez [Sat, 10 Sep 2016 13:27:33 +0000 (15:27 +0200)]
Update E0050 to new error format

7 years agoAuto merge of #36604 - japaric:libtest-skip, r=alexcrichton
bors [Wed, 28 Sep 2016 07:38:07 +0000 (00:38 -0700)]
Auto merge of #36604 - japaric:libtest-skip, r=alexcrichton

libtest: add a --skip flag to the test runner

This flag takes a FILTER argument and instructs the test runner to skip
the tests whose names contain the word FILTER. --skip can be used
several times.

---

My motivation for submitting this is that while using [smoke] to run `std` unit tests for cross
targets I found that a few of the tests always fail due to limitations in QEMU (it can't handle too
many threads) and I'd like to skip these problematic tests from the command line to be able to run
the rest of the unit tests.

[smoke]: https://github.com/japaric/smoke

I know there is another mechanism to skip tests: `#[ignore]` but this doesn't work in my use case
because I can't (easily) modify the source of the standard libraries to `#[ignore]` some tests. And
even if I could, the change would involve conditionally ignoring some tests for some targets but
that's not a perfect solution because those tests should pass if executed on real hardware so they
should not be `#[ignored]` in that scenario.

r? @alexcrichton
cc @brson

7 years ago[breaking-change] std: change `encode_utf{8,16}()` to take a buffer and return a...
tormol [Thu, 8 Sep 2016 11:54:39 +0000 (13:54 +0200)]
[breaking-change] std: change `encode_utf{8,16}()` to take a buffer and return a slice

They panic if the buffer is too small.

7 years agoupdate mips64* data-layout
Tim Neumann [Wed, 28 Sep 2016 06:06:49 +0000 (08:06 +0200)]
update mips64* data-layout

7 years agoTypeIdHasher: hash usize as u64
Tim Neumann [Wed, 28 Sep 2016 05:54:43 +0000 (07:54 +0200)]
TypeIdHasher: hash usize as u64

7 years agofix compiletest
Jorge Aparicio [Wed, 28 Sep 2016 04:03:29 +0000 (23:03 -0500)]
fix compiletest

7 years agoAuto merge of #36776 - alexcrichton:rustc-macro-dep-files, r=nrc
bors [Wed, 28 Sep 2016 03:21:12 +0000 (20:21 -0700)]
Auto merge of #36776 - alexcrichton:rustc-macro-dep-files, r=nrc

rustc: Use a special filename for macros 1.1

This "special filename" is surrounded by `<>` to ensure that
`FileMap::is_real_file` returns `false`. This way the "files" parsed here aren't
emitted as dep info `.d` files and don't confuse Cargo about non-existent files.

Closes #36625

7 years agoAllow supplying an error destination via the compiler driver
Nick Cameron [Mon, 26 Sep 2016 22:45:50 +0000 (11:45 +1300)]
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 agoadd a panic-strategy field to the target specification
Jorge Aparicio [Wed, 28 Sep 2016 02:26:08 +0000 (21:26 -0500)]
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

7 years agoadd wrapper for discriminant_value
Alex Burka [Wed, 29 Jun 2016 16:15:59 +0000 (12:15 -0400)]
add wrapper for discriminant_value

7 years agoAdd regression test.
Jeffrey Seyfried [Tue, 27 Sep 2016 20:06:37 +0000 (20:06 +0000)]
Add regression test.

7 years agoAuto merge of #36601 - jseyfried:build_reduced_graph_in_expansion, r=nrc
bors [Tue, 27 Sep 2016 21:11:07 +0000 (14:11 -0700)]
Auto merge of #36601 - jseyfried:build_reduced_graph_in_expansion, r=nrc

Assign def ids and build the module graph during expansion

r? @nrc

7 years agoImprove documention troubleshooting missing linker. Fix #32208.
Paulo Matos [Fri, 23 Sep 2016 15:38:20 +0000 (17:38 +0200)]
Improve documention troubleshooting missing linker. Fix #32208.

7 years agoAvoid re-export errors in the generated test harness.
Jeffrey Seyfried [Tue, 27 Sep 2016 20:00:08 +0000 (20:00 +0000)]
Avoid re-export errors in the generated test harness.

7 years agoRemove requirement to use 10.7 (fixes macOS)
Jonathan Turner [Tue, 27 Sep 2016 20:13:09 +0000 (13:13 -0700)]
Remove requirement to use 10.7 (fixes macOS)

7 years agorustc: Tweak expansion order of custom derive
Alex Crichton [Tue, 27 Sep 2016 18:51:56 +0000 (11:51 -0700)]
rustc: Tweak expansion order of custom derive

This commit alters the expansion order of custom macros-1.1 style `#[derive]`
modes. Instead of left-to-right the expansion now happens in three categories,
each of which is internally left-to-right:

* Old-style custom derive (`#[derive_Foo]`) is expanded
* New-style custom derive (macros 1.1) is expanded
* Built in derive modes are expanded

This gives built in derive modes maximal knowledge about the struct that's being
expanded and also avoids pesky issues like exposing `#[structural_match]` or
`#[rustc_copy_clone_marker]`.

cc #35900

7 years agoBump version to 1.14
Brian Anderson [Tue, 27 Sep 2016 19:22:06 +0000 (12:22 -0700)]
Bump version to 1.14

7 years agorustc: Use a special filename for macros 1.1
Alex Crichton [Tue, 27 Sep 2016 18:19:03 +0000 (11:19 -0700)]
rustc: Use a special filename for macros 1.1

This "special filename" is surrounded by `<>` to ensure that
`FileMap::is_real_file` returns `false`. This way the "files" parsed here aren't
emitted as dep info `.d` files and don't confuse Cargo about non-existent files.

Closes #36625

7 years agoAuto merge of #36609 - brson:relnotes, r=alexcrichton
bors [Tue, 27 Sep 2016 17:45:10 +0000 (10:45 -0700)]
Auto merge of #36609 - brson:relnotes, r=alexcrichton

Add changelog for 1.12

[Rendered](https://github.com/brson/rust/blob/relnotes/RELEASES.md).

7 years agoAdd changelog for 1.12
Brian Anderson [Wed, 21 Sep 2016 01:38:26 +0000 (18:38 -0700)]
Add changelog for 1.12

7 years ago[std::io::Chain] Mark first as done only when reading into non-zero length buffer.
Tomasz Miąsko [Mon, 26 Sep 2016 22:00:00 +0000 (00:00 +0200)]
[std::io::Chain] Mark first as done only when reading into non-zero length buffer.

Fixes #36771.

7 years agoAuto merge of #36761 - jonathandturner:E0425_E0446_E0449, r=nrc
bors [Tue, 27 Sep 2016 14:30:34 +0000 (07:30 -0700)]
Auto merge of #36761 - jonathandturner:E0425_E0446_E0449, r=nrc

Update E0425, E0446, E0449

This addresses https://github.com/rust-lang/rust/issues/35343, https://github.com/rust-lang/rust/issues/35923, and https://github.com/rust-lang/rust/issues/35924.  Part of https://github.com/rust-lang/rust/issues/35233

Specifically, this adds labels to these error messages following the suggestions in the attached bugs.

r? @nrc

7 years agoAuto merge of #36758 - michaelwoerister:incr-comp-file-headers, r=eddyb
bors [Tue, 27 Sep 2016 11:05:34 +0000 (04:05 -0700)]
Auto merge of #36758 - michaelwoerister:incr-comp-file-headers, r=eddyb

incr.comp.: Let the compiler ignore incompatible incr. comp. cache artifacts

Implements #35720.

cc @nikomatsakis

7 years agodoc: Fix minor typo in book/variable-bindings.md
Nathan Musoke [Tue, 27 Sep 2016 10:20:50 +0000 (23:20 +1300)]
doc: Fix minor typo in book/variable-bindings.md

7 years agoUpdate set.rs
Frank Rehberger [Tue, 27 Sep 2016 08:32:21 +0000 (10:32 +0200)]
Update set.rs

7 years agoUpdate map.rs
Frank Rehberger [Tue, 27 Sep 2016 08:31:25 +0000 (10:31 +0200)]
Update map.rs

7 years agoFix fallout in tests.
Jeffrey Seyfried [Sat, 24 Sep 2016 03:09:14 +0000 (03:09 +0000)]
Fix fallout in tests.

7 years agoFix def id collection for `const_integer`s in the AST.
Jeffrey Seyfried [Fri, 23 Sep 2016 21:13:59 +0000 (21:13 +0000)]
Fix def id collection for `const_integer`s in the AST.

7 years agoWith `--test`, make `#[test]` functions `pub` in `InvocationCollector`
Jeffrey Seyfried [Fri, 23 Sep 2016 07:23:01 +0000 (07:23 +0000)]
With `--test`, make `#[test]` functions `pub` in `InvocationCollector`
and expand the `__test_reexports` in the correct scope.

7 years agoAvoid aborting after expansion from `BuildReducedGraphVisitor` errors.
Jeffrey Seyfried [Tue, 20 Sep 2016 06:33:42 +0000 (06:33 +0000)]
Avoid aborting after expansion from `BuildReducedGraphVisitor` errors.

7 years agoMerge `ModuleData` and `ModuleS`.
Jeffrey Seyfried [Fri, 16 Sep 2016 06:45:03 +0000 (06:45 +0000)]
Merge `ModuleData` and `ModuleS`.

7 years agoBuild the reduced graph during expansion.
Jeffrey Seyfried [Wed, 14 Sep 2016 21:03:09 +0000 (21:03 +0000)]
Build the reduced graph during expansion.