Commit Graph

75708 Commits

Author SHA1 Message Date
kennytm
90230ce372
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.
2018-03-16 05:36:46 +08:00
kennytm
55a0075a20
Rollup merge of #49042 - kennytm:fix-e0307-typo, r=rkruppe
Remove unnecessary "`" in error message E0307 (invalid self type).
2018-03-16 05:35:20 +08:00
kennytm
77cf02de18
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.
2018-03-16 05:35:18 +08:00
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
John Kåre Alsaker
72cb109bec Faster submodule updating 2018-03-15 21:12:25 +01:00
Esteban Küber
4d5cd21a0d Coherence diagnostic tweaks 2018-03-15 11:59:54 -07:00
Anthony Defranceschi
5e991e1b7e Improve AddrParseError documentation.
Add a potential cause to `AddrParseError` raising.
2018-03-15 19:27:02 +01:00
Niko Matsakis
4eaa85d3be
add xref to rust-guide 2018-03-15 14:27:00 -04: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
snf
9e64946bde setting ABORTING_MALLOC for asmjs backend 2018-03-15 17:43:05 +00:00
gnzlbg
f173a4c064 add missing min-llvm-version 2018-03-15 18:42:53 +01:00
Mazdak Farrokhzad
6fbdaf4209 unstabilize FusedIterator for Flatten since Flatten is unstable 2018-03-15 18:04:45 +01:00
bors
3926453944 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
2018-03-15 16:00:40 +00:00
gnzlbg
19b81f6114 error via bug! instead of stderr+terminate 2018-03-15 16:51:58 +01:00
gnzlbg
4fe6acf972 add compile fail tests 2018-03-15 16:36:02 +01: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
Michael Woerister
5218c2d5ef Properly handle collecting default impls of methods with lifetime parameters. 2018-03-15 13:37:46 +01:00
Michael Woerister
b41f2278f4 MonoItem collector: Cleanup start fn root collection. 2018-03-15 12:53:20 +01:00
kennytm
b6ec75fe62
Remove unnecessary "`" in error message E0307 (invalid self type). 2018-03-15 17:59:17 +08:00
gnzlbg
8478fa2007 add min-llvm version to reduction tests 2018-03-15 10:10:16 +01:00
gnzlbg
3125a30759 error on vector reduction usage if LLVM version is < 5.0 2018-03-15 10:08:22 +01:00
kennytm
939cfa251a
Keep the fields of RangeInclusive unstable. 2018-03-15 17:01:30 +08:00
kennytm
6399d16cfd
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.
2018-03-15 16:58:03 +08:00
kennytm
a4d80336c9
Stabilize dotdoteq_in_patterns language feature.
Stabilize `match 2 { 1..=3 => {} }`.
2018-03-15 16:58:02 +08:00
kennytm
92d1f8d8e4
Stabilize inclusive_range_syntax language feature.
Stabilize the syntax `a..=b` and `..=b`.
2018-03-15 16:58:02 +08:00
kennytm
b5913f2e76
Stabilize inclusive_range library feature.
Stabilize std::ops::RangeInclusive and std::ops::RangeInclusiveTo.
2018-03-15 16:58:01 +08: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
Wesley Wiser
5766e71fa7 Cache the specialization_graph query
Fixes #48987
2018-03-14 21:01:31 -04: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
John Kåre Alsaker
65b4990253 Use a single Lock for CodeMap.stable_id_to_filemap and CodeMap.files 2018-03-15 00:43:03 +01:00
John Kåre Alsaker
8395ce9451 Require the code mapper to be thread-safe 2018-03-15 00:43:03 +01:00
John Kåre Alsaker
a857e6003e Make CodeMap thread-safe 2018-03-15 00:43:02 +01:00
John Kåre Alsaker
426c51d6ea Make FileMap thread-safe 2018-03-15 00:43:02 +01:00
John Kåre Alsaker
26fe97f1f9 Require a thread-safe file loader 2018-03-15 00:43:02 +01:00
Niko Matsakis
f9bf827055 resolve '_ in dyn Trait just like ordinary elision
cc #48468
2018-03-14 19:39:28 -04:00
gnzlbg
c990fa0d88 add dummy symbols for LLVM<6 2018-03-14 22:12:38 +01: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