Commit Graph

61723 Commits

Author SHA1 Message Date
Steve Klabnik
f16c48e713 Import basic book contents 2017-02-21 21:12:53 -05:00
Steve Klabnik
a1301c3495 Create "The Unstable Book"
part of #39588
2017-02-21 21:12:52 -05:00
Raph Levien
163698c45f Switch Fuchsia to readdir (instead of readdir_r)
The readdir_r function is deprecated on newer Posix systems because of
various problems, and not implemented at all for Fuchsia. There are
already implementations using both, and this patch switches Fuchsia
over to the readdir-based one.

Fixes #40021 for Fuchsia, but that issue also contains discussion of
what should happen for other Posix systems.
2017-02-21 15:55:47 -08:00
bors
fc6f092c21 Auto merge of #39855 - steveklabnik:mdbook-reference, r=GuillaumeGomez
Port the reference to mdbook

Part of #39588.

This is only a work in progress. Still left to do:

- [x] double check contents weren't duplicated/lost with the move to individual pages (I'm going to do this)
- [x] fix up links [and footnotes](https://github.com/rust-lang/rust/pull/39855#issuecomment-280168170) (@frewsxcv has volunteered to help with this)
- [x] change `src/doc/reference.md` to redirect to the book
- [x] move the reference on the doc index to be part of the bookshelf
2017-02-21 23:46:20 +00:00
Alex Crichton
347e1af66b std: Relax UnwindSafe impl for Unique
Add the `?Sized` bound as we don't require the type to be sized.

Closes #40011
2017-02-21 14:36:24 -08:00
Alex Crichton
9a08f40349 travis: Move -mrelax-relocations to Docker config
This doesn't belong in rustbuild itself, and now that we have only rustbuild we
can move this out of the build system.
2017-02-21 14:22:48 -08:00
Alex Crichton
305aca86f9 travis: Compile a more compatible libc.a for musl
The mitigations for #34978 involve passing `-Wa,-mrelax-relocations=no` to all C
code we compile, and we just forgot to pass it when compiling musl itself.

Closes #39979
2017-02-21 14:22:42 -08:00
bors
0f34b532af Auto merge of #39765 - GuillaumeGomez:file-not-found-for-module-error, r=jseyfried
File not found for module error

Fixes #39542.

r? @jonathandturner

Maybe you want to take a look @pnkfelix?
2017-02-21 21:08:11 +00:00
James Miller
d80cf80b16 Update codegen test with new attributes 2017-02-22 09:49:12 +13:00
Guillaume Gomez
58a9dd3f7e Add missing urls and examples into Barrier structs 2017-02-21 21:12:35 +01:00
Alex Crichton
40aaa65734 test: Verify all sysroot crates are unstable
As we continue to add more crates to the compiler and use them to implement
various features we want to be sure we're not accidentally expanding the API
surface area of the compiler! To that end this commit adds a new `run-make` test
which will attempt to `extern crate foo` all crates in the sysroot, verifying
that they're all unstable.

This commit discovered that the `std_shim` and `test_shim` crates were
accidentally stable and fixes the situation by deleting those shims. The shims
are no longer necessary due to changes in Cargo that have happened since they
were originally incepted.
2017-02-21 11:38:17 -08:00
Steve Klabnik
55c02f6bcc move the reference to the bookshelf 2017-02-21 14:03:15 -05:00
Steve Klabnik
54baed6dc1 Redirect to the new reference 2017-02-21 14:03:13 -05:00
Steve Klabnik
9e9552048e Add footnote style.
Until https://github.com/azerupi/mdBook/issues/210 is resolved,
we'll import the css file.
2017-02-21 14:03:11 -05:00
Steve Klabnik
3eb8434150 Get linkchecker clean
This affects the book, some missed things in the reference, the grammar,
and the standard library. Whew!
2017-02-21 14:02:12 -05:00
Steve Klabnik
4305b67d31 statements and expressions 2017-02-21 14:02:02 -05:00
Steve Klabnik
0c5e17a2e5 types 2017-02-21 14:02:00 -05:00
Steve Klabnik
3de961972f memory model 2017-02-21 14:01:58 -05:00
Corey Farwell
465a2bd75f Items 2017-02-21 14:01:55 -05:00
Steve Klabnik
c0b40e1b5c linkage 2017-02-21 14:01:52 -05:00
Steve Klabnik
ac4c55e944 unsafety 2017-02-21 14:01:50 -05:00
Steve Klabnik
093380acdc influences 2017-02-21 14:01:48 -05:00
Corey Farwell
227aae3e63 Items and attributes 2017-02-21 14:01:46 -05:00
Corey Farwell
d1f046fe89 Crates and source files 2017-02-21 14:01:44 -05:00
Corey Farwell
cdcc0f3850 Procedural macros 2017-02-21 14:01:42 -05:00
Corey Farwell
b443c5ee22 Macros By Example 2017-02-21 14:01:40 -05:00
Corey Farwell
a486dcbd97 Macros 2017-02-21 14:01:38 -05:00
Corey Farwell
49cea270d1 Paths 2017-02-21 14:01:37 -05:00
Corey Farwell
c6275c4b76 Tokens 2017-02-21 14:01:35 -05:00
Corey Farwell
94f3c1eee8 Comments 2017-02-21 14:01:33 -05:00
Corey Farwell
72497d5d13 Identifiers 2017-02-21 14:01:31 -05:00
Corey Farwell
fd272161cb String table productions 2017-02-21 14:01:29 -05:00
Corey Farwell
bb6b578e0b Unicode productions 2017-02-21 14:01:27 -05:00
Corey Farwell
c5cac872c8 Introduction 2017-02-21 14:01:25 -05:00
Steve Klabnik
287a3457bc clean up some things
I double checked that everything is here and in the correct order; this fixes things up
2017-02-21 14:01:23 -05:00
Steve Klabnik
c937254357 Start the port of the reference to mdBook
This only really moves the files, there's a lot more work coming
in the next commits.

Part of #39588.
2017-02-21 14:00:47 -05:00
bors
8a1ce4020c Auto merge of #39874 - amosonn:master, r=alexcrichton
Fixes overflow in libsdt/io/cursor.rs "seek"

Fixes #39631
Test which fails (with old implementation), then fix to implementation.
2017-02-21 16:04:44 +00:00
Guillaume Gomez
b6818be41d Add long error explanations 2017-02-21 15:52:14 +01:00
James Miller
7af3406a49 Set metadata for vtable-related loads
Give LLVM much more information about vtable pointers. Without the extra
information, LLVM has to be rather pessimistic about vtables, preventing
a number of obvious optimisations.

* Makes the vtable pointer argument noalias and readonly.
* Marks loads of the vtable pointer as nonnull.
* Marks load from the vtable with `!invariant.load` metadata.

Fixes #39992
2017-02-21 21:08:06 +13:00
bors
3954c70537 Auto merge of #39990 - CryZe:emscripten-no-vectorization, r=alexcrichton
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-21 04:36:46 +00:00
Jorge Aparicio
0b06db57d1 incr-comp: track the -Z sanitizer flag
closes #39611
2017-02-20 22:34:42 -05:00
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