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.
ADTs are translated in-place from rustc_trans::callee, so no trans-items
are needed.
This fix will be superseded by the shimmir branch, but I prefer not to
backport that to beta.
Fixes#39823.
This commit searchs modules for macro suggestions.
It also removes imported macro_rules from macro_names,
and adds more corner case checks for which macros
should be suggested in specific contexts.
Create the Unstable Book
Part of https://github.com/rust-lang/rust/issues/39588
This isn't done yet. To do:
- [x] import the nightly book contents here
- [ ] possibly write some more chapters
This will _not_ be done before it lands; that's part of the whole unstable thing.
In addition to defining and handling the new option, we also add a
method on librustc::Session for determining the necessity of overflow
checks. This method provides a single point to sort out the three (!)
different ways for turning on overflow checks: -C debug-assertions, -C
overflow-checks, and -Z force-overflow-checks.
Fixes#33134.
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.