codegen: use "_N" (like for other locals) instead of "argN", for argument names.
Based on #64408 (second commit is new), fixing something I mentioned in #64408 (which turned to be an immediate blocker for unifying relevant codepaths).
Closes#64408 (by containing it).
r? @rkruppe
Remove raw string literal quotes from error index descriptions
The error index has unnecessary `r##"` and `"##` around the descriptions from #63721. Removing the `stringify` call removes them.
r? @Mark-Simulacrum
Inline `mark_neighbours_as_waiting_from`.
This function is very hot, doesn't get inlined because it's recursive,
and the function calls are significant.
This commit splits it into inlined and uninlined variants, and uses the
inlined variant for the hot call site. This wins several percent on a
few benchmarks.
r? @nikomatsakis
Trim rustc-workspace-hack
Those dependencies seem no longer necessary.
`./x.py test` and `x86_64-gnu-tools` container passed locally so I think this won't hurt.
Fast path for vec.clear/truncate
For trivial types like `u8`, `vec.truncate()`/`vec.clear()` relies on the optimizer to remove the loop. This means more work in debug builds, and more work for the optimizer.
Avoiding this busywork is exactly what `mem::needs_drop::<T>()` is for.
Box `DiagnosticBuilder`.
It's a large type -- 176 bytes on 64-bit. And it's passed around and
returned from a lot of functions, including within `PResult`.
This commit boxes it, which reduces memory traffic. In particular,
`PResult` shrinks to 16 bytes in the best case; this reduces instruction
counts by up to 2% on various workloads. The commit touches a lot of
lines but it's almost all trivial plumbing changes.
Shrink `ObligationCauseCode`
These commits reduce the size of `ObligationCauseCode` from 56 bytes to 32 bytes on 64-bit. This reduces instruction counts on various benchmarks by up to 1%, due to less `memcpy`ing.
Added table containing the system calls used by Instant and SystemTime.
# Description
See #32626 for a discussion on documenting system calls used by Instant and SystemTime.
## Changes
- Added a table containing the system calls used by each platform.
EDIT: If I can format this table better (due to the large links) please let me know.
I'd also be happy to learn a quick command to generate the docs on my host machine! Currently I am using: `python x.py doc --stage 0 src/libstd` but that gives me some `unrecognized intrinsic` errors. Advice is always welcome :)
closes#32626
[Place 2.0] Convert Place's projection to a boxed slice
This is still work in progress, it's not compiling right now I need to review a bit more to see what's going on but wanted to open the PR to start discussing it.
r? @oli-obk
This function is very hot, doesn't get inlined because it's recursive,
and the function calls are significant.
This commit splits it into inlined and uninlined variants, and uses the
inlined variant for the hot call site. This wins several percent on a
few benchmarks.
Update cargo
11 commits in fe0e5a48b75da2b405c8ce1ba2674e174ae11d5d..9655d70af8a6dddac238e3afa2fec75088c9226f
2019-09-04 00:51:27 +0000 to 2019-09-10 18:16:11 +0000
- Home docs: fix broken links, misspellings, style fixes, clarifications. (rust-lang/cargo#7348)
- add readme key to cargos manifest. (rust-lang/cargo#7347)
- Explicitly ignore some results (rust-lang/cargo#7340)
- Don't resolve std's optional dependencies (rust-lang/cargo#7337)
- Add `alloc` and `proc_macro` to libstd crates (rust-lang/cargo#7336)
- doc: capitalization change for consistency. (rust-lang/cargo#7334)
- Fix test for changes in plugin API. (rust-lang/cargo#7335)
- Fix some man pages where the files weren't rebuilt. (rust-lang/cargo#7332)
- guide: add section about the cargo home (rust-lang/cargo#7314)
- `map_dependencies` is doing a deep clone, so lets make it cheaper (rust-lang/cargo#7326)
- don't need to copy this string (rust-lang/cargo#7324)
rustdoc: change doctests locating rustc binary
We previously used the "naive" approach of replacing the `current_exe()`'s file name with rustc, but now load from the sysroot by default (`$sysroot/bin/rustc`). The functionality of locating the sysroot overlaps/is the same as the functionality used by codegen backend loading; this ensures that any failure cases we've introduced are not exceeding those, and that improvements to finding the sysroot for loading codegen backends likewise enhance rustdoc.
The second commit adds an unstable `--test-builder` flag to rustdoc, and is largely separate (I can split into separate PR, but it's a simple and related change). This is largely intended for "advanced" users at this point (I'm not sure if we'll ever stabilize it); it permits use of a different rustc binary for rustdoc compilation of doctests than the rustdoc binary used when loading. Note, that this may not be what you want as the parsers and such differ (and rustdoc uses its own libsyntax, etc.). However, I've been told that running doctests in miri may be assisted by this change, so I've implemented it; I'll file a tracking issue for it if there's interest in it (and we land this PR).
Avoid more `Symbol`-to-string operations
These commits avoid various `Symbol`-to-string conversions, by doing more operations directly on `Symbol`s. This requires adding a few more static `Symbol`s to the binary.
r? @petrochenkov