Commit Graph

99149 Commits

Author SHA1 Message Date
Santiago Pastorino
8ee77a268f
Use try_fold instead of manually carrying an accumulator 2019-09-14 19:51:40 -03:00
Mark Rousskov
1d33f06de8 Don't mark expression with attributes as not needing parentheses
This is not perfectly correct as `#[attr] (5)` will still not lint, but
it does seem good enough, in particular as the parentheses in that case
are not unambiguously incorrect.
2019-09-14 18:43:48 -04:00
Igor Matuszewski
a946b8d6e1 save-analysis: Process bounds in impl trait only in argument position 2019-09-15 00:42:33 +02:00
Igor Matuszewski
30e39e871f save-analysis: Deduplicate lookup_{d,r}ef_id functions 2019-09-15 00:42:33 +02:00
Jonas Schievink
dab68131d3 Try to fix the test output normalization 2019-09-14 23:02:22 +02:00
bors
b35ebac961 Auto merge of #64466 - Centril:rollup-s3nlb9e, r=Centril
Rollup of 4 pull requests

Successful merges:

 - #61797 (Stabilise weak_ptr_eq)
 - #64290 (Provide a span if main function is not present in crate)
 - #64406 (Ban non-extern rust intrinsics)
 - #64462 (feature_gate: Remove dead code from attribute checking)

Failed merges:

r? @ghost
2019-09-14 20:16:54 +00:00
Mazdak Farrokhzad
45e50e2fd2
Rollup merge of #64462 - petrochenkov:remattr, r=Centril
feature_gate: Remove dead code from attribute checking

https://github.com/rust-lang/rust/pull/63468 is merged, so all attributes go through name resolution now, so we can remove code that previously performed some checks for attributes not going through resolution.
2019-09-14 22:16:07 +02:00
Mazdak Farrokhzad
5f9b9b275a
Rollup merge of #64406 - Mark-Simulacrum:error-unknown-intrinsic, r=Centril
Ban non-extern rust intrinsics

Intrinsics can only be defined by the compiler.

Fixes https://github.com/rust-lang/rust/issues/36979
2019-09-14 22:16:06 +02:00
Mazdak Farrokhzad
d29df01b08
Rollup merge of #64290 - Mark-Simulacrum:span-no-main, r=estebank
Provide a span if main function is not present in crate

Unfortunately, the diagnostic machinery does not cope well with an empty
span which can happen if the crate is empty, in which case we merely set
a spanless note.

Tests are already updated for this change, so a dedicated test is not added.

Resolves #36561.
2019-09-14 22:16:05 +02:00
Mazdak Farrokhzad
dee08ba55a
Rollup merge of #61797 - Thomasdezeeuw:stablise-weak_ptr_eq, r=RalfJung
Stabilise weak_ptr_eq

Implemented in #55987.

Closes #55981.
2019-09-14 22:16:03 +02:00
Vadim Petrochenkov
f6a5b29d19 resolve: Tweak some expected/found wording 2019-09-14 22:36:58 +03:00
Vadim Petrochenkov
cb771fdd6c feature_gate: Eliminate check::Context
Use `PostExpansionVisitor` directly instead
2019-09-14 21:59:03 +03:00
Vadim Petrochenkov
a01ba39b4b feature_gate: Merge various attribute gating functions 2019-09-14 21:54:26 +03:00
Vadim Petrochenkov
966d96c9d2 feature_gate: Remove dead code from attribute checking
Same checks are performed during name resolution, and all attributes go through name resolution now
2019-09-14 21:54:26 +03:00
mark
2a774b1e6b address Centril's comments 2019-09-14 11:26:59 -05:00
Mark Rousskov
7b3adc289e Ban non-extern rust intrinsics
Intrinsics can only be defined by the compiler.
2019-09-14 11:47:02 -04:00
Mark Rousskov
b7f20d06ea Provide a span if main function is not present in crate
Unfortunately, the diagnotic machinery does not cope well with an empty
span which can happen if the crate is empty, in which case we merely set
a spanless note.
2019-09-14 11:27:45 -04:00
bors
ca3766e2e5 Auto merge of #64456 - Centril:rollup-ytqdwaq, r=Centril
Rollup of 17 pull requests

Successful merges:

 - #63846 (Added table containing the system calls used by Instant and SystemTime.)
 - #64116 (Fix minor typo in docs.)
 - #64203 (A few cosmetic improvements to code & comments in liballoc and libcore)
 - #64302 (Shrink `ObligationCauseCode`)
 - #64372 (use randSecure and randABytes)
 - #64374 (Box `DiagnosticBuilder`.)
 - #64375 (Fast path for vec.clear/truncate )
 - #64378 (Fix inconsistent link formatting.)
 - #64384 (Trim rustc-workspace-hack)
 - #64393 ( declare EnvKey before use to fix build error)
 - #64420 (Inline `mark_neighbours_as_waiting_from`.)
 - #64422 (Remove raw string literal quotes from error index descriptions)
 - #64423 (Add self to .mailmap)
 - #64425 (typo fix)
 - #64431 (fn ptr is structural match)
 - #64435 (codegen: use "_N" (like for other locals) instead of "argN", for argument names.)
 - #64439 (fix #64430, confusing `owned_box` error message in no_std build)

Failed merges:

r? @ghost
2019-09-14 14:43:32 +00:00
Mazdak Farrokhzad
1c7959bb5d
Rollup merge of #64439 - 12101111:fix-owned-box, r=Centril
fix #64430, confusing `owned_box` error message in no_std build

Fixes #64430
2019-09-14 16:42:42 +02:00
Mazdak Farrokhzad
bf1253b347
Rollup merge of #64435 - eddyb:arguments-against-arg, r=rkruppe
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
2019-09-14 16:42:40 +02:00
Mazdak Farrokhzad
5160e4bf91
Rollup merge of #64431 - pnkfelix:issue-63479-fnptr-is-structural-match, r=varkor
fn ptr is structural match

Make fn ptr always structural match, regardless of whether the formal parameter types or return type are.

Fix #63479.
2019-09-14 16:42:39 +02:00
Mazdak Farrokhzad
4398eb7b54
Rollup merge of #64425 - guanqun:typo-fix, r=matthewjasper
typo fix
2019-09-14 16:42:38 +02:00
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
Ralf Jung
766c4a556e build-manifest: when Miri tests are not passing, do not add Miri component 2019-09-14 12:57:39 +02:00
Ralf Jung
ee83402918 when BUILD_MANIFEST_DISABLE_SIGNING is set, we don't need gpg-password-file 2019-09-14 12:49:04 +02:00
Ralf Jung
dac0a158eb rename the crate, not the feature 2019-09-14 12:12:32 +02:00
Ralf Jung
b60954757e std: always depend on backtrace, but only enable its features on demand 2019-09-14 10:23:51 +02: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
Eric Huss
88e755607b Fix build script sanitizer check. 2019-09-13 20:59:46 -07: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