Commit Graph

99517 Commits

Author SHA1 Message Date
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
Andreas Jonson
166719ad9f Update installed compiler dependencies
there is a soft-error for older toolchains
from https://reviews.llvm.org/D57264 in preparation for the
hard error in https://reviews.llvm.org/D66188
2019-09-14 10:49:56 +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
Mark Rousskov
0ad789aa5b Stylistic fix -- remove double impl 2019-09-13 19:44:45 -04:00
Mark Rousskov
6e0b0d4d70 Move cache into Context, avoid TLS
This doesn't move everything over as cache() is pretty annoying to
remove fully, but it gets the ball rolling.
2019-09-13 19:44:45 -04:00
Mark Rousskov
f5ed0fd1c0 Move Cache generation to separate module 2019-09-13 19:44:45 -04:00
Mark Rousskov
f4bb5a7c1a Move playground to shared context 2019-09-13 19:44:45 -04:00
Mark Rousskov
c26518086e Move error codes to shared context 2019-09-13 19:44:45 -04:00
Mark Rousskov
98c94f6f77 Move edition field out of Context 2019-09-13 19:44:44 -04:00
Mark Rousskov
e0e0c3787c Replace SlashChecker with ensure_trailing_slash 2019-09-13 19:44:44 -04:00
Mark Rousskov
aa4055cd6c Simplify render_spotlight_traits 2019-09-13 19:44:44 -04:00
Mark Rousskov
3f144e119e Move Toc printing from fmt::Display 2019-09-13 19:44:44 -04:00
Mark Rousskov
8a9dab3a20 Remove *Space wrappers in favor of direct impls or functions 2019-09-13 19:44:44 -04:00
Mark Rousskov
ec349bef24 Unwrap Visibility fields
There's not really any reason to not have the visibility default to
inherited, and this saves us the trouble of checking everywhere for
whether we have a visibility or not.
2019-09-13 19:44:44 -04:00
Mark Rousskov
04b27efa00 Move to print functions on types instead of impl fmt::Display
This will eventually allow us to easily pass in more parameters to the
functions without TLS or other such hacks
2019-09-13 19:44:44 -04: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