]> git.lizzy.rs Git - rust.git/log
rust.git
6 years agoAuto merge of #49108 - SimonSapin:sip, r=TimNN
bors [Mon, 19 Mar 2018 07:49:32 +0000 (07:49 +0000)]
Auto merge of #49108 - SimonSapin:sip, r=TimNN

Remove or hide deprecated unstable SipHasher{13,24}

Deprecated since Rust 1.13.0.

6 years agoAuto merge of #49091 - nikomatsakis:issue-49043-ty-infer-hash, r=michaelwoerister
bors [Mon, 19 Mar 2018 05:07:27 +0000 (05:07 +0000)]
Auto merge of #49091 - nikomatsakis:issue-49043-ty-infer-hash, r=michaelwoerister

extend stable hasher to support `CanonicalTy`

Fixes #49043

r? @michaelwoerister

6 years agoAuto merge of #48978 - SimonSapin:debug-hex, r=KodrAus
bors [Mon, 19 Mar 2018 02:38:19 +0000 (02:38 +0000)]
Auto merge of #48978 - SimonSapin:debug-hex, r=KodrAus

Add hexadecimal formatting of integers with fmt::Debug

This can be used for integers within a larger types which implements Debug (possibly through derive) but not fmt::UpperHex or fmt::LowerHex.

```rust
assert!(format!("{:02x?}", b"Foo\0") == "[46, 6f, 6f, 00]");
assert!(format!("{:02X?}", b"Foo\0") == "[46, 6F, 6F, 00]");
```

RFC: https://github.com/rust-lang/rfcs/pull/2226

The new formatting string syntax (`x?` and `X?`) is insta-stable in this PR because I don’t know how to change a built-in proc macro’s behavior based of a feature gate. I can look into adding that, but I also strongly suspect that keeping this feature unstable for a time period would not be useful as possibly no-one would use it during that time.

This PR does not add the new (public) `fmt::Formatter` proposed in the API because:

* There was some skepticism on response to this part of the RFC
* It is not possible to implement as-is without larger changes to `fmt`, because `Formatter` at the moment has no easy way to tell apart for example `Octal` from `Binary`: it only has a function pointer for the relevant `fmt()` method.

If some integer-like type outside of `std` want to implement this behavior, another RFC will likely need to propose a different public API for `Formatter`.

6 years agoAuto merge of #49095 - alexcrichton:debug-asmjs, r=kennytm
bors [Mon, 19 Mar 2018 00:02:32 +0000 (00:02 +0000)]
Auto merge of #49095 - alexcrichton:debug-asmjs, r=kennytm

Try to reduce amount of time on the asmjs builder

This PR has two commits for two separate strategies:

* First it disables optimizations for all tests, hopefully saving time by not optimizing the test code. This caused a number of run-pass tests to fail which are switched to being ignored here.
* Next it disables a number of test suites which aren't asm.js specific and already run elsewhere

cc #48826

6 years agoAuto merge of #49134 - oli-obk:clippy, r=kennytm
bors [Sun, 18 Mar 2018 17:22:17 +0000 (17:22 +0000)]
Auto merge of #49134 - oli-obk:clippy, r=kennytm

Update clippy and RLS

r? @Manishearth

6 years agoUpdate RLS.
kennytm [Sun, 18 Mar 2018 14:26:57 +0000 (22:26 +0800)]
Update RLS.

6 years agoUpdate clippy
Oliver Schneider [Sun, 18 Mar 2018 12:29:57 +0000 (13:29 +0100)]
Update clippy

6 years agoAuto merge of #48986 - matklad:update-cargo, r=alexcrichton
bors [Sun, 18 Mar 2018 10:03:18 +0000 (10:03 +0000)]
Auto merge of #48986 - matklad:update-cargo, r=alexcrichton

Update Cargo

r? @alexcrichton

Let's put new clap argument parsing in production to see if anything dies in flames :)

6 years agoAuto merge of #48985 - scalexm:lowering, r=nikomatsakis
bors [Sun, 18 Mar 2018 07:35:43 +0000 (07:35 +0000)]
Auto merge of #48985 - scalexm:lowering, r=nikomatsakis

MVP for chalkification

r? @nikomatsakis

6 years agoAuto merge of #48917 - petrochenkov:import, r=oli-obk
bors [Sun, 18 Mar 2018 01:50:52 +0000 (01:50 +0000)]
Auto merge of #48917 - petrochenkov:import, r=oli-obk

syntax: Make imports in AST closer to the source and cleanup their parsing

This is a continuation of https://github.com/rust-lang/rust/pull/45846 in some sense.

6 years agoAuto merge of #48842 - petrochenkov:under, r=nikomatsakis
bors [Sat, 17 Mar 2018 23:22:57 +0000 (23:22 +0000)]
Auto merge of #48842 - petrochenkov:under, r=nikomatsakis

syntax: Make `_` a reserved identifier

Why:
- Lexically `_` is an identifier.
- Internally it makes implementation of `use Trait as _;` (https://github.com/rust-lang/rust/issues/48216) and some other things cleaner.
- We prevent the externally observable effect of `_` being accepted by macros expecting `ident` by treating `_` specially in the `ident` matcher:
```rust
macro_rules! m {
    ($i: ident) => { let $i = 10; }
}

m!(_); // Still an error
```

6 years agoAdd some docs + Fix rebase
Vadim Petrochenkov [Mon, 12 Mar 2018 20:16:09 +0000 (23:16 +0300)]
Add some docs + Fix rebase

6 years agoCleanup import parsing
Vadim Petrochenkov [Sat, 10 Mar 2018 15:44:44 +0000 (18:44 +0300)]
Cleanup import parsing

Fix spans of root segments

6 years agoRename `Span::empty` to `Span::shrink_to_lo`, add `Span::shrink_to_hi`
Vadim Petrochenkov [Sat, 10 Mar 2018 14:45:47 +0000 (17:45 +0300)]
Rename `Span::empty` to `Span::shrink_to_lo`, add `Span::shrink_to_hi`

6 years agoAST: Keep distinction between `path` and `::path` in imports and visibilities
Vadim Petrochenkov [Fri, 9 Mar 2018 23:02:39 +0000 (02:02 +0300)]
AST: Keep distinction between `path` and `::path` in imports and visibilities

Add the root segment for name resolution purposes only

6 years agoAST: Make renames in imports closer to the source
Vadim Petrochenkov [Fri, 9 Mar 2018 15:58:44 +0000 (18:58 +0300)]
AST: Make renames in imports closer to the source

Fix `unused_import_braces` lint false positive on `use prefix::{self as rename}`

6 years agoAST/HIR: Clarify what the optional name in extern crate items mean
Vadim Petrochenkov [Fri, 9 Mar 2018 15:51:48 +0000 (18:51 +0300)]
AST/HIR: Clarify what the optional name in extern crate items mean

6 years agoReject `_` in `ident` matcher
Vadim Petrochenkov [Sat, 17 Mar 2018 19:08:18 +0000 (22:08 +0300)]
Reject `_` in `ident` matcher

6 years agosyntax: Make `_` an identifier
Vadim Petrochenkov [Thu, 8 Mar 2018 11:27:23 +0000 (14:27 +0300)]
syntax: Make `_` an identifier

6 years agoAuto merge of #48936 - Zoxc:cstore, r=michaelwoerister
bors [Sat, 17 Mar 2018 17:30:14 +0000 (17:30 +0000)]
Auto merge of #48936 - Zoxc:cstore, r=michaelwoerister

Make CrateMetadata and CStore thread-safe

r? @michaelwoerister

6 years agoMark deprecated unstable SipHasher13 as a doc-hidden impl detail of HashMap.
Simon Sapin [Sat, 17 Mar 2018 10:07:50 +0000 (11:07 +0100)]
Mark deprecated unstable SipHasher13 as a doc-hidden impl detail of HashMap.

It stays in libcore rather than being private in HashMap’s module
because it shares code with the deprecated *stable* `SipHasher` type.

6 years agoAuto merge of #49106 - kennytm:rollup, r=kennytm
bors [Sat, 17 Mar 2018 11:39:38 +0000 (11:39 +0000)]
Auto merge of #49106 - kennytm:rollup, r=kennytm

Rollup of 8 pull requests

- Successful merges: #48943, #48960, #48983, #49055, #49057, #49077, #49082, #49083
- Failed merges:

6 years agoMake the deprecated unstable SipHasher24 type private.
Simon Sapin [Sat, 17 Mar 2018 09:40:49 +0000 (10:40 +0100)]
Make the deprecated unstable SipHasher24 type private.

It is still used by the deprecated *stable* `SipHasher` type.

6 years agoRollup merge of #49083 - oli-obk:mopsgeschwindigkeit, r=michaelwoerister
kennytm [Sat, 17 Mar 2018 09:20:49 +0000 (17:20 +0800)]
Rollup merge of #49083 - oli-obk:mopsgeschwindigkeit, r=michaelwoerister

Only generate miri backtraces if explicitly requested

fixes #49072
fixes #48888

r? @michaelwoerister

6 years agoRollup merge of #49082 - SimonSapin:mu, r=alexcrichton
kennytm [Sat, 17 Mar 2018 09:20:48 +0000 (17:20 +0800)]
Rollup merge of #49082 - SimonSapin:mu, r=alexcrichton

Remove deprecated unstable alloc::heap::EMPTY constant

6 years agoRollup merge of #49077 - sinkuu:macro_use_typo, r=estebank
kennytm [Sat, 17 Mar 2018 09:20:47 +0000 (17:20 +0800)]
Rollup merge of #49077 - sinkuu:macro_use_typo, r=estebank

Checks for unknown attributes before aborting due to unresolved macros

Fixes #49074

The ``attribute `...` is currently unknown to the compiler`` error was not shown if there are any unresolved macros, which might be caused by mistyped `macro_use`.

6 years agoRollup merge of #49057 - Zoxc:fast-submodules, r=alexcrichton
kennytm [Sat, 17 Mar 2018 09:20:46 +0000 (17:20 +0800)]
Rollup merge of #49057 - Zoxc:fast-submodules, r=alexcrichton

Faster submodule updating

For the common case when there are no submodules which need updating, this takes 0.48 seconds instead of 47 seconds.

r? @alexcrichton

6 years agoRollup merge of #49055 - alexcrichton:ship-more-libs, r=nikomatsakis
kennytm [Sat, 17 Mar 2018 09:20:44 +0000 (17:20 +0800)]
Rollup merge of #49055 - alexcrichton:ship-more-libs, r=nikomatsakis

rustbuild: Add more MinGW libraries to ship

Closes #49044

6 years agoRollup merge of #48983 - gnzlbg:red, r=alexcrichton
kennytm [Sat, 17 Mar 2018 09:20:43 +0000 (17:20 +0800)]
Rollup merge of #48983 - gnzlbg:red, r=alexcrichton

add intrinsics for portable packed simd vector reductions

Adds the following portable vector reduction intrinsics:

* fn simd_reduce_add<T, U>(x: T) -> U;
* fn simd_reduce_mul<T, U>(x: T) -> U;
* fn simd_reduce_min<T, U>(x: T) -> U;
* fn simd_reduce_max<T, U>(x: T) -> U;
* fn simd_reduce_and<T, U>(x: T) -> U;
* fn simd_reduce_or<T, U>(x: T) -> U;
* fn simd_reduce_xor<T, U>(x: T) -> U;

I've also added:

* fn simd_reduce_all<T>(x: T) -> bool;
* fn simd_reduce_any<T>(x: T) -> bool;

These produce better code that what we are currently producing in `stdsimd`, but the code is still not optimal due to this LLVM bug:  https://bugs.llvm.org/show_bug.cgi?id=36702

r? @alexcrichton

6 years agoRollup merge of #48960 - nikomatsakis:issue-48468-dyn-trait-elision, r=cramertj
kennytm [Sat, 17 Mar 2018 09:20:42 +0000 (17:20 +0800)]
Rollup merge of #48960 - nikomatsakis:issue-48468-dyn-trait-elision, r=cramertj

resolve `'_` in `dyn Trait` just like ordinary elision

r? @cramertj

Fixes #48468

6 years agoRollup merge of #48943 - comex:verbose, r=kennytm
kennytm [Sat, 17 Mar 2018 09:20:41 +0000 (17:20 +0800)]
Rollup merge of #48943 - comex:verbose, r=kennytm

Support extra-verbose builds

- The bootstrap crate currently passes -v to Cargo if itself invoked with -vv.  But Cargo supports -vv (to show build script output), so make bootstrap pass that if itself invoked with -vvv.  (More specifically, pass N '-v's to Cargo if invoked with N+1 of them.)

- bootstrap.py currently tries to pass on up to two '-v's to cargo when building bootstrap, but incorrectly ('-v' is marked as 'store_true', so argparse stores either False or True, ignoring multiple '-v's).  Fix this, allow passing any number of '-v's, and make it consistent with bootstrap's invocation of Cargo (i.e. subtract one from the number of '-v's).

- Also improve bootstrap.py's config.toml 'parsing' to support arbitrary verbosity levels, + allow command line to override it.

6 years agoAuto merge of #48904 - Zoxc:code-and-file-maps, r=michaelwoerister
bors [Sat, 17 Mar 2018 08:54:22 +0000 (08:54 +0000)]
Auto merge of #48904 - Zoxc:code-and-file-maps, r=michaelwoerister

Make CodeMap and FileMap thread-safe

r? @michaelwoerister

6 years agoAuto merge of #49090 - QuietMisdreavus:test-rustdoc-again, r=Mark-Simulacrum
bors [Sat, 17 Mar 2018 03:15:21 +0000 (03:15 +0000)]
Auto merge of #49090 - QuietMisdreavus:test-rustdoc-again, r=Mark-Simulacrum

re-enable testing librustdoc

This was originally put in in https://github.com/rust-lang/rust/pull/44274, but https://github.com/rust-lang/rust/pull/48105 accidentally hid it. This change puts librustdoc unit/doc tests back in the main test listing.

fixes https://github.com/rust-lang/rust/issues/44237 (again)

6 years agoAuto merge of #49088 - michaelwoerister:fix-49070, r=nikomatsakis
bors [Sat, 17 Mar 2018 00:48:10 +0000 (00:48 +0000)]
Auto merge of #49088 - michaelwoerister:fix-49070, r=nikomatsakis

incr.comp.: Make sanity check in try_mark_green() aware of error conditions.

Before this PR, `DepGraph::try_mark_green()` assumed that forcing a query would always set the color of the corresponding dep-node. However, it did not take into account that queries could also fail (e.g. with a cycle error). This PR makes the method handle that condition gracefully.

Fixes #49070.

r? @nikomatsakis

6 years agoUpdate Cargo
Aleksey Kladov [Fri, 16 Mar 2018 10:37:14 +0000 (13:37 +0300)]
Update Cargo

This notably includes

* https://github.com/rust-lang/cargo/pull/5152
* https://github.com/rust-lang/cargo/pull/5188

The first one switches cargo from docopt to clap (
we also update to the latest calp in this repository),
the second one should help us to unify feature flags
for Cargo itself and RLS, and build Cargo libray only
once.

6 years agoci: Run fewer tests on asmjs
Alex Crichton [Fri, 16 Mar 2018 19:53:51 +0000 (12:53 -0700)]
ci: Run fewer tests on asmjs

Many tests run on the asmjs builder like compile-fail, ui, parse-fail, etc,
aren't actually specific to asm.js. Instead of running redundant test suites
this commit changes things up to only run tests that actually emit JS we then
pass to node.

6 years agoci: Disable optimized tests for asm.js
Alex Crichton [Fri, 16 Mar 2018 18:42:42 +0000 (11:42 -0700)]
ci: Disable optimized tests for asm.js

Since all tests are compiled with LTO effectively in Emscripten this commit
disables optimizations to hopefully squeeze some more time out of the CI
builders.

Closes #48826

6 years agoAuto merge of #48097 - oli-obk:did_you_mean_to_run_rls_with_clippy, r=nrc
bors [Fri, 16 Mar 2018 19:45:10 +0000 (19:45 +0000)]
Auto merge of #48097 - oli-obk:did_you_mean_to_run_rls_with_clippy, r=nrc

Automatically enable the `clippy` feature of `rls` if clippy builds

r? @nrc

cc @Manishearth

6 years agofix doctest
QuietMisdreavus [Fri, 16 Mar 2018 18:29:20 +0000 (13:29 -0500)]
fix doctest

6 years agoAutomatically enable the `clippy` feature of `rls` if clippy builds
Oliver Schneider [Fri, 9 Feb 2018 17:53:41 +0000 (18:53 +0100)]
Automatically enable the `clippy` feature of `rls` if clippy builds

6 years agoextend stable hasher to support `CanonicalTy`
Niko Matsakis [Fri, 16 Mar 2018 16:45:47 +0000 (12:45 -0400)]
extend stable hasher to support `CanonicalTy`

6 years agore-enable resting librustdoc
QuietMisdreavus [Fri, 16 Mar 2018 16:38:06 +0000 (11:38 -0500)]
re-enable resting librustdoc

6 years agoincr.comp.: Make sanity check in try_mark_green() aware of error conditions.
Michael Woerister [Fri, 16 Mar 2018 15:18:14 +0000 (16:18 +0100)]
incr.comp.: Make sanity check in try_mark_green() aware of error conditions.

6 years agorustbuild: Add more MinGW libraries to ship
Alex Crichton [Thu, 15 Mar 2018 18:35:07 +0000 (11:35 -0700)]
rustbuild: Add more MinGW libraries to ship

Closes #49044

6 years agoAuto merge of #48896 - alexcrichton:bitcode-in-object, r=michaelwoerister
bors [Fri, 16 Mar 2018 13:48:20 +0000 (13:48 +0000)]
Auto merge of #48896 - alexcrichton:bitcode-in-object, r=michaelwoerister

rustc: Enable embedding LLVM bitcode for iOS

This commit updates rustc to embed bitcode in each object file generated by
default when compiling for iOS. This was determined in #35968 as a step
towards better compatibility with the iOS toolchain, so let's give it a spin and
see how it turns out!

Note that this also updates the `cc` dependency which should propagate this
change of embedding bitcode for C dependencies as well.

6 years agoAuto merge of #48818 - michaelwoerister:issue-47309, r=eddyb
bors [Fri, 16 Mar 2018 11:13:13 +0000 (11:13 +0000)]
Auto merge of #48818 - michaelwoerister:issue-47309, r=eddyb

Properly handle collecting default impls of methods with lifetime parameters.

r? @eddyb

Fixes #47309.

6 years agoOnly generate miri backtraces if explicitly requested
Oliver Schneider [Fri, 16 Mar 2018 10:48:32 +0000 (11:48 +0100)]
Only generate miri backtraces if explicitly requested

6 years agoRemove deprecated unstable alloc::heap::EMPTY constant
Simon Sapin [Fri, 16 Mar 2018 10:44:55 +0000 (11:44 +0100)]
Remove deprecated unstable alloc::heap::EMPTY constant

6 years agoignore emscripten
gnzlbg [Fri, 16 Mar 2018 08:39:41 +0000 (09:39 +0100)]
ignore emscripten

6 years agoAuto merge of #48813 - sinkuu:build_in_assert_macro, r=alexcrichton
bors [Fri, 16 Mar 2018 08:22:11 +0000 (08:22 +0000)]
Auto merge of #48813 - sinkuu:build_in_assert_macro, r=alexcrichton

Make `assert` a built-in procedural macro

Makes `assert` macro a built-in one without touching its functionality. This is a prerequisite for RFC 2011 (#44838).

6 years agoChecks for unknown attributes before aborting
Shotaro Yamada [Fri, 16 Mar 2018 07:53:40 +0000 (16:53 +0900)]
Checks for unknown attributes before aborting

...due to unresolved macros.

6 years agoAuto merge of #48524 - abonander:check-macro-stability, r=petrochenkov
bors [Fri, 16 Mar 2018 02:46:23 +0000 (02:46 +0000)]
Auto merge of #48524 - abonander:check-macro-stability, r=petrochenkov

check stability of macro invocations

I haven't implemented tests yet but this should be a pretty solid prototype. I think as-implemented it will also stability-check macro invocations in the same crate, dunno if we want that or not.

I don't know if we want this to go through `rustc::middle::stability` or not, considering the information there wouldn't be available at the time of macro expansion (even for external crates, right?).

r? @nrc
closes #34079
cc @petrochenkov @durka @jseyfried #38356

6 years agoSupport extra-verbose builds:
comex [Sun, 11 Mar 2018 23:44:05 +0000 (16:44 -0700)]
Support extra-verbose builds:

- The bootstrap crate currently passes -v to Cargo if itself invoked
with -vv.  But Cargo supports -vv (to show build script output), so make
bootstrap pass that if itself invoked with -vvv.  (More specifically,
pass N '-v's to Cargo if invoked with N+1 of them.)

- bootstrap.py currently tries to pass on up to two '-v's to cargo when
building bootstrap, but incorrectly ('-v' is marked as 'store_true', so
argparse stores either False or True, ignoring multiple '-v's).  Fix
this, allow passing any number of '-v's, and make it consistent with
bootstrap's invocation of Cargo (i.e. subtract one from the number of
'-v's).

- Also improve bootstrap.py's config.toml 'parsing' to support arbitrary
verbosity levels, + allow command line to override it.

6 years agoAuto merge of #49051 - kennytm:rollup, r=kennytm
bors [Fri, 16 Mar 2018 00:09:14 +0000 (00:09 +0000)]
Auto merge of #49051 - kennytm:rollup, r=kennytm

Rollup of 17 pull requests

- Successful merges: #48706, #48875, #48892, #48922, #48957, #48959, #48961, #48965, #49007, #49024, #49042, #49050, #48853, #48990, #49037, #49049, #48972
- Failed merges:

6 years agoRollup merge of #48972 - mark-i-m:rustdoc_readme, r=QuietMisdreavus
kennytm [Thu, 15 Mar 2018 23:48:36 +0000 (07:48 +0800)]
Rollup merge of #48972 - mark-i-m:rustdoc_readme, r=QuietMisdreavus

Move librustdoc readme to rustc guide

cc https://github.com/rust-lang-nursery/rustc-guide/issues/2 and #48478

Don't merge this before https://github.com/rust-lang-nursery/rustc-guide/pull/86

6 years agoFix tidy
Alexandre Martin [Thu, 15 Mar 2018 22:20:06 +0000 (23:20 +0100)]
Fix tidy

6 years agoRollup merge of #49049 - Centril:fix/flatten-fusediterator, r=bluss
kennytm [Thu, 15 Mar 2018 21:38:29 +0000 (05:38 +0800)]
Rollup merge of #49049 - Centril:fix/flatten-fusediterator, r=bluss

Unstabilize FusedIterator for Flatten since Flatten is unstable

PR #47463 made `impl<I, U> FusedIterator for Flatten<I>` stable but shouldn't have since `Flatten` is still unstable. This PR makes the impl unstable again.

6 years agoRollup merge of #49037 - estebank:coherence-tweaks, r=nikomatsakis
kennytm [Thu, 15 Mar 2018 21:38:11 +0000 (05:38 +0800)]
Rollup merge of #49037 - estebank:coherence-tweaks, r=nikomatsakis

Coherence diagnostic tweaks

6 years agoRollup merge of #48990 - ExpHP:dont-drop-the-bomb, r=estebank
kennytm [Thu, 15 Mar 2018 21:37:39 +0000 (05:37 +0800)]
Rollup merge of #48990 - ExpHP:dont-drop-the-bomb, r=estebank

Fix ICE on malformed plugin attributes

See #48941 for some discussion.

This bug had several duplicate reports which were never closed as dupes:

Fixes #47612
Fixes #48387
Fixes #48941
Fixes #48982

6 years agoRollup merge of #48853 - Songbird0:addrparseerror_documentation_improvement, r=Guilla...
kennytm [Thu, 15 Mar 2018 21:37:12 +0000 (05:37 +0800)]
Rollup merge of #48853 - Songbird0:addrparseerror_documentation_improvement, r=GuillaumeGomez

Improve `AddrParseError` documentation.

I've added potential cause to `AddrParseError` raising.

6 years agoRollup merge of #49050 - snf:fix_oom_asmjs, r=alexcrichton
kennytm [Thu, 15 Mar 2018 21:36:46 +0000 (05:36 +0800)]
Rollup merge of #49050 - snf:fix_oom_asmjs, r=alexcrichton

setting ABORTING_MALLOC=0 for asmjs backend

This changes the behaviour of the allocator for asmjs backend.
It will return NULL on OOM instead of aborting and let Rust choose the behaviour.
Fixes #48968 and enables try_reserve (fallible allocation) in asmjs.

6 years agoRollup merge of #49042 - kennytm:fix-e0307-typo, r=rkruppe
kennytm [Thu, 15 Mar 2018 17:49:51 +0000 (01:49 +0800)]
Rollup merge of #49042 - kennytm:fix-e0307-typo, r=rkruppe

Remove unnecessary "`" in error message E0307 (invalid self type).

6 years agoRollup merge of #49024 - draganmladjenovic:mips64_cabi_sret, r=sanxiyn
kennytm [Thu, 15 Mar 2018 17:49:50 +0000 (01:49 +0800)]
Rollup merge of #49024 - draganmladjenovic:mips64_cabi_sret, r=sanxiyn

 rustc_trans: fix small aggregate returns for big-endian mips64 FFI

 Current model of threating small aggregate returns as smallest encompassing integer works only for little-endian mips64.
 The patch forces small aggregate return values to be viewed as one or two i64 chunks leaving to the casting implementation
 to handle endianes differences.

6 years agoRollup merge of #49007 - estebank:follow-up-47574, r=oli-obk
kennytm [Thu, 15 Mar 2018 17:49:49 +0000 (01:49 +0800)]
Rollup merge of #49007 - estebank:follow-up-47574, r=oli-obk

Some tweaks to "type parameters from outer function" diagnostic

Follow up to #47574.

6 years agoFaster submodule updating
John Kåre Alsaker [Thu, 15 Mar 2018 19:13:33 +0000 (20:13 +0100)]
Faster submodule updating

6 years agoCoherence diagnostic tweaks
Esteban Küber [Thu, 15 Mar 2018 02:10:28 +0000 (19:10 -0700)]
Coherence diagnostic tweaks

6 years agoImprove `AddrParseError` documentation.
Anthony Defranceschi [Thu, 8 Mar 2018 22:18:45 +0000 (23:18 +0100)]
Improve `AddrParseError` documentation.

Add a potential cause to `AddrParseError` raising.

6 years agoadd xref to rust-guide
Niko Matsakis [Thu, 15 Mar 2018 18:27:00 +0000 (14:27 -0400)]
add xref to rust-guide

6 years agoRollup merge of #48965 - alexcrichton:add-sha-feature, r=eddyb
kennytm [Thu, 15 Mar 2018 17:49:47 +0000 (01:49 +0800)]
Rollup merge of #48965 - alexcrichton:add-sha-feature, r=eddyb

rustc: Add `sha` to the x86 feature whitelist

This'll help us bind the [`SHA` intrinsics][intr] in stdsimd!

[intr]: https://software.intel.com/sites/landingpage/IntrinsicsGuide/#othertechs=SHA

6 years agoRollup merge of #48961 - Songbird0:rustdoc_doctests_assertions, r=GuillaumeGomez
kennytm [Thu, 15 Mar 2018 17:49:45 +0000 (01:49 +0800)]
Rollup merge of #48961 - Songbird0:rustdoc_doctests_assertions, r=GuillaumeGomez

Rustdoc: example of use of assertions

I added this section at the beginning of the file because it seems to be basic information. Let me know if there's someplace more relevant.

See #47945.

6 years agoRollup merge of #48959 - alexcrichton:signext, r=eddyb
kennytm [Thu, 15 Mar 2018 17:49:44 +0000 (01:49 +0800)]
Rollup merge of #48959 - alexcrichton:signext, r=eddyb

rustc: Start a custom cabi module for wasm32

It actually was already using the `cabi_asmjs` module but that was by accident,
so route the new `wasm32-unknown-unknown` target to a new `cabi_wasm32` module.
The first entries in this module are to use `signext` and `zeroext` for types
that are under 32 bytes in size

Closes rust-lang-nursery/rust-wasm#88

6 years agoRollup merge of #48957 - Eijebong:rand, r=michaelwoerister
kennytm [Thu, 15 Mar 2018 17:49:43 +0000 (01:49 +0800)]
Rollup merge of #48957 - Eijebong:rand, r=michaelwoerister

Dedupe rand

6 years agoRollup merge of #48922 - petrochenkov:asunder, r=nikomatsakis
kennytm [Thu, 15 Mar 2018 17:49:42 +0000 (01:49 +0800)]
Rollup merge of #48922 - petrochenkov:asunder, r=nikomatsakis

Implement import renaming with `_` (RFC 2166)

cc https://github.com/rust-lang/rust/issues/48216

6 years agoRollup merge of #48892 - alexcrichton:thinlto-again, r=Mark-Simulacrum
kennytm [Thu, 15 Mar 2018 17:49:41 +0000 (01:49 +0800)]
Rollup merge of #48892 - alexcrichton:thinlto-again, r=Mark-Simulacrum

rustbuild: Remove ThinLTO-related configuration

This commit removes some ThinLTO/codegen unit cruft primarily only needed during
the initial phase where we were adding ThinLTO support to rustc itself. The
current bootstrap compiler knows about ThinLTO and has it enabled by default for
multi-CGU builds which are also enabled by default. One CGU builds (aka
disabling ThinLTO) can be achieved by configuring the number of codegen units to
1 for a particular builds.

This also changes the defaults for our dist builders to go back to multiple
CGUs. Unfortunately we're seriously bleeding for cycle time on the bots right
now so we need to recover any time we can.

6 years agoRollup merge of #48875 - jcowgill:mips-test-fixes, r=sanxiyn
kennytm [Thu, 15 Mar 2018 17:49:39 +0000 (01:49 +0800)]
Rollup merge of #48875 - jcowgill:mips-test-fixes, r=sanxiyn

MIPS testsuite fixes

This PR adjusts various bits in the testsuite so that more stuff passes on mips*.

6 years agoRollup merge of #48706 - ehuss:main-not-found-in-crate, r=estebank
kennytm [Thu, 15 Mar 2018 17:49:38 +0000 (01:49 +0800)]
Rollup merge of #48706 - ehuss:main-not-found-in-crate, r=estebank

Add crate name to "main function not found" error message.

Fixes #44798 and rust-lang/cargo#4948.

I was wondering if it might be cleaner to update the ui tests to add a simple `fn main() {}` for the unrelated tests.  Let me know if you would prefer that.

6 years agosetting ABORTING_MALLOC for asmjs backend
snf [Wed, 14 Mar 2018 14:56:37 +0000 (14:56 +0000)]
setting ABORTING_MALLOC for asmjs backend

6 years agoadd missing min-llvm-version
gnzlbg [Thu, 15 Mar 2018 17:42:53 +0000 (18:42 +0100)]
add missing min-llvm-version

6 years agounstabilize FusedIterator for Flatten since Flatten is unstable
Mazdak Farrokhzad [Thu, 15 Mar 2018 17:04:45 +0000 (18:04 +0100)]
unstabilize FusedIterator for Flatten since Flatten is unstable

6 years agoAuto merge of #47813 - kennytm:stable-incl-range, r=nrc
bors [Thu, 15 Mar 2018 16:00:40 +0000 (16:00 +0000)]
Auto merge of #47813 - kennytm:stable-incl-range, r=nrc

Stabilize inclusive range (`..=`)

Stabilize the followings:

* `inclusive_range` — The `std::ops::RangeInclusive` and `std::ops::RangeInclusiveTo` types, except its fields (tracked by #49022 separately).
* `inclusive_range_syntax` — The `a..=b` and `..=b` expression syntax
* `dotdoteq_in_patterns` — Using `a..=b` in a pattern

cc #28237
r? @rust-lang/lang

6 years agoerror via bug! instead of stderr+terminate
gnzlbg [Thu, 15 Mar 2018 15:51:58 +0000 (16:51 +0100)]
error via bug! instead of stderr+terminate

6 years agoadd compile fail tests
gnzlbg [Thu, 15 Mar 2018 15:36:02 +0000 (16:36 +0100)]
add compile fail tests

6 years agoAuto merge of #48138 - estebank:issue-45092, r=nikomatsakis
bors [Thu, 15 Mar 2018 13:16:09 +0000 (13:16 +0000)]
Auto merge of #48138 - estebank:issue-45092, r=nikomatsakis

Reword E0044 and message for `!Send` types

 - Reword E0044 help.
 - Change error message for types that don't implement `Send`

CC #45092, #46678, #24909, #33307.

6 years agoProperly handle collecting default impls of methods with lifetime parameters.
Michael Woerister [Wed, 7 Mar 2018 14:24:50 +0000 (15:24 +0100)]
Properly handle collecting default impls of methods with lifetime parameters.

6 years agoMonoItem collector: Cleanup start fn root collection.
Michael Woerister [Tue, 13 Mar 2018 14:40:02 +0000 (15:40 +0100)]
MonoItem collector: Cleanup start fn root collection.

6 years agoRemove unnecessary "`" in error message E0307 (invalid self type).
kennytm [Thu, 15 Mar 2018 09:59:17 +0000 (17:59 +0800)]
Remove unnecessary "`" in error message E0307 (invalid self type).

6 years agoadd min-llvm version to reduction tests
gnzlbg [Thu, 15 Mar 2018 09:10:16 +0000 (10:10 +0100)]
add min-llvm version to reduction tests

6 years agoerror on vector reduction usage if LLVM version is < 5.0
gnzlbg [Thu, 15 Mar 2018 09:08:22 +0000 (10:08 +0100)]
error on vector reduction usage if LLVM version is < 5.0

6 years agoKeep the fields of RangeInclusive unstable.
kennytm [Wed, 14 Mar 2018 18:50:55 +0000 (02:50 +0800)]
Keep the fields of RangeInclusive unstable.

6 years agoDisallow &a..=b and box a..=b in pattern.
kennytm [Fri, 2 Mar 2018 22:05:54 +0000 (06:05 +0800)]
Disallow &a..=b and box a..=b in pattern.

They are disallowed because they have different precedence than
expressions. I assume parenthesis in pattern will be soon stabilized and
thus write that as suggestion directly.

6 years agoStabilize `dotdoteq_in_patterns` language feature.
kennytm [Sat, 27 Jan 2018 19:29:00 +0000 (03:29 +0800)]
Stabilize `dotdoteq_in_patterns` language feature.

Stabilize `match 2 { 1..=3 => {} }`.

6 years agoStabilize `inclusive_range_syntax` language feature.
kennytm [Sat, 27 Jan 2018 19:19:29 +0000 (03:19 +0800)]
Stabilize `inclusive_range_syntax` language feature.

Stabilize the syntax `a..=b` and `..=b`.

6 years agoStabilize `inclusive_range` library feature.
kennytm [Sat, 27 Jan 2018 19:09:36 +0000 (03:09 +0800)]
Stabilize `inclusive_range` library feature.

Stabilize std::ops::RangeInclusive and std::ops::RangeInclusiveTo.

6 years agoAuto merge of #48648 - snf:fallible_allocation, r=Kimundi
bors [Thu, 15 Mar 2018 08:18:58 +0000 (08:18 +0000)]
Auto merge of #48648 - snf:fallible_allocation, r=Kimundi

Fallible allocation

Implementing RFC#2116 [Fallible Allocation](https://github.com/rust-lang/rust/issues/48043) .
Work in progress. Initially adding @Gankro's try_reserve for Vec.

6 years agoAdd span label to E0044
Esteban Küber [Thu, 15 Mar 2018 01:10:25 +0000 (18:10 -0700)]
Add span label to E0044

6 years agoReview comment: remove mention of `move` closure
Esteban Küber [Sun, 25 Feb 2018 21:18:29 +0000 (13:18 -0800)]
Review comment: remove mention of `move` closure

6 years agoMake hint clearer, with the potential of being wrong
Esteban Küber [Mon, 19 Feb 2018 08:15:12 +0000 (00:15 -0800)]
Make hint clearer, with the potential of being wrong

6 years agoSuggest using `move` when trying to share `...::channel::{Receiver, Sender}`
Esteban Küber [Sun, 11 Feb 2018 21:39:32 +0000 (13:39 -0800)]
Suggest using `move` when trying to share `...::channel::{Receiver, Sender}`

Extend `rustc_on_unimplemented` to match on ADT without evaluating type
arguments.

6 years agoReword E0044 and message for `!Send` types
Esteban Küber [Sun, 11 Feb 2018 05:01:49 +0000 (21:01 -0800)]
Reword E0044 and message for `!Send` types

 - Reword E0044 help.
 - Change error message for types that don't implement `Send`

6 years agoAuto merge of #47630 - canndrew:exhaustive-patterns, r=nikomatsakis
bors [Wed, 14 Mar 2018 23:43:04 +0000 (23:43 +0000)]
Auto merge of #47630 - canndrew:exhaustive-patterns, r=nikomatsakis

Stabilise feature(never_type). Introduce feature(exhaustive_patterns)

This stabilizes `!`, removing the feature gate as well as the old defaulting-to-`()` behavior. The pattern exhaustiveness checks which were covered by `feature(never_type)` have been moved behind a new `feature(exhaustive_patterns)` gate.