Commit graph

94749 commits

Author SHA1 Message Date
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
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
Josh Stone
c127f537e9 Use for_each in Iterator::partition
We already use this for `unzip`, but `partition` is not much different.
2019-06-10 14:17:48 -07:00
Vadim Petrochenkov
93eb63c9a5 syntax: Rename variants of SyntaxExtension for consistency 2019-06-10 21:34:26 +03:00
Vadim Petrochenkov
0468eb63ad syntax: Improve documentation of SyntaxExtension 2019-06-10 21:33:33 +03:00
Vadim Petrochenkov
8edbbacbca syntax: Remove SyntaxExtension::DeclMacro
It's a less powerful duplicate of `SyntaxExtension::NormalTT`
2019-06-10 21:33:31 +03:00
Vadim Petrochenkov
edb925a91f syntax: Use MultiItemModifier for built-in derives 2019-06-10 21:32:48 +03:00
Vadim Petrochenkov
5a6ebec018 syntax: Remove SyntaxExtension::MultiDecorator and MultiItemDecorator 2019-06-10 21:25:56 +03:00
bors
02564de47b Auto merge of #61694 - Xanewok:update-rls, r=kennytm
Update RLS

This includes https://github.com/rust-lang/rls/pull/1482 which should finally fix the spurious tests RLS in Rust CI (test-pass -> test-fail).

r? @oli-obk
cc @ehuss
2019-06-10 18:24:43 +00:00
Vadim Petrochenkov
97f4e700c2 syntax: Remove SyntaxExtension::IdentTT and IdentMacroExpander 2019-06-10 21:19:40 +03:00
Andrew Champion
d3461bf6a0 core: use memcmp optimization for 128 bit integer slices 2019-06-10 18:08:05 +01:00
Jeremy Fitzhardinge
7a22c34be7 Emit artifact notifications for save-analysis output
Issue: https://github.com/rust-lang/rust/issues/61047
2019-06-10 09:43:58 -07:00
David Wood
9ed4674269
typeck: Fix const generic in repeat param ICE.
This commit fixes an ICE that occured when a const generic was used in
a repeat expression. This was due to the code expecting the length of
the repeat expression to be const evaluatable to a constant, but a const
generic parameter is not (however, it can be made into a constant).
2019-06-10 16:58:47 +01:00
Igor Matuszewski
630d5f355f Don't suggest using \r in raw strings 2019-06-10 17:32:15 +02:00
bors
a73ecb3d9c Auto merge of #61716 - Centril:rollup-nxwf5ol, r=Centril
Rollup of 5 pull requests

Successful merges:

 - #59600 (Replaced linear token counting macros with optimized implementation)
 - #61501 (get rid of real_intrinsics module)
 - #61570 (Fix issues with const argument inference)
 - #61683 (Haiku: the maximum stack size is 16 MB)
 - #61697 (submodules: update clippy from 71be6f62 to c0dbd34b)

Failed merges:

r? @ghost
2019-06-10 11:15:07 +00:00
Mazdak Farrokhzad
f90d34874e
Rollup merge of #61697 - matthiaskrgr:submodule_upd, r=Manishearth
submodules: update clippy from 71be6f62 to c0dbd34b

Changes:
````
travis: disable rls integration test.
rustup https://github.com/rust-lang/rust/pull/61669/
Add OUTER_EXPN_INFO lint
````

Should fix clippy toolstate
2019-06-10 13:14:32 +02:00
Mazdak Farrokhzad
2bb390b281
Rollup merge of #61683 - nielx:haiku-stack-limit, r=nagisa
Haiku: the maximum stack size is 16 MB

This keeps the compiler from crashing every time it is invoked. No functional change on other platforms.

This patch is similar to the limitation that is in the [librustdoc/lib.rs](57e13e0325/src/librustdoc/lib.rs (L89)).
2019-06-10 13:14:31 +02:00
Mazdak Farrokhzad
e181139162
Rollup merge of #61570 - varkor:infer-const-arg, r=eddyb
Fix issues with const argument inference

Fixes https://github.com/rust-lang/rust/issues/60724.
Fixes https://github.com/rust-lang/rust/issues/61346.

r? @eddyb
2019-06-10 13:14:29 +02:00