about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2019-11-23Derive HashStable for TokenKind.Camille GILLOT-79/+12
2019-11-23Use proc-macro for TokenTree.Camille GILLOT-21/+2
2019-11-23Implement HashStable for Span in libsyntax_pos.Camille GILLOT-93/+100
2019-11-23Move CachingSourceMapView to libsyntax_pos.Camille GILLOT-4/+5
2019-11-23Rename StableHashingContextLike to HashStableContext.Camille GILLOT-11/+11
2019-11-22Fix rebase fallout.Camille GILLOT-0/+1
2019-11-22Retire impl_stable_hash_for.Camille GILLOT-117/+6
2019-11-22Retire impl_stable_hash_for_spanned.Camille GILLOT-32/+1
2019-11-22Derives for ast.Camille GILLOT-25/+4
2019-11-22Invert implementations for TokenKind.Camille GILLOT-52/+55
Also export a bunch of Token-related impls.
2019-11-22Export HashStable for DelimSpan, Lit and Path.Camille GILLOT-26/+13
2019-11-22Derive HashStable_Generic for Ident.Camille GILLOT-7/+2
2019-11-22Derive HashStable_Generic for ExpnData.Camille GILLOT-12/+2
2019-11-22Invert flow in impl HashStable of Span.Camille GILLOT-13/+22
2019-11-22Add StableHashingContextLike to HashStable_Generic derive.Camille GILLOT-0/+20
2019-11-22Revert "Revert expansion of impl HashStable for Frame."Camille GILLOT-12/+20
This reverts commit 579625b9e738e606b91fa315c75ab4909fa090be.
2019-11-22Auto merge of #66460 - cjgillot:hashstable_generic, r=Zoxcbors-424/+162
Add a proc-macro to derive HashStable in librustc dependencies A second proc-macro is added to derive HashStable for crates librustc depends on. This proc-macro HashStable_Generic (to bikeshed) allows to decouple code and some librustc's boilerplate. Not everything is migrated, because `Span` and `TokenKind` require to be placed inside librustc. Types using them stay there too. Split out of #66279 r? @Zoxc
2019-11-22Auto merge of #66565 - Mark-Simulacrum:syntax-cfg-mod, r=petrochenkovbors-58/+34
Move process_configure_mod to rustc_parse This removes the hack in favor of perhaps a less principled, but less painful, approach. This also supports my work to decouple `Session` from librustc, as `ParseSess` currently has `Attribute` as "part" of it but after this PR will no longer do so.
2019-11-22Auto merge of #66537 - nnethercote:delay-is_local_ever_initialized, r=spastorinobors-12/+12
Delay an `is_local_ever_initialized` call. This commit moves the call after a `return` that almost always runs. It speeds up the `unicode_normalization` benchmark by about 2%. r? @spastorino
2019-11-22Auto merge of #66524 - ecstatic-morse:compiletest-multiple-revisions, r=Centrilbors-61/+55
Support multiple revisions in `compiletest` The `//[X]~` syntax filters errors for tests that are run across multiple cfgs with `// revisions:`. This commit extends that syntax to accept `//[X,Y]~`, which will match multiple cfgs to the same error annotation. This is functionally the same as writing two comments, `//[X]~` and `//[Y]~`, but can fit on a single line. While refactoring `compiletest` to support this, I also uncovered a small bug that was causing an incremental test to always pass, despite no errors being emitted. r? @Centril
2019-11-22Auto merge of #66282 - Centril:simplify-try, r=oli-obkbors-12/+431
[mir-opt] asking `?`s in a more optimized fashion This PR works towards https://github.com/rust-lang/rust/issues/66234 by providing two optimization passes meant to run in sequence: - `SimplifyArmIdentity` which transforms something like: ```rust _LOCAL_TMP = ((_LOCAL_1 as Variant ).FIELD: TY ); ((_LOCAL_0 as Variant).FIELD: TY) = move _LOCAL_TMP; discriminant(_LOCAL_0) = VAR_IDX; ``` into: ```rust _LOCAL_0 = move _LOCAL_1 ``` - `SimplifyBranchSame` which transforms `SwitchInt`s to identical basic blocks into a `goto` to the first reachable target. Together, these are meant to simplify the following into just `res`: ```rust match res { Ok(x) => Ok(x), Err(x) => Err(x), } ``` It should be noted however that the desugaring of `?` includes a function call and so the first pass in this PR relies on inlining to substitute that function call for identity on `x`. Inlining requires `mir-opt-level=2` so this might not have any effect in perf-bot but let's find out. r? @oli-obk -- This is WIP, but I'd appreciate feedback. :)
2019-11-21Give name to full regex captureDylan MacKenzie-2/+3
2019-11-21Change some tests to use the shorter comment styleDylan MacKenzie-17/+6
2019-11-21Fix broken incremental testDylan MacKenzie-2/+1
This test does not actually emit any warnings, since `#![allow(warnings)]` was specified. `compiletest` was erroneously ignoring `//~` tests and looking only for `//[X]~` ones. As a result of the changes in the previous commit, we now look for `//~` comments in incremental tests and expect them to appear in *all* revisions.
2019-11-21Allow multiple cfgs per comment in "revisions:" testsDylan MacKenzie-42/+47
The `//[X]~` syntax filters errors for tests that are run across multiple cfgs with `// revisions:`. This commit extends that syntax to accept `//[X,Y]~`, which will match multiple cfgs to the same error annotation. This is functionally the same as writing two comments, `//[X]~` and `//[Y]~`, but can fit on a single line.
2019-11-21Auto merge of #66610 - alexreg:trait-upcasting-cosmetic, r=Centrilbors-638/+646
Aggregation of drive-by cosmetic changes for trait-upcasting PR Cherry-picked from #60900. As requested by @Centril (and @nikomatsakis, I believe). r? @Centril
2019-11-21Introduce MIR optimizations for simplifying `x?` on `Result`s.Mazdak Farrokhzad-12/+431
This optimization depends on inlining for the identity conversions introduced by the lowering of the `?`. To take advantage of `SimplifyArmIdentity`, `-Z mir-opt-level=2` is required because that triggers the inlining MIR optimization.
2019-11-21Applied suggestions from code review.Alexander Regueiro-94/+95
2019-11-21Aggregation of drive-by cosmetic changes.Alexander Regueiro-607/+614
2019-11-21Auto merge of #66389 - estebank:type-err-labels, r=petrochenkovbors-3540/+2544
Specific labels when referring to "expected" and "found" types
2019-11-21Rollup merge of #66602 - GuillaumeGomez:revert-font, r=GuillaumeGomezMazdak Farrokhzad-22/+9
Revert "Update Source Code Pro and include italics" This reverts commit ea9519bf16f0be137a814a49c9fbaf232ba49a43.
2019-11-21Rollup merge of #66515 - Centril:cheaper-inline-asm, r=oli-obkMazdak Farrokhzad-59/+74
Reduce size of `hir::Expr` by boxing more of `hir::InlineAsm` r? @oli-obk
2019-11-21Rollup merge of #66468 - RalfJung:simd-cleanup, r=oli-obkMazdak Farrokhzad-39/+41
Cleanup Miri SIMD intrinsics r? @oli-obk @eddyb Cc @gnzlbg
2019-11-21Rollup merge of #65730 - csmoe:return-lifetime, r=nikomatsakisMazdak Farrokhzad-29/+103
Suggest to add lifetime constraint at explicit ouput of functions Closes #62097
2019-11-21never_type: test interaction with auto traitsMazdak Farrokhzad-0/+16
2019-11-21Redefine `core::convert::Infallible` as `!`.Mazdak Farrokhzad-106/+8
2019-11-21Gate fallback via `#![feature(never_type_fallback)]`.Mazdak Farrokhzad-19/+64
2019-11-21Remove `#![feature(never_type)]` from tests.Mazdak Farrokhzad-277/+130
Also remove `never_type` the feature-gate test.
2019-11-21Stabilize the `never_type`, written `!`.Mazdak Farrokhzad-52/+26
2019-11-21Revert "Update Source Code Pro and include italics"Guillaume Gomez-22/+9
This reverts commit ea9519bf16f0be137a814a49c9fbaf232ba49a43.
2019-11-21reduce size of hir::ExprKindMazdak Farrokhzad-59/+74
2019-11-20Delete ProcessCfgModMark Rousskov-53/+17
The previous commit removes the use of this, and now we cleanup.
2019-11-20Rollup merge of #66573 - ↵Mazdak Farrokhzad-0/+1
pnkfelix:issue-66568-ignore-reproducible-build-2-on-macos, r=alexcrichton Ignore run-make reproducible-build-2 on Mac Ignore run-make reproducible-build-2 on Mac (we already ignore it on Windows). Until we can dedicate resources to fixing this properly, I think we are best off just ignoring this test on platforms/contexts where it does not matter as much. cc #66568
2019-11-20Rollup merge of #66535 - estebank:issue-62480, r=matthewjasperMazdak Farrokhzad-3/+28
Avoid ICE when `break`ing to an unreachable label Fix #62480.
2019-11-20Rollup merge of #66514 - GuillaumeGomez:fix-search-filter-save, r=kinnisonMazdak Farrokhzad-16/+13
Fix selected crate search filter Fixes #62929. r? @kinnison
2019-11-20Rollup merge of #66496 - petrochenkov:metapriv2, r=eddybMazdak Farrokhzad-282/+343
rustc_metadata: Privatize more things Continuation of https://github.com/rust-lang/rust/pull/66056. The most notable change here is that `CrateMetadata` is moved from `cstore.rs` to `decoder.rs`. Most of uses of `CrateMetadata` fields are in the decoder and uses of `root: CrateRoot` and other fields are so intertwined with each other that it would be hard to move a part of them into `cstore.rs` to privatize `CrateMetadata` fields, so we are going the other way round. `cstore.rs` can probably be dismantled now, but I'll leave this to some other day. Similarly, remaining `CrateMetadata` fields can be privatized by introducing some getter/setter methods, but not today. r? @eddyb
2019-11-20Rollup merge of #66457 - cjgillot:just_hashstable, r=ZoxcMazdak Farrokhzad-330/+69
Just derive Hashstable in librustc Split out of #66279 r? @Zoxc
2019-11-20Rollup merge of #66298 - Ppjet6:disable-search-field, r=GuillaumeGomezMazdak Farrokhzad-6/+15
rustdoc: fixes #64305: disable search field instead of hidding it The result seems to be ok but I wasn't entirely sure how to get there. I tried to stay generic a bit but maybe it's not required at all. @GuillaumeGomez Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2019-11-20Rollup merge of #66060 - traxys:test_65401, r=michaelwoeristerMazdak Farrokhzad-37/+120
Making ICEs and test them in incremental This adds: - A way to make the compiler ICE - A way to check for ICE in `cfail` tests with `should-ice` - A regression test for issue #65401 I am not sure the attribute added `should-ice` is the best for this job
2019-11-20Auto merge of #66571 - Centril:rollup-41tn2fw, r=Centrilbors-195/+426
Rollup of 8 pull requests Successful merges: - #65665 (Update Source Code Pro and include italics) - #66478 (rustc_plugin: Remove the compatibility shim) - #66497 (Fix #53820) - #66526 (Add more context to `async fn` trait error) - #66532 (Generate DWARF address ranges for faster lookups) - #66546 (Remove duplicate function) - #66548 ([RISCV] Disable Atomics on all Non-A RISC-V targets) - #66553 (remove HermitCore leftovers from sys/unix) Failed merges: r? @ghost