Commit Graph

61733 Commits

Author SHA1 Message Date
Christopher Serr
275e9bb51b Turn off Vectorization for Emscripten
When targeting Emscripten, rustc emits Vector Instructions by default.
However Web Assembly doesn't support Vector Instructions yet, which
causes Binaryen to fail converting the intermediate asm.js code to Web
Assembly. While asm.js kind of supports Vector Instructions, they
aren't supported by any browser other than Firefox, often meaning that
they need to be emulated very slowly. So it should just be turned off
for all Emscripten targets.

Fixes #38558
2017-02-20 23:29:02 +01:00
arthurprs
25b1488918 Simplify adaptive hashmap 2017-02-20 23:19:41 +01:00
bors
a17e5e2949 Auto merge of #39717 - pnkfelix:check-timestamps-in-compiletest-miropt, r=alexcrichton
When compiletest'ing src/test/mir-opt, check timestamps.

The tests in src/test/mir-opt embed references to generated files. The names of the generated files embed node id's, which will change depending on the content of the original source.

To guard against comparisons against stale output, check the timestamps of the supposed output against the timestamp of the original source (i.e. any output should be at least as new as the source that was recompiled).

Fix #39690.
2017-02-20 21:31:17 +00:00
bors
c1368fc4f4 Auto merge of #39981 - frewsxcv:rollup, r=frewsxcv
Rollup of 3 pull requests

- Successful merges: #39913, #39937, #39976
- Failed merges:
2017-02-20 18:58:28 +00:00
Ariel Ben-Yehuda
a84eb95a7d check_match: don't treat privately uninhabited types as uninhabited
Fixes #38972.
2017-02-20 20:36:30 +02:00
Corey Farwell
9a8dbbe918 Rollup merge of #39976 - steveklabnik:reenable-book-linkchecker, r=frewsxcv
Reenable linkchecker for books

In some senses, this is a revert of cacb3bc9c7 (diff-b64563d143f859565c8357a28ef81101R212); we disabled linkchecker for the book because the links were added by JavaScript. Now, that's fixed upstream, and so we can re-enable the checker.

This also involves two other fixes: we have to check for `name`s as well as `id`s for links, and the linking algorithm of mdBook changed to the same as rustdoc's, so we change some links back.

~~~This isn't quite ready yet; it's [depending on a PR of mine to mdBook](https://github.com/azerupi/mdBook/pull/209). After that's released, this should be the last of these kinds of shenanigans~~~ 😄

This is good to go 😄
2017-02-20 12:42:55 -05:00
Corey Farwell
7ef0192532 Rollup merge of #39937 - arthurprs:hm-adapt, r=frewsxcv
Fix spelling in hashmap comments

Fixing my bad english from #38368

Note to self: triple check spelling/grammar
2017-02-20 12:42:54 -05:00
Corey Farwell
8918ceb67a Rollup merge of #39913 - nikomatsakis:inference-error, r=pnkfelix
Report full details of inference errors

When the old suggestion machinery was removed by @brson in https://github.com/rust-lang/rust/pull/37057, it was not completely removed. There was a bit of code that had the job of going through errors and finding those for which suggestions were applicable, and it remained, causing us not to emit the full details of such errors.  This PR removes that.

I've also added various lifetime tests to the UI test suite (so you can also see the before/after there). I have some concrete thoughts on how to improve these cases and am planning on writing those up in some mentoring issues (@CengizIO has expressed interest in working on those changes, so I plan to work with him on it, at least to start).

cc @jonathandturner
2017-02-20 12:42:53 -05:00
Guillaume Gomez
0a45dd7e71 Add tests for newly added error codes 2017-02-20 17:47:44 +01:00
Guillaume Gomez
ea2a684099 Add error codes for errors in libsyntax 2017-02-20 17:47:44 +01:00
Steve Klabnik
010a28de7c Update mdBook version
This brings in a needed bugfix.
2017-02-20 11:17:55 -05:00
Steve Klabnik
fc7bf8498b Enable linkchecker on books
Previously, mdBook used JavaScript to add header links, so we
skipped checking the book. As of
https://github.com/rust-lang/rust/pull/39966, it no longer does,
so we can start checking again.

There is a twist, though: it uses name instead of id, so let's test
for both. They're both valid links anyway, so it's good to have the
checker check anyway.
2017-02-20 11:17:53 -05:00
Felix S. Klock II
6a78282607 Fix #39690: make mir-opt mode for compiletest check timestamps.
This version removes prior use of `time` crate, to satisify vendoring requirements.

remove extraneous whitespace change
2017-02-20 17:00:37 +01:00
bors
5b7c556385 Auto merge of #39748 - Rufflewind:master, r=steveklabnik
Rust Book: Generics: Resolving ambiguities

- Add a small section to generics.md to explain how ambiguities in type inference can be resolved using the `::<>` syntax.
- Add links from syntax-index.md and iterators.md.
- Minor edits to iterators.md and structs.md.
2017-02-20 15:06:07 +00:00
Steve Klabnik
b4cd3d9206 Revert "Fix up links"
This reverts commit 7f1d1c6d9a.

The original commit was created because mdBook and rustdoc had
different generation algorithms for header links; now with
https://github.com/rust-lang/rust/pull/39966 , the algorithms
are the same. So let's undo this change.

... when I came across this problem, I said "eh, this isn't fun,
but it doesn't take that long." I probably should have just actually
taken the time to fix upstream, given that they were amenable. Oh
well!
2017-02-20 09:09:12 -05:00
bors
cfebdeaacc Auto merge of #39965 - ArtBears:master, r=steveklabnik
Fixed a typo in CONTRIBUTING.md

Small change to the CONTRIBUTING.md file.

r? @steveklabnik
2017-02-20 10:58:36 +00:00
bors
941d494a6a Auto merge of #39923 - mattyw:patch-1, r=steveklabnik
Variable Bindings possible nitpick

Complete drive by nitpick I'm afraid
2017-02-20 08:16:31 +00:00
Tatsuyuki Ishi
df285693da bootstrap: stop trashing (DY)LD_LIBRARY_PATH
This generated an ugly error with fakeroot before.
2017-02-20 15:46:52 +09:00
bors
e06774ece3 Auto merge of #39304 - jrmuizel:drop-flags, r=steveklabnik
Remove obsolete documentation about drop-flags
2017-02-20 05:51:11 +00:00
bors
322f0d7055 Auto merge of #39966 - steveklabnik:update-mdbook, r=GuillaumeGomez
Update mdbook version

This version of mdbook includes
https://github.com/azerupi/mdBook/pull/207 , which is needed so that
we can start doing linkchecker on the various books.
2017-02-20 03:27:06 +00:00
Phil Ruffwind
cc000599b8 Rust Book: Generics: Resolving ambiguities
- Add a small section to generics.md to explain how ambiguities in type
  inference can be resolved using the ::<> syntax.
- Add links from syntax-index.md and iterators.md.
- Minor edits to iterators.md and structs.md.
2017-02-19 22:24:45 -05:00
Steve Klabnik
2795de3c07 Update dependencies
In order to update mdbook, we have to update other stuff too.
2017-02-19 19:20:57 -05:00
Steve Klabnik
7726735636 Update mdbook version
This version of mdbook includes
https://github.com/azerupi/mdBook/pull/207 , which is needed so that
we can start doing linkchecker on the various books.
2017-02-19 19:17:16 -05:00
Guillaume Gomez
e606a43320 Fix rustdoc test with new file path 2017-02-20 01:12:21 +01:00
bors
f57a027f71 Auto merge of #39955 - mp4096:master, r=GuillaumeGomez
Docs: Better explanation of return values for min, max functions for the Iterator trait

Added an explanation that `None` is returned if an iterator is empty.

Also added examples for `max` and `min`. I chose not to add examples for other functions like `max_by_key` etc. so that the examples stay concised and focused on the main functionality.
2017-02-20 00:00:53 +00:00
Glyne J. Gittens
9a6a72b818 Merge branch 'master' of https://github.com/rust-lang/rust 2017-02-19 17:32:21 -05:00
Glyne J. Gittens
b3f61ce538 Removed a typo from CONTRIBUTING.md 2017-02-19 17:30:50 -05:00
Niko Matsakis
75da4b663e fix run-pass test that required Copy impl 2017-02-19 15:33:47 -05:00
bors
0e77277950 Auto merge of #39939 - petrochenkov:regres, r=eddyb
Fix two ICEs in path resolution

Fixes https://github.com/rust-lang/rust/issues/39535
Fixes https://github.com/rust-lang/rust/issues/39559
Fixes https://github.com/rust-lang/rust/issues/39924

r? @eddyb
2017-02-19 17:52:54 +00:00
Jakob Demler
198208be0e Fixed some small issues 2017-02-19 18:15:44 +01:00
bors
0128be9ad7 Auto merge of #39871 - binarycrusader:issue-39868, r=alexcrichton
libstd needs update for pending libc change

This  updates libstd to accommodate the fixes made in https://github.com/rust-lang/libc/pull/523

Fixes #39868
2017-02-19 11:21:09 +00:00
Mikhail Pak
eee6752b97 Docs: Better explanation of return values for min, max functions
Explain that a None is returned if the iterator is empty.
2017-02-19 11:01:02 +01:00
bors
aff6161a9e Auto merge of #39912 - nikomatsakis:incr-comp-trait-select-no-vec, r=eddyb
rework `TraitSelect` to avoid a vec and just use two def-ids

r? @eddyb
2017-02-19 06:30:38 +00:00
Vadim Petrochenkov
9322a38534 Use ARM instead of SystemZ for testing not installed targets 2017-02-19 02:54:51 +03:00
Sean Griffin
ec648a1ab3 Fix indentation of error message
So I just encountered this error for the first time. It's unclear what
it means, why I encountered it, or how to fix it. But worst of all, it
has a random newline and weird indentation! This commit fixes that last
bit.
2017-02-18 16:39:55 -05:00
Vadim Petrochenkov
8c7d0077ab Avoid ICE in Self::Assoc in impl headers 2017-02-19 00:34:08 +03:00
Vadim Petrochenkov
bf95c29c98 Privatize fields of PathResolution
Ensure Def::Err has depth == 0
2017-02-19 00:34:08 +03:00
Taylor Cramer
a611bbcceb Rename hir::Label to hir::Destination 2017-02-18 12:43:29 -08:00
Taylor Cramer
56e519dd5c Add tests for control flow in while condition 2017-02-18 12:43:25 -08:00
Taylor Cramer
4d65622dcd Properly implement labeled breaks in while conditions 2017-02-18 12:28:44 -08:00
arthurprs
3b4412aa62 Fix spelling in comments 2017-02-18 21:06:00 +01:00
bors
306035c217 Auto merge of #39933 - GuillaumeGomez:rollup, r=GuillaumeGomez
Rollup of 5 pull requests

- Successful merges: #39847, #39862, #39898, #39904, #39928
- Failed merges:
2017-02-18 17:10:34 +00:00
Guillaume Gomez
98c2cf2ae5 Rollup merge of #39928 - GuillaumeGomez:env_func_urls, r=frewsxcv
Add missing urls for env functions

r? @frewsxcv
2017-02-18 18:10:15 +01:00
Guillaume Gomez
a7e2227bdd Rollup merge of #39904 - Stebalien:cleanup-string-split-off, r=frewsxcv
Fixup String::split_off documentation

1. Clarify that `String::split_off` returns one string and modifies self in-place. The documentation implied that it returns two new strings.

2. Make the documentation mirror `Vec::split_off`.
2017-02-18 18:10:14 +01:00
Guillaume Gomez
33d1346588 Rollup merge of #39898 - king6cong:logic_clean, r=alexcrichton
code order tweak
2017-02-18 18:10:13 +01:00
Guillaume Gomez
e4c285d1ac Rollup merge of #39862 - stjepang:fix-wording-localkey, r=GuillaumeGomez
Fix wording in LocalKey documentation

Fixes #39841

r? @GuillaumeGomez
2017-02-18 18:10:12 +01:00
Guillaume Gomez
e49f76f72e Rollup merge of #39847 - CBenoit:patch-1, r=frewsxcv
Correct a typo in procedural macros chapter of the Book.

A simple and short correction for procedural macros chapter of the Rust Programming Language Book.
2017-02-18 18:10:11 +01:00
Vadim Petrochenkov
0c4c6fdb6c Rebuild mingw startup objects only when necessary 2017-02-18 20:10:01 +03:00
Guillaume Gomez
84aca88cda Add missing urls for env functions 2017-02-18 14:44:56 +01:00
bors
8f2fc9db15 Auto merge of #39887 - nikomatsakis:issue-39292, r=arielb1
erase late bound regions in `get_vtable_methods()`

Higher-ranked object types can otherwise cause late-bound regions to
sneak into the substs, leading to the false conclusion that some method
is unreachable.

r? @arielb1, who wrote the heart of this patch anyhow

Fixes #39292
2017-02-18 12:17:06 +00:00