Commit Graph

94874 Commits

Author SHA1 Message Date
bors
961a9d6e97 Auto merge of #61741 - Centril:rollup-fgro5kz, r=Centril
Rollup of 11 pull requests

Successful merges:

 - #61518 (Add loops to doc list of things not stable in const fn)
 - #61526 (move some tests into subfolders)
 - #61550 (Windows 10 SDK is also required now.)
 - #61606 (Remove some legacy proc macro flavors)
 - #61652 (Mention slice patterns in array)
 - #61686 (librustc_errors: Add some more documentation)
 - #61698 (typeck: Fix const generic in repeat param ICE.)
 - #61707 (Azure: retry failed awscli installs)
 - #61715 (make sure make_ascii_lowercase actually leaves upper-case non-ASCII characters alone)
 - #61724 (core: use memcmp optimization for 128 bit integer slices)
 - #61726 (Use `for_each` in `Iterator::partition`)

Failed merges:

r? @ghost
2019-06-11 23:29:20 +00:00
Niko Matsakis
5486a860f1 propagate depth that was reached, not just whether there was a cycle
I tried to propagate this information with the return value, but I
found a curiosity (actually, something that I'm not keen on in
general) -- in particular, the candidate cache urrently invokes
evaluation, which may detect a cycle, but the "depth" that results
from that are is easily propagated back out. This probably means that
the candidate caching mechanism *itself* is sort of problematic, but
I'm choosing to ignore that in favor of a more ambitious rewrite
later.
2019-06-11 19:07:32 -04:00
Niko Matsakis
e64a7bf64b introduce a stack depth 2019-06-11 19:07:32 -04:00
Niko Matsakis
db1dfb2f36 rename evaluate_obligation_recursively
It does not, in fact, execute in a recursive context.
2019-06-11 19:07:32 -04:00
Tyler Mandry
4f3cd3ca07 Fix x.py install
Make sure we look for save analysis in the right place. Fixes #61703.
2019-06-11 14:27:37 -07:00
Tyler Mandry
aeefbc4cba More review fixes 2019-06-11 14:26:07 -07:00
bors
5f3656ce9a Auto merge of #61735 - eddyb:must-use-life, r=oli-obk
Add deny(unused_lifetimes) to all the crates that have deny(internal).

@Zoxc brought up, regarding #61722, that we don't force the removal of unused lifetimes.
Turns out that it's not that bad to enable for compiler crates (I wonder why it's not `warn` by default?).

I would've liked to enable `single_use_lifetimes` as well, but https://github.com/rust-lang/rust/issues/53738 makes it unusable for now.

For the `rustfmt` commit, I used https://github.com/rust-lang/rustfmt/issues/1324#issuecomment-482109952, and manually filtered out some noise.

r? @oli-obk cc @rust-lang/compiler
2019-06-11 20:45:17 +00:00
Ralf Jung
87d5fe0e53 is_fp and is_floating_point do the same thing, remove the former
also consistently mark all these is_* methods for inlining
2019-06-11 19:46:16 +02:00
Mazdak Farrokhzad
681712be09
Rollup merge of #61726 - cuviper:partition-for_each, r=scottmcm
Use `for_each` in `Iterator::partition`

We already use this for `unzip`, but `partition` is not much different.
2019-06-11 17:14:12 +02:00
Mazdak Farrokhzad
2f1d360206
Rollup merge of #61724 - aschampion:128-bit-memcmp, r=sfackler
core: use memcmp optimization for 128 bit integer slices

All other sized integer slices do this. From #61665.
2019-06-11 17:14:11 +02:00
Mazdak Farrokhzad
231b0375f6
Rollup merge of #61715 - RalfJung:test-ascii-lowercase, r=varkor
make sure make_ascii_lowercase actually leaves upper-case non-ASCII characters alone

Cc https://github.com/rust-lang/rust/pull/61677 @napen123
2019-06-11 17:14:09 +02:00
Mazdak Farrokhzad
e6a948feb7
Rollup merge of #61707 - wesleywiser:awscli_retry, r=alexcrichton
Azure: retry failed awscli installs

Fixes #61604

r? @pietroalbini
2019-06-11 17:14:08 +02:00
Mazdak Farrokhzad
bd57c187fb
Rollup merge of #61698 - davidtwco:ice-const-generic-length, r=varkor
typeck: Fix const generic in repeat param ICE.

Fixes #61336. Turns out this wasn't related to #49147 after all.

r? @varkor
2019-06-11 17:14:04 +02:00
Mazdak Farrokhzad
b3169552e2
Rollup merge of #61686 - phansch:librustc_errors_docs, r=estebank
librustc_errors: Add some more documentation

r? @estebank
2019-06-11 17:14:03 +02:00
Mazdak Farrokhzad
79ac254703
Rollup merge of #61652 - JohnTitor:docs-improve-array, r=Centril
Mention slice patterns in array

Fixes #61650

r? @scottmcm
2019-06-11 17:14:01 +02:00
Mazdak Farrokhzad
b4419a8b05
Rollup merge of #61606 - petrochenkov:legclean, r=pnkfelix
Remove some legacy proc macro flavors

Namely
- `IdentTT` (`foo! ident { ... }`). Can be replaced with `foo! { ident ... }` or something similar.
- `MultiDecorator`. Can be replaced by `MultiModifier` (aka `LegacyAttr` after renaming).
- `DeclMacro`. It was a less powerful duplicate of `NormalTT` (aka `LegacyBang` after renaming) and can be replaced by it.

Stuff like this slows down any attempts to refactor the expansion infra, so it's desirable to retire it already.
I'm not sure whether a lang team decision is necessary, but would be nice to land this sooner because I have some further work in this area scheduled.

The documentation commit (a9397fd0d5) describes how the remaining variants are different from each other and shows that there's actually some system behind them.

The last commit renames variants of `SyntaxExtension` in more systematic way.
- `ProcMacro` -> `Bang`
- `NormalTT` -> `LegacyBang`
- `AttrProcMacro` -> `Attr`
- `MultiModifier` -> `LegacyAttr`
- `ProcMacroDerive` -> `Derive`
- `BuiltinDerive` -> `LegacyDerive`

All the `Legacy*` variants are AST-based, as opposed to "modern" token-based variants.
2019-06-11 17:13:59 +02:00
Mazdak Farrokhzad
b81986c2af
Rollup merge of #61550 - jacobsun:patch-1, r=alexcrichton
Windows 10 SDK is also required now.
2019-06-11 17:13:58 +02:00
Mazdak Farrokhzad
c2bb8b9c08
Rollup merge of #61526 - lcnr:test_reorder, r=nikomatsakis
move some tests into subfolders

This reduces the size of the test folders without making the moved tests harder to find.

Is this kind of change desired/worth the effort?
2019-06-11 17:13:56 +02:00
Mazdak Farrokhzad
17393b26b9
Rollup merge of #61518 - czipperz:const-fn-doc-disallow-loops, r=Centril
Add loops to doc list of things not stable in const fn

Closes #61508
2019-06-11 17:13:54 +02:00
Alex Crichton
f2c37a55a4 ci: Collect CPU usage statistics on Azure
This commit adds a script which we'll execute on Azure Pipelines which
is intended to run in the background and passively collect CPU usage
statistics for our builders. The intention here is that we can use this
information over time to diagnose issues with builders, see where we can
optimize our build, fix parallelism issues, etc. This might not end up
being too useful in the long run but it's data we've wanted to collect
for quite some time now, so here's a stab at it!

Comments about how this is intended to work can be found in the python
script used here to collect CPU usage statistics.

Closes #48828
2019-06-11 06:56:30 -07:00
Eduard-Mihai Burtescu
1d720ec27c Run rustfmt --file-lines ... for changes from previous commits. 2019-06-11 14:11:59 +03:00
Eduard-Mihai Burtescu
630ec8880c Add deny(unused_lifetimes) to all the crates that have deny(internal). 2019-06-11 14:11:59 +03:00
Eduard-Mihai Burtescu
4a219685ff rustdoc: deny(unused_lifetimes). 2019-06-11 14:11:59 +03:00
Eduard-Mihai Burtescu
8ee1814062 rustc_codegen_*: deny(unused_lifetimes). 2019-06-11 14:11:58 +03:00
Eduard-Mihai Burtescu
7b353f215f rustc_borrowck: deny(unused_lifetimes). 2019-06-11 14:11:58 +03:00
Eduard-Mihai Burtescu
8dddfde6e3 rustc_traits: deny(unused_lifetimes). 2019-06-11 14:11:58 +03:00
Eduard-Mihai Burtescu
d110d309b6 rustc_mir: deny(unused_lifetimes). 2019-06-11 14:11:58 +03:00
Eduard-Mihai Burtescu
7dc34945e4 rustc_lint: deny(unused_lifetimes). 2019-06-11 14:11:58 +03:00
Eduard-Mihai Burtescu
26a03405a5 rustc_incremental: deny(unused_lifetimes). 2019-06-11 14:11:58 +03:00
Eduard-Mihai Burtescu
774724be3c rustc: deny(unused_lifetimes). 2019-06-11 14:11:58 +03:00
Eduard-Mihai Burtescu
ce0ba38921 syntax_ext: deny(unused_lifetimes). 2019-06-11 14:11:58 +03:00
Eduard-Mihai Burtescu
4d426bb1c0 rustc_target: deny(unused_lifetimes). 2019-06-11 14:11:58 +03:00
bors
8e948df707 Auto merge of #60463 - mjbshaw:transparent, r=varkor,rkruppe
Implement RFC 2645 (transparent enums and unions)

Tracking issue: #60405
2019-06-11 11:06:38 +00:00
Mateusz Mikuła
7d3211339b Migrate rust-by-example to MdBook2 2019-06-11 11:49:38 +02:00
bors
912d22e369 Auto merge of #61673 - RalfJung:miri-no-hard-float, r=eddyb,oli-obk
Miri: convert to/from apfloat instead of host floats

Cc @oli-obk @eddyb
2019-06-11 08:15:12 +00:00
bors
9d9c7ad323 Auto merge of #61492 - RalfJung:const-qualif-comments, r=eddyb
Const qualification comments

I extracted some const-qualif knowledge from @eddyb. This is my attempt to turn that into comments.

Cc @oli-obk 	@eddyb
2019-06-11 05:24:41 +00:00
Michael Bradshaw
dac1c6a731 Implement RFC 2645 (transparent enums and unions)
Tracking issue: #60405
2019-06-10 22:07:24 -07:00
Petr Hosek
48f205d496 Pass LLVM linker flags to librustc_llvm build
Some -L and -l flags may be needed even when building librustc_llvm,
for example when using static libc++ on Linux we may need to manually
specify the library search path and -ldl -lpthread as additional link
dependencies. We pass LLVM linker flags from config to librustc_llvm
build to make sure these cases are handled.
2019-06-10 19:50:34 -07:00
bors
efc30d0cda Auto merge of #61052 - jsgf:emit-save-analysis-notifications, r=alexcrichton
Emit save analysis notifications

Addresses issue https://github.com/rust-lang/rust/issues/61047
2019-06-11 02:25:39 +00:00
bors
5e2c11034f Auto merge of #60793 - Xanewok:raw-string-cleanup, r=petrochenkov
lexer: Disallow bare CR in raw byte strings

Handles bare CR ~but doesn't translate `\r\n` to `\n` yet in raw strings yet~ and translates CRLF to LF in raw strings.

As a side-note I think it'd be good to change the `unescape_` to return plain iterators to reduce some boilerplate (e.g. `has_error` could benefit from collecting `Result<T>` and aborting early on errors) but will do that separately, unless I missed something here that prevents it.

@matklad @petrochenkov thoughts?
2019-06-10 23:32:12 +00:00
Tyler Mandry
9f3ad881df Extract generator_layout as a method 2019-06-10 14:48:58 -07:00
Tyler Mandry
c158d1ca0c Extract univariant_uninterned as method 2019-06-10 14:48:58 -07:00
Tyler Mandry
fbdff56f4b Use DataflowResultsConsumer and remove dataflow::for_each_location 2019-06-10 14:48:58 -07:00
Tyler Mandry
6680d03d14 Use BitMatrix for storage conflicts 2019-06-10 14:48:56 -07:00
Tyler Mandry
66e7493543 Add more functionality to BitMatrix 2019-06-10 14:46:40 -07:00
Tyler Mandry
a38991f755 Small review fixes 2019-06-10 14:46:39 -07:00
Tyler Mandry
63d73fd70b Add test suite 2019-06-10 14:43:59 -07:00
Tyler Mandry
9de451c6d6 Only include generator saved locals in the variants that need them 2019-06-10 14:43:59 -07:00
Tyler Mandry
786875824c Overlap locals that never have storage live at the same time
...and are only included in a single variant.
2019-06-10 14:43:59 -07:00
Tyler Mandry
f9f8bfabf0 Collect conflict information in GeneratorLayout 2019-06-10 14:43:57 -07:00