]> git.lizzy.rs Git - rust.git/log
rust.git
6 years agoUse the same RUSTFLAGS for building and testing `bootstrap`
Simon Sapin [Fri, 23 Mar 2018 18:55:41 +0000 (19:55 +0100)]
Use the same RUSTFLAGS for building and testing `bootstrap`

Fixes #49215

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 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 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 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 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 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 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 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 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 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.

6 years agoAuto merge of #49008 - kennytm:rollup, r=kennytm
bors [Wed, 14 Mar 2018 20:59:09 +0000 (20:59 +0000)]
Auto merge of #49008 - kennytm:rollup, r=kennytm

Rollup of 12 pull requests

- Successful merges: #48765, #48831, #48840, #48964, #48970, #48971, #48981, #48988, #48991, #48966, #48993, #48874
- Failed merges:

6 years agoUpdate E0601 test for new message format.
Eric Huss [Wed, 14 Mar 2018 20:04:24 +0000 (13:04 -0700)]
Update E0601 test for new message format.

6 years agoSome tweaks to "type parameters from outer function" diagnostic
Esteban Küber [Wed, 14 Mar 2018 05:58:45 +0000 (22:58 -0700)]
Some tweaks to "type parameters from outer function" diagnostic

Follow up to #47574.

6 years agoAdd backticks to `main` not found errors.
Eric Huss [Tue, 13 Mar 2018 18:22:43 +0000 (11:22 -0700)]
Add backticks to `main` not found errors.

6 years agoAdd suggestion where to add main function.
Eric Huss [Mon, 12 Mar 2018 20:23:12 +0000 (13:23 -0700)]
Add suggestion where to add main function.

6 years agoAdd empty main() to tests where it is missing.
Eric Huss [Mon, 12 Mar 2018 20:21:43 +0000 (13:21 -0700)]
Add empty main() to tests where it is missing.

6 years ago rustc_trans: fix small aggregate returns for big-endian mips64 FFI
dragan.mladjenovic [Wed, 14 Mar 2018 18:24:01 +0000 (19:24 +0100)]
 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 agoAdd crate name to "main function not found" error message.
Eric Huss [Sat, 3 Mar 2018 20:26:18 +0000 (12:26 -0800)]
Add crate name to "main function not found" error message.

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

6 years agoAuto merge of #49014 - Bobo1239:master, r=alexcrichton
bors [Wed, 14 Mar 2018 18:18:49 +0000 (18:18 +0000)]
Auto merge of #49014 - Bobo1239:master, r=alexcrichton

Update RLS

r? @alexcrichton
Includes https://github.com/rust-lang-nursery/rls/pull/762 which should fix the build.

6 years agoRollup merge of #48874 - jcowgill:mips-features, r=sanxiyn
kennytm [Wed, 14 Mar 2018 15:31:04 +0000 (23:31 +0800)]
Rollup merge of #48874 - jcowgill:mips-features, r=sanxiyn

bump mipsel isa leval and enable fpxx

This PR:
* Bumps the default ISA level of the mipsel targets to `mips32r2`. The big endian mips targets are already built with `mips32r2`. This is the usual baseline for the MIPS ISA these days used by other projects, although it does drop support for the 4K processor (which was the only processor released with mips32 r1). Debian no longer supports pre-R2 processors. Using R2 also improves code generation in FPXX in certain circumstances.
* Enables the FPXX floating point ABI[1] on 32-bit hard-float targets by default. This ABI adds some extra restrictions to the existing ABI which allows code to run on the two main floating point modes found on MIPS (FR0 and FR1) and remains compatible with the FR32 ABI currently in use. All code within an executable (including all shared libraries) must be compiled with FPXX/FP64 to be able to use MSA on 32-bit MIPS.
* Enables the "nooddspreg" feature with FPXX. This feature is usually enabled whenever FPXX is. It also helps workaround some issues on Loongson processors. I'm hoping this will fix some test failures mentioned in #39013.
* Adds the `fp64` feature to the MIPS whitelist. This feature must be enabled to use MSA on 32-bit MIPS, otherwise LLVM will complain.

[1] See https://dmz-portal.mips.com/wiki/MIPS_O32_ABI_-_FR0_and_FR1_Interlinking

6 years agoRollup merge of #48993 - alexheretic:fix-48816, r=michaelwoerister
kennytm [Wed, 14 Mar 2018 15:29:57 +0000 (23:29 +0800)]
Rollup merge of #48993 - alexheretic:fix-48816, r=michaelwoerister

fix #48816 don't print help on indirect compiler ICE

https://github.com/rust-lang/rust/issues/48816#issuecomment-372817573

6 years agoRollup merge of #48966 - retep007:hir-fingerprint-optimization, r=michaelwoerister
kennytm [Wed, 14 Mar 2018 15:26:28 +0000 (23:26 +0800)]
Rollup merge of #48966 - retep007:hir-fingerprint-optimization, r=michaelwoerister

Speed up SVH computation by using Fingerprint::combine()

Fix #47297

6 years agoRollup merge of #48991 - jsgf:remap-path-prefix, r=estebank
kennytm [Wed, 14 Mar 2018 08:29:54 +0000 (16:29 +0800)]
Rollup merge of #48991 - jsgf:remap-path-prefix, r=estebank

Clarify usage message for --remap-path-prefix.

6 years agoRollup merge of #48988 - bobtwinkles:add_48070_test, r=nikomatsakis
kennytm [Wed, 14 Mar 2018 08:29:53 +0000 (16:29 +0800)]
Rollup merge of #48988 - bobtwinkles:add_48070_test, r=nikomatsakis

Add a test for #48070

Resolves #48070.
The bug itself was fixed by #48770, but that PR didn't add a test for it.

r? @nikomatsakis

6 years agoRollup merge of #48981 - alexcrichton:lld-no-at-file, r=michaelwoerister
kennytm [Wed, 14 Mar 2018 08:29:51 +0000 (16:29 +0800)]
Rollup merge of #48981 - alexcrichton:lld-no-at-file, r=michaelwoerister

rustc: Don't invoke `lld` with an `@`-file

Looks like LLD doesn't support this yet, so always try to use the OS before we
fall back to using `@`

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

6 years agoRollup merge of #48971 - mark-i-m:fix_readmes, r=nikomatsakis
kennytm [Wed, 14 Mar 2018 08:29:49 +0000 (16:29 +0800)]
Rollup merge of #48971 - mark-i-m:fix_readmes, r=nikomatsakis

Move librustc_typeck READMEs 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/85

r? @nikomatsakis

6 years agoRollup merge of #48970 - GuillaumeGomez:doc-examples, r=QuietMisdreavus
kennytm [Wed, 14 Mar 2018 08:29:48 +0000 (16:29 +0800)]
Rollup merge of #48970 - GuillaumeGomez:doc-examples, r=QuietMisdreavus

Add missing examples

r? @QuietMisdreavus

6 years agoRollup merge of #48964 - QuietMisdreavus:picket-fence, r=GuillaumeGomez
kennytm [Wed, 14 Mar 2018 08:29:47 +0000 (16:29 +0800)]
Rollup merge of #48964 - QuietMisdreavus:picket-fence, r=GuillaumeGomez

tweak code fences in the rustdoc book

You can stack backticks to create "big code fences" if you're documenting some markdown and need to have code fences inside your code fences. This is especially important in this spot in the Rustdoc Book, because we're showing that using no language specifier on your code blocks is interpreted as using `rust`, but the code blocks here lose their code fences!

`````````markdown
``````markdown
Just showing some recursion, nbd.

```rust
println!("sup");
```
``````

(If you have edit powers in the rust-lang/rust repo, hit the edit button to view the source and see even more recursion :P)
`````````

6 years agoRollup merge of #48840 - varkor:idxset-cleanup, r=pnkfelix
kennytm [Wed, 14 Mar 2018 08:29:45 +0000 (16:29 +0800)]
Rollup merge of #48840 - varkor:idxset-cleanup, r=pnkfelix

Remove some unnecessary IdxSet methods

This replaces `IdxSet:: reset_to_empty` with `IdxSet:: clear`, and `IdxSet::elems`/`IdxSet::each_bit` with `IdxSet::iter`. Based on some [comments on #rustc](https://botbot.me/mozilla/rustc/2018-01-23/?msg=96063396).

r? @pnkfelix

6 years agoRollup merge of #48831 - GuillaumeGomez:fix-theme-blink, r=QuietMisdreavus
kennytm [Wed, 14 Mar 2018 08:29:43 +0000 (16:29 +0800)]
Rollup merge of #48831 - GuillaumeGomez:fix-theme-blink, r=QuietMisdreavus

Fix blink when main theme is selected

r? @QuietMisdreavus

6 years agoRollup merge of #48765 - Phlosioneer:10234-wall-help-message, r=estebank
kennytm [Wed, 14 Mar 2018 08:29:42 +0000 (16:29 +0800)]
Rollup merge of #48765 - Phlosioneer:10234-wall-help-message, r=estebank

Add info message for -Wall command

Users coming from other languages (namely C and C++) often expect
to use a -Wall flag. Rustc doesn't support that, and previously it
simply printed that it didn't recognize the "all" lint.

This change makes rustc print out a help message, explaining:
- Why there is no -Wall flag
- How to view all the available warnings
- Point out that the most commonly used warning is -Wunused
- Instead of using a command-line flag, the user should consider
  a !#[warn(unused)] directive in the root of their crate.

I tried to keep the language consistent with the other usage help. Comment if I should change anything.

closes #10234, if accepted.

6 years agoUpdate RLS
Boris-Chengbiao Zhou [Wed, 14 Mar 2018 14:03:42 +0000 (15:03 +0100)]
Update RLS

6 years agoAuto merge of #48864 - oli-obk:miri_incremental_regression, r=eddyb
bors [Wed, 14 Mar 2018 15:39:59 +0000 (15:39 +0000)]
Auto merge of #48864 - oli-obk:miri_incremental_regression, r=eddyb

Cache const eval queries

fixes #48846 (I think, still running more perf tests, but tuple-stress stops recomputing any constants)

r? @michaelwoerister

6 years agoAuto merge of #48811 - Zoxc:syntax-globals, r=michaelwoerister
bors [Wed, 14 Mar 2018 12:44:17 +0000 (12:44 +0000)]
Auto merge of #48811 - Zoxc:syntax-globals, r=michaelwoerister

Remove syntax and syntax_pos thread locals

This moves `syntax` and `syntax_pos` globals into a struct which are pointed to by thread locals. Most of the changes here are indentation changes in test. It would probably be a good idea to ignore whitespace changes while reviewing. Some indentation is unchanged to avoid merge conflicts.

r? @michaelwoerister

6 years agoRemove syntax and syntax_pos thread locals
John Kåre Alsaker [Wed, 7 Mar 2018 01:44:10 +0000 (02:44 +0100)]
Remove syntax and syntax_pos thread locals

6 years agotry_reserve: updating message for feature-gate-try_reserve.stderr
snf [Wed, 14 Mar 2018 10:48:04 +0000 (03:48 -0700)]
try_reserve: updating message for feature-gate-try_reserve.stderr

6 years agotry_reserve: disabling tests for asmjs, blocked by #48968
snf [Tue, 13 Mar 2018 10:41:45 +0000 (03:41 -0700)]
try_reserve: disabling tests for asmjs, blocked by #48968

6 years agoimplementing fallible allocation API (try_reserve) for Vec, String and HashMap
snf [Thu, 8 Mar 2018 14:36:43 +0000 (14:36 +0000)]
implementing fallible allocation API (try_reserve) for Vec, String and HashMap

6 years agoImplement import renaming with `_` (RFC 2166)
Vadim Petrochenkov [Sat, 10 Mar 2018 21:18:05 +0000 (00:18 +0300)]
Implement import renaming with `_` (RFC 2166)

6 years agoEscape stringified expression
Shotaro Yamada [Wed, 14 Mar 2018 09:11:42 +0000 (18:11 +0900)]
Escape stringified expression

Payload of `Literal` token must be escaped.
Also print printable non-ASCII characters.

6 years agoAuto merge of #48859 - bdrewery:update-libc, r=alexcrichton
bors [Wed, 14 Mar 2018 08:20:23 +0000 (08:20 +0000)]
Auto merge of #48859 - bdrewery:update-libc, r=alexcrichton

Update libc to 0.2.39

CC #42681

r? @alexcrichton

6 years agofix ui test error again
Andrew Cann [Wed, 14 Mar 2018 05:31:02 +0000 (13:31 +0800)]
fix ui test error again

6 years agoFixes after rebase
Andrew Cann [Wed, 14 Mar 2018 04:36:58 +0000 (12:36 +0800)]
Fixes after rebase

6 years agoregister removed lints
Andrew Cann [Wed, 14 Mar 2018 04:04:29 +0000 (12:04 +0800)]
register removed lints

6 years agoFix fallback note
Andrew Cann [Wed, 14 Mar 2018 04:03:33 +0000 (12:03 +0800)]
Fix fallback note

6 years agoAdd note about fallback to `!: !Trait` error
Andrew Cann [Mon, 12 Mar 2018 04:15:06 +0000 (12:15 +0800)]
Add note about fallback to `!: !Trait` error

6 years agoreally actually fix ui test error for real
Andrew Cann [Sat, 3 Mar 2018 05:12:50 +0000 (13:12 +0800)]
really actually fix ui test error for real

6 years agoreally fix ui test errors for real
Andrew Cann [Thu, 1 Mar 2018 05:54:20 +0000 (13:54 +0800)]
really fix ui test errors for real

6 years agoreally fix ui test errors
Andrew Cann [Thu, 1 Mar 2018 03:41:38 +0000 (11:41 +0800)]
really fix ui test errors

6 years agochange never_type stabilisation version
Andrew Cann [Wed, 28 Feb 2018 17:41:10 +0000 (01:41 +0800)]
change never_type stabilisation version

6 years agoFix ui test errors
Andrew Cann [Wed, 28 Feb 2018 17:26:51 +0000 (01:26 +0800)]
Fix ui test errors

6 years agoMake coerce_never lint an error
Andrew Cann [Thu, 1 Feb 2018 07:23:04 +0000 (15:23 +0800)]
Make coerce_never lint an error

Remove the coerce_never lint and make the behaviour an error.

6 years agoFix version number
Andrew Cann [Sun, 21 Jan 2018 10:30:04 +0000 (18:30 +0800)]
Fix version number

6 years agostabilise feature(never_type)
Andrew Cann [Sun, 21 Jan 2018 08:44:41 +0000 (16:44 +0800)]
stabilise feature(never_type)

Replace feature(never_type) with feature(exhaustive_patterns).
feature(exhaustive_patterns) only covers the pattern-exhaustives checks
that used to be covered by feature(never_type)

6 years agoremove defaulting to unit
Andrew Cann [Sun, 21 Jan 2018 05:33:21 +0000 (13:33 +0800)]
remove defaulting to unit

Types will no longer default to `()`, instead always defaulting to `!`.
This disables the associated warning and removes the flag from TyTuple

6 years agoAuto merge of #48684 - GuillaumeGomez:put-back-ui-json-check, r=petrochenkov
bors [Wed, 14 Mar 2018 01:40:42 +0000 (01:40 +0000)]
Auto merge of #48684 - GuillaumeGomez:put-back-ui-json-check, r=petrochenkov

Put back ui json check

r? @petrochenkov

6 years agoupdate tests
Guillaume Gomez [Sat, 3 Mar 2018 14:59:40 +0000 (15:59 +0100)]
update tests

6 years agotest for putting back check on json
Guillaume Gomez [Wed, 28 Feb 2018 15:17:44 +0000 (16:17 +0100)]
test for putting back check on json

6 years agoSpeed up SVH computation by using Fingerprint::combine()
Peter Hrvola [Fri, 23 Feb 2018 19:18:38 +0000 (20:18 +0100)]
Speed up SVH computation by using Fingerprint::combine()

Fix #47297

r? @michaelwoerister

6 years agofix #48816 don't print help on indirect compiler ICE
Alex Butler [Tue, 13 Mar 2018 21:03:22 +0000 (21:03 +0000)]
fix #48816 don't print help on indirect compiler ICE

6 years agoClarify usage message for --remap-path-prefix.
Jeremy Fitzhardinge [Tue, 13 Mar 2018 20:26:07 +0000 (13:26 -0700)]
Clarify usage message for --remap-path-prefix.

6 years agoAuto merge of #48735 - 1011X:master, r=alexcrichton
bors [Tue, 13 Mar 2018 19:50:13 +0000 (19:50 +0000)]
Auto merge of #48735 - 1011X:master, r=alexcrichton

Move ascii::escape_default to libcore

As requested in #46409, the `ascii::escape_default` method has been added to the core library. All I did was copy over the `std::ascii` module file, remove the (redundant) `AsciiExt` trait, and change some of the documentation to match. None of the tests were changed.

I wasn't sure how to handle the annotations. For `EscapeDefault` and `escape_default()`, I changed them to `#[unstable(feature = "core_ascii", issue = "46409")]`. Is that alright? Or should I leave them as they were?

6 years agoFix ICE on malformed plugin attributes
Michael Lamparski [Tue, 13 Mar 2018 19:12:15 +0000 (15:12 -0400)]
Fix ICE on malformed plugin attributes

6 years agoAdd test for issue 48941
Michael Lamparski [Tue, 13 Mar 2018 19:11:53 +0000 (15:11 -0400)]
Add test for issue 48941

A broken test to be fixed in the next commit.

6 years agoMove 48070 test to ui
bobtwinkles [Tue, 13 Mar 2018 18:52:11 +0000 (14:52 -0400)]
Move 48070 test to ui

6 years agoAdds a test for #48070
bobtwinkles [Tue, 13 Mar 2018 18:21:51 +0000 (14:21 -0400)]
Adds a test for #48070

Resolves #48070.
The bug itself was fixed by #48770, but that PR didn't add a test for it.

6 years agoAuto merge of #48411 - nikomatsakis:chalkify-canonical-query-mir, r=eddyb
bors [Tue, 13 Mar 2018 15:24:45 +0000 (15:24 +0000)]
Auto merge of #48411 - nikomatsakis:chalkify-canonical-query-mir, r=eddyb

introduce canonical queries, use for normalization and dropck-outlives

This branch adds in the concept of a **canonicalized trait query** and uses it for three specific operations:

- `infcx.at(cause, param_env).normalize(type_foldable)`
    - normalizes all associated types in `type_foldable`
- `tcx.normalize_erasing_regions(param_env, type_foldable)`
    - like normalize, but erases regions first and in the result; this leads to better caching
- `infcx.at(cause, param_env).dropck_outlives(ty)`
    - produces the set of types that must be live when a value of type `ty` is dropped
    - used from dropck but also NLL outlives

This is a kind of "first step" towards a more Chalk-ified approach. It leads to a **big** speedup for NLL, which is basically dominated by the dropck-outlives computation. Here are some timing measurements for the `syn` crate (pre-branch measurements coming soon):

| Commit | NLL disabled | NLL enabled |
| ------- | --- | --- |
| Before my branch | 5.43s | 8.99s |
| After my branch | 5.36s | 7.25s |

(Note that NLL enabled still does *all the work* that NLL disabled does, so this is not really a way to compare the performance of NLL versus the AST-based borrow checker directly.) Since this affects all codepaths, I'd like to do a full perf run before we land anything.

Also, this is not the "final point" for canonicalization etc. I think canonicalization can be made substantially faster, for one thing. But it seems like a reasonable starting point for a branch that's gotten a bit larger than I would have liked.

**Commit convention:** First of all, this entire branch ought to be a "pure refactoring", I believe, not changing anything about external behavior. Second, I've tagged the most important commits with `[VIC]` (very important commit), so you can scan for those. =)

r? @eddyb