Commit graph

99012 commits

Author SHA1 Message Date
Mazdak Farrokhzad
70787c7d85
Rollup merge of #64423 - ollie27:mailmap, r=Mark-Simulacrum
Add self to .mailmap
2019-09-14 16:42:36 +02:00
Mazdak Farrokhzad
181d12938d
Rollup merge of #64422 - ollie27:error_index_generator_stringify, r=Mark-Simulacrum
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
2019-09-14 16:42:35 +02:00
Mazdak Farrokhzad
5e44c5f2d6
Rollup merge of #64420 - nnethercote:inline-mark_neighbours_as_waiting_from, 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
2019-09-14 16:42:33 +02:00
Mazdak Farrokhzad
f669872690
Rollup merge of #64393 - Wind-River:master_002_envKey, r=alexcrichton
declare EnvKey before use to fix build error

r? @alexcrichton
2019-09-14 16:42:32 +02:00
Mazdak Farrokhzad
f7dd5d0f20
Rollup merge of #64384 - mati865:tools_hack, r=alexcrichton
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.
2019-09-14 16:42:31 +02:00
Mazdak Farrokhzad
ae9d417f2a
Rollup merge of #64378 - Rosto75:master, r=jonas-schievink
Fix inconsistent link formatting.
2019-09-14 16:42:29 +02:00
Mazdak Farrokhzad
c6c2acdb47
Rollup merge of #64375 - kornelski:vecdrop, r=rkruppe
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.
2019-09-14 16:42:28 +02:00
Mazdak Farrokhzad
af33a1d902
Rollup merge of #64374 - nnethercote:box-DiagnosticBuilder, r=zackmdavis
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.
2019-09-14 16:42:26 +02:00
Mazdak Farrokhzad
1e2a97018f
Rollup merge of #64372 - Wind-River:master, r=alexcrichton
use randSecure and randABytes

r? @alexcrichton

cc @n-salim
2019-09-14 16:42:25 +02:00
Mazdak Farrokhzad
10541584d1
Rollup merge of #64302 - nnethercote:shrink-ObligationCauseCode, r=zackmdavis
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.
2019-09-14 16:42:23 +02:00
Mazdak Farrokhzad
afc52916f6
Rollup merge of #64203 - alexreg:rush-pr-2, r=centril
A few cosmetic improvements to code & comments in liballoc and libcore

Factored out from hacking on rustc for work on the REPL.

r? @Centril
2019-09-14 16:42:22 +02:00
Mazdak Farrokhzad
45baedb14b
Rollup merge of #64116 - ZeGentzy:patch-1, r=oli-obk
Fix minor typo in docs.

This comment is prolly refering to the comment in [const_eval_raw_provider](https://github.com/rust-lang/rust/pull/64116/files#diff-e0b58bb6712edaa8595ad7237542c958R616), not itself.
2019-09-14 16:42:20 +02:00
Mazdak Farrokhzad
baaaea3de3
Rollup merge of #63846 - DevQps:32626-document-time-system-calls, r=rkruppe
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
2019-09-14 16:42:19 +02:00
Vadim Petrochenkov
c681cf781b def_collector: Factor out common field handling code 2019-09-14 17:36:39 +03:00
Vadim Petrochenkov
fc9f13e424 def_collector: Do not ICE on attributes on unnamed fields 2019-09-14 17:36:39 +03:00
Alexander Regueiro
58a26c8fc0
Update src/liballoc/raw_vec.rs
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
2019-09-14 15:26:50 +01:00
bors
457666860c Auto merge of #64080 - estebank:parse-format-comma, r=zackmdavis
Be accurate on `format!` parse error expectations

Fix https://github.com/rust-lang/rust/issues/57277.
2019-09-14 06:10:08 +00:00
Hal Gentz
094af9743b
Update value.rs 2019-09-13 20:37:38 -06:00
12101111
e484f213ee add trailing newline 2019-09-14 03:23:58 +08:00
12101111
b98a844cf3 add ui test for #64430 2019-09-14 03:13:51 +08:00
12101111
57e82878c0 fix #64430 2019-09-14 02:40:20 +08:00
Eduard-Mihai Burtescu
bdad2c52a5 codegen: use "_N" (like for other locals) instead of "argN", for argument names. 2019-09-13 19:25:05 +03:00
bors
a6946a817a Auto merge of #63420 - spastorino:place2_5, r=oli-obk
[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
2019-09-13 15:37:15 +00:00
Felix S. Klock II
c529294535 Regression tests for fn ptr and #[structural_match] as discussed in #63479. 2019-09-13 17:08:01 +02:00
Felix S. Klock II
7437f77025 Make fn ptr always structural match, regardless of whether formal types are.
Fix #63479.
2019-09-13 17:06:09 +02:00
Christian Veenman
b3b671366b
Update src/libstd/time.rs
Co-Authored-By: Robin Kruppe <robin.kruppe@gmail.com>
2019-09-13 16:29:06 +02:00
Igor Matuszewski
0fafd615e5 save-analysis: Visit bounds in opaque types 2019-09-13 15:41:10 +02:00
Igor Matuszewski
b4151dd321 save-analysis: Use process_bounds when processing opaque impl item type
...since the code is literally the same and does the same thing.
2019-09-13 15:36:55 +02:00
Igor Matuszewski
6117faa809 save-analysis: Add a related test case 2019-09-13 15:31:50 +02:00
Igor Matuszewski
b456c820ff Always validate HIR ID for TypeckTables
Performance shouldn't be impacted (see [1] for a perf run) and this
should allow us to catch more bugs, e.g. [2] and [3].

[1]: https://github.com/rust-lang/rust/pull/64262
[2]: https://github.com/rust-lang/rust/pull/64250
[3]: https://github.com/rust-lang/rust/issues/57298
2019-09-13 15:31:50 +02:00
Igor Matuszewski
ab73b325b0 save-analysis: Nest typeck tables when processing functions/methods
Fixes an issue where we did not nest tables correctly when resolving
associated types in formal argument/return type positions
2019-09-13 15:31:50 +02:00
Santiago Pastorino
28db2c9e95
Make all projection base names be proj_base 2019-09-13 09:30:23 -03:00
Santiago Pastorino
6ffc20f6a3
Use if let here 2019-09-13 09:30:00 -03:00
Santiago Pastorino
98edaead82
Fix style in comments 2019-09-13 09:30:00 -03:00
Santiago Pastorino
07a706ecf5
Avoid math and use patterns to grab projection base 2019-09-13 09:29:57 -03:00
Oliver Middleton
69112a27fb Add self to .mailmap 2019-09-13 11:42:31 +01:00
Oliver Middleton
bd25507f0e Remove raw string literal quotes from error index descriptions 2019-09-13 11:37:29 +01:00
Guanqun Lu
a47a5c3a62 typo fix 2019-09-13 17:36:52 +08:00
bors
3287a65fc0 Auto merge of #64254 - aleksijuvani:fix-macos-sysroot, r=alexcrichton
Fix sysroot on macOS when cross-compiling and SDKROOT is set

Fixes rust-lang/cargo#7283
Closes rust-lang/cargo#7284

r? @alexcrichton
2019-09-13 09:19:43 +00:00
Nicholas Nethercote
a2261ad664 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.
2019-09-13 13:46:23 +10:00
bors
f43ac06534 Auto merge of #64361 - ehuss:update-cargo, r=alexcrichton
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)
2019-09-13 01:07:51 +00:00
bors
a5e3de3437 Auto merge of #64360 - varkor:foreign-items-diagnostic-const-generics, r=cramertj
Correct the polymorphic extern fn error for const parameters

Before, any polymorphism on extern functions was assumed to be type polymorphism.
2019-09-12 21:20:06 +00:00
Santiago Pastorino
232a4a2881
Destructure instead of using split_at 2019-09-12 16:03:38 -03:00
Santiago Pastorino
9c0bbe09e9
Use fold 2019-09-12 15:25:33 -03:00
Eduard-Mihai Burtescu
e9214a147b codegen: be more explicit about setting giving names to allocas. 2019-09-12 19:04:30 +03:00
Aleksi Juvani
fe6d626abc Ignore linker env vars set for macOS on iOS targets 2019-09-12 17:14:54 +03:00
bors
eb48d6bdee Auto merge of #64359 - varkor:opaque-ty-in-extern, r=estebank
Forbid opaque types in `extern "C"` blocks

Fixes #64338.
2019-09-12 12:40:31 +00:00
Mateusz Mikuła
612c3947b4 Trim rustc-workspace-hack 2019-09-12 14:12:12 +02:00
Aleksi Juvani
e715d03275 Remove env vars instead of setting them to an empty string 2019-09-12 13:47:17 +03:00
bors
28e85d7ae7 Auto merge of #64328 - Mark-Simulacrum:rustdoc-find-rustc, r=GuillaumeGomez
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).
2019-09-12 08:29:55 +00:00