Commit Graph

75550 Commits

Author SHA1 Message Date
kennytm
5a7aa6cae5
Rollup merge of #49007 - estebank:follow-up-47574, r=oli-obk
Some tweaks to "type parameters from outer function" diagnostic

Follow up to #47574.
2018-03-16 05:35:12 +08:00
kennytm
bf270bb66a
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
2018-03-16 01:49:47 +08:00
kennytm
97b489ef39
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.
2018-03-16 01:49:45 +08:00
kennytm
292c6ca041
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
2018-03-16 01:49:44 +08:00
kennytm
35b008cb92
Rollup merge of #48957 - Eijebong:rand, r=michaelwoerister
Dedupe rand
2018-03-16 01:49:43 +08:00
kennytm
e1d19df9a5
Rollup merge of #48922 - petrochenkov:asunder, r=nikomatsakis
Implement import renaming with `_` (RFC 2166)

cc https://github.com/rust-lang/rust/issues/48216
2018-03-16 01:49:42 +08:00
kennytm
68a602efa9
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.
2018-03-16 01:49:41 +08:00
kennytm
da88827267
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*.
2018-03-16 01:49:39 +08:00
kennytm
a45b79ddb7
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.
2018-03-16 01:49:38 +08:00
bors
ff2d506c2c 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.
2018-03-15 13:16:09 +00:00
bors
a4af6f089b 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.
2018-03-15 08:18:58 +00:00
Esteban Küber
1bbd4fd395 Add span label to E0044 2018-03-14 19:14:30 -07:00
Esteban Küber
bfc66daef9 Review comment: remove mention of move closure 2018-03-14 18:05:55 -07:00
Esteban Küber
cb5667eaa5 Make hint clearer, with the potential of being wrong 2018-03-14 18:04:21 -07:00
Esteban Küber
fe1975448c Suggest using move when trying to share ...::channel::{Receiver, Sender}
Extend `rustc_on_unimplemented` to match on ADT without evaluating type
arguments.
2018-03-14 18:04:20 -07:00
Esteban Küber
6d8a173980 Reword E0044 and message for !Send types
- Reword E0044 help.
 - Change error message for types that don't implement `Send`
2018-03-14 18:04:20 -07:00
bors
5ebf74851d 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.
2018-03-14 23:43:04 +00:00
bors
521d91c6be 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:
2018-03-14 20:59:09 +00:00
Eric Huss
5257275294 Update E0601 test for new message format. 2018-03-14 13:04:24 -07:00
Esteban Küber
16d424f147 Some tweaks to "type parameters from outer function" diagnostic
Follow up to #47574.
2018-03-14 12:35:25 -07:00
Eric Huss
2f1b34cc15 Add backticks to main not found errors. 2018-03-14 12:23:29 -07:00
Eric Huss
b08e6d305f Add suggestion where to add main function. 2018-03-14 12:23:29 -07:00
Eric Huss
6aa4dcb9cf Add empty main() to tests where it is missing. 2018-03-14 12:23:28 -07:00
Eric Huss
b4b7ccbd1c Add crate name to "main function not found" error message.
Fixes #44798 and rust-lang/cargo#4948.
2018-03-14 11:40:13 -07:00
bors
e96e54d3d4 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.
2018-03-14 18:18:49 +00:00
kennytm
beab2e6608
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
2018-03-15 00:15:57 +08:00
kennytm
508ffa3352
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
2018-03-15 00:15:56 +08:00
kennytm
6639b60ec6
Rollup merge of #48966 - retep007:hir-fingerprint-optimization, r=michaelwoerister
Speed up SVH computation by using Fingerprint::combine()

Fix #47297
2018-03-15 00:15:55 +08:00
kennytm
55e5ba3b81
Rollup merge of #48991 - jsgf:remap-path-prefix, r=estebank
Clarify usage message for --remap-path-prefix.
2018-03-15 00:15:54 +08:00
kennytm
4074bafcf1
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
2018-03-15 00:15:52 +08:00
kennytm
088bf643bd
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
2018-03-15 00:15:51 +08:00
kennytm
ff80cde998
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
2018-03-15 00:15:50 +08:00
kennytm
c144fb79cd
Rollup merge of #48970 - GuillaumeGomez:doc-examples, r=QuietMisdreavus
Add missing examples

r? @QuietMisdreavus
2018-03-15 00:15:49 +08:00
kennytm
57f76783be
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)
`````````
2018-03-15 00:15:47 +08:00
kennytm
b5f102c7ae
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
2018-03-15 00:15:46 +08:00
kennytm
c65ee94365
Rollup merge of #48831 - GuillaumeGomez:fix-theme-blink, r=QuietMisdreavus
Fix blink when main theme is selected

r? @QuietMisdreavus
2018-03-15 00:15:45 +08:00
kennytm
4ea78d4c84
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.
2018-03-15 00:15:44 +08:00
Boris-Chengbiao Zhou
c21480233e Update RLS 2018-03-14 16:51:41 +01:00
bors
11d9959641 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
2018-03-14 15:39:59 +00:00
bors
d089fe974e 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
2018-03-14 12:44:17 +00:00
John Kåre Alsaker
cbdf4ec03e Remove syntax and syntax_pos thread locals 2018-03-14 11:56:01 +01:00
snf
06057d9143 try_reserve: updating message for feature-gate-try_reserve.stderr 2018-03-14 03:48:42 -07:00
snf
b08b5ae0ec try_reserve: disabling tests for asmjs, blocked by #48968 2018-03-14 03:48:42 -07:00
snf
92bfcd2b19 implementing fallible allocation API (try_reserve) for Vec, String and HashMap 2018-03-14 03:48:42 -07:00
Vadim Petrochenkov
12ac032c72 Implement import renaming with _ (RFC 2166) 2018-03-14 12:32:53 +03:00
bors
24e679c375 Auto merge of #48859 - bdrewery:update-libc, r=alexcrichton
Update libc to 0.2.39

CC #42681

r? @alexcrichton
2018-03-14 08:20:23 +00:00
Andrew Cann
a8a0c69191 fix ui test error again 2018-03-14 13:31:02 +08:00
Andrew Cann
b1526ca384 Fixes after rebase 2018-03-14 12:45:14 +08:00
Andrew Cann
81ae93e339 register removed lints 2018-03-14 12:44:52 +08:00
Andrew Cann
00a52a2be3 Fix fallback note 2018-03-14 12:44:52 +08:00