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