Specify behavior of `write_all` for `ErrorKind::Interrupted` errors
Also spell out that read and write operations should be retried on
`ErrorKind::Interrupted` errors.
Fixes#38494.
Adds rust-windbg.cmd script
Adds rust-gdb/rust-lldb equivalent for windbg that loads the Rust .natvis files on start.
This change modifies the bootstrap code to add rust-windbg to bin and the .natvis files to lib/rustlib/etc.
Example usage from cmd or PowerShell:
```
rust-windbg -c "bu rs_f442289d74765418!rs::main;g" target\debug\rs.exe
```
Check privacy of trait items in all contexts
Fixes https://github.com/rust-lang/rust/issues/28514
This is a sufficiently rare scenario and it's currently guarded by `private_in_public` lint, so it shouldn't be a [breaking-change] in practice.
Run tests for the cargo submodule in tree
Previously the `cargotest` suite would run some arbitrary revision of Cargo's
test suite, but now that we're bundling it in tree we should be running the
Cargo submodule's test suite instead.
Implement Vec::splice and String::splice (RFC 1432)
RFC: rust-lang/rfcs#1432, tracking issue: #32310
A rebase of https://github.com/rust-lang/rust/pull/32355 with a few more tests.
Let me know if you have any ideas for more tests.
cc @SimonSapin
LLVM 4.0 Upgrade
Since nobody has done this yet, I decided to get things started:
**Todo:**
* [x] push the relevant commits to `rust-lang/llvm` and `rust-lang/compiler-rt`
* [x] cleanup `.gitmodules`
* [x] Verify if there are any other commits from `rust-lang/llvm` which need backporting
* [x] Investigate / fix debuginfo ("`<optimized out>`") failures
* [x] Use correct emscripten version in docker image
---
Closes#37609.
---
**Test results:**
Everything is green 🎉
Previously the `cargotest` suite would run some arbitrary revision of Cargo's
test suite, but now that we're bundling it in tree we should be running the
Cargo submodule's test suite instead.
traits::select: quickly filter out predicates from other traits
this improves most pre-trans passes's performance by ~1%.
That missed the spring cleaning PR because I wanted to ship it.
r? @eddyb
cache dtorck constraints on ADTs
This avoids visiting the fields of all structs multiple times, improving item-bodies checking time by 10% (!).
Not sure whether we want this in 1.18 or 1.19. It's a big-ish patch, but the 10% win is very tempting.
r? @eddyb
rustc: generalize monomorphic_const_eval to polymorphic constants.
With the addition of `Substs` to the query key, we can now evaluate *and cache* polymorphic constants.
Fixes#23898 by replacing the crippled explicit-discriminant-only local-crate-only `lookup_variant_by_id` with `ConstVal::Variant` which can describe variants irrespective of their discriminant.
Fixes#41394 by fixing #23898 (for the original testcase) and by not looping past the first discriminant.
In some cases (e.g. <[int-var] as Add<[int-var]>>), selection can turn up
a large number of candidates. Bailing out early avoids O(n^2) performance.
This improves item-type checking time by quite a bit, resulting in ~2% of total
time-to-typeck.