This commit attempts to move more network operations to being retryable through
various operations. For example git submodule updates, downloading snapshots,
etc, are now all in retryable steps.
Hopefully this commit can cut down on the number of network failures we've been
seeing!
Add Gankro's table to nomicon/src/phantom-data.md
Original: https://github.com/rust-lang/rust/issues/30069#issuecomment-159928136
Testing confirms that:
- `PhantomData<fn() -> T>` does not actually enable drop checking.
- `PhantomData<fn(T) -> T>` is neither variant nor contravariant.
trans: don't ICE when trying to create ADT trans-items
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.
Beta-nominating because regression.
r? @michaelwoerister
add `-C overflow-checks` option
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.
I was seeing a [run-pass/issue-28950.rs](b1363a73ed/src/test/run-pass/issue-28950.rs) failure on my machine with these patches, but I was also seeing the failure without the changes to the core compiler. We'll see what travis says.
Fixes#33134. r? @alexcrichton
Added test for inclusive_range_syntax in compile-fail test suite
Fixes#39059
r? @est31
Forgot to leave a comment on the issue, hopefully nobody else is working on this one!
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.
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
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
Simplify/fix adaptive hashmap
Please see https://github.com/rust-lang/rust/pull/38368#issuecomment-280957863 for context.
The shift length math is broken. It turns out that checking for the shift length is complicated. Using simulations it's possible to see that a value of 2000 will only get probabilities down to ~1e-7 when the hashmap load factor is 90% (rust goes up to 90.9% as of today). That's probably not good enough to go into the stdlib with pluggable hashers.
So this PR simplify the adaptive behavior to only consider displacement, which is much safer and very useful by itself.
There's two comments because one of them is already being tested to be merged by bors.
check_match: don't treat privately uninhabited types as uninhabited
Fixes#38972, which is a regression in 1.16 from @canndrew's patchset.
r? @nikomatsakis
beta-nominating because regression.
Fix compilation on Redox
This updates the Redox sys module to fix compilation.
The functions peek and peek_from are added to TcpStream and UdpSocket as stubs. The sys::backtrace module is now included correctly