about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2019-12-30Rename `libsyntax_ext` and `libsyntax_expand` in codeVadim Petrochenkov-72/+69
2019-12-30Make things build againVadim Petrochenkov-47/+47
2019-12-30Rename directories for some crates from `syntax_x` to `rustc_x`Vadim Petrochenkov-0/+0
`syntax_expand` -> `rustc_expand` `syntax_pos` -> `rustc_span` `syntax_ext` -> `rustc_builtin_macros`
2019-12-30Auto merge of #67667 - wesleywiser:speed_up_trivially_valid_constants, r=oli-obkbors-3/+99
Resolve long compile times when evaluating always valid constants This extends the existing logic which skips validating every integer or floating point number type to also skip validating empty structs because they are also trivially valid. Fixes #67539 r? @oli-obk cc @RalfJung @spastorino
2019-12-30Auto merge of #67658 - spastorino:do-not-copy-zsts, r=oli-obkbors-25/+45
Avoid memory copy logic for zsts r? @oli-obk One of the included commits is work done by @HeroicKatora in #62655
2019-12-30Auto merge of #67721 - JohnTitor:rollup-o8zm4r9, r=JohnTitorbors-262/+333
Rollup of 10 pull requests Successful merges: - #64273 (Stabilize attribute macros on inline modules) - #67287 (typeck: note other end-point when checking range pats) - #67564 (docs: Iterator adapters have unspecified results after a panic) - #67622 (Some keyword documentation.) - #67657 (Clean up const-hack PRs now that const if / match exist.) - #67677 (resolve: Minor cleanup of duplicate macro reexports) - #67687 (Do not ICE on lifetime error involving closures) - #67698 (Move reachable_set and diagnostic_items to librustc_passes.) - #67701 (tidy: Enforce formatting rather than just check it if `--bless` is specified) - #67715 (Typo fix) Failed merges: r? @ghost
2019-12-30Rollup merge of #67715 - petertodd:2019-typo-manuallydrop, r=CentrilYuki Okushi-1/+1
Typo fix
2019-12-30Rollup merge of #67701 - petrochenkov:tidybless, r=Mark-SimulacrumYuki Okushi-1/+1
tidy: Enforce formatting rather than just check it if `--bless` is specified Ensuring the "tidy"-ness currently requires running `rustfmt` twice: ```sh ./x.py fmt && ./x.py test tidy ``` , once to actually format code and the second time as a part of tidy to check that the code is formatted. Running `rustfmt` is slow, so we don't want to run it twice. With this PR tidy enforces the formatting rather than just checks it if `--bless` was passed to it: ```sh ./x.py test tidy --bless ``` r? @Mark-Simulacrum
2019-12-30Rollup merge of #67698 - cjgillot:passes-first, r=ZoxcYuki Okushi-95/+97
Move reachable_set and diagnostic_items to librustc_passes. Split out of #67688 r? @Zoxc
2019-12-30Rollup merge of #67687 - estebank:issue-67634, r=matthewjasperYuki Okushi-2/+38
Do not ICE on lifetime error involving closures Fix #67634.
2019-12-30Rollup merge of #67677 - petrochenkov:dupexp, r=CentrilYuki Okushi-33/+9
resolve: Minor cleanup of duplicate macro reexports Enabled by https://github.com/rust-lang/rust/pull/65785 which changed `duplicate_macro_exports` from a lint to a hard error.
2019-12-30Rollup merge of #67657 - jumbatm:cleanup-const-hack, r=oli-obkYuki Okushi-16/+20
Clean up const-hack PRs now that const if / match exist. Closes #67627. Cleans up these merged PRs tagged with `const-hack`: - #63810 - #63786 - #61635 - #58044 reverting their contents to have the match or if expressions they originally contained. r? @oli-obk There's one more PR in those tagged with `const-hack` that originally wasn't merged (#65107). Reading the thread, it looks like it was originally closed because the `const-hack` for the checked arithmetic non-negligibly hurt performance, and because there was no way to manipulate the returned Option at compile time anyway (with neither const if nor const match). Would you like me to add these changes to the changes from this PR here too, now that we have the necessary features?
2019-12-30Rollup merge of #67622 - gilescope:async-keyword-doc, r=CentrilYuki Okushi-4/+23
Some keyword documentation. I thought about going into detail, but I'd much rather route them to the async book asap.
2019-12-30Rollup merge of #67564 - Mark-Simulacrum:iter-adapter-panic, r=LukasKalbertodtYuki Okushi-0/+5
docs: Iterator adapters have unspecified results after a panic Fixes #58170. That issue also has rough consensus from 3 members of the library team for this being the behavior we would like to specify.
2019-12-30Rollup merge of #67287 - Centril:mismatch-range-improve-diag, r=estebankYuki Okushi-38/+81
typeck: note other end-point when checking range pats Fixes #57389, alternative to #67214 that should be less invasive to type checking logic. r? @estebank
2019-12-30Rollup merge of #64273 - petrochenkov:stabattrmod, r=CentrilYuki Okushi-72/+58
Stabilize attribute macros on inline modules While still gating non-inline modules in proc macro input. Split from https://github.com/rust-lang/rust/pull/63931 cc https://github.com/rust-lang/rust/issues/54727
2019-12-30Auto merge of #67631 - oli-obk:polymorphic_promotion, r=wesleywiserbors-33/+223
Work around a resolve bug in const prop r? @wesleywiser @anp This isn't exposed right now, but further changes to rustc may start causing bugs without this.
2019-12-29Typo fixPeter Todd-1/+1
2019-12-30note other end-point when typeck range patsMazdak Farrokhzad-38/+81
2019-12-29Auto merge of #66942 - cjgillot:hirene-ty, r=Zoxcbors-916/+965
Allocate HIR on an arena 3/4 -- Ty This is the third PR in the series started by #66931 and #66936 Once again, commits don't really make sense on their own. They are mostly split by type of compile error. The additional diff is here: https://github.com/cjgillot/rust/compare/hirene-expr...hirene-ty
2019-12-29Resolve long compile times when evaluating always valid constantsWesley Wiser-3/+99
This extends the existing logic which skips validating every integer or floating point number type to also skip validating empty structs because they are also trivially valid. Fixes #67539
2019-12-29Auto merge of #67112 - Centril:expr-polish, r=estebankbors-537/+585
Refactor expression parsing thoroughly Based on https://github.com/rust-lang/rust/pull/66994 together with which this has refactored basically the entirety of `expr.rs`. r? @estebank
2019-12-29Auto merge of #67661 - JohnTitor:clippy-cargo, r=oli-obkbors-8/+7
Update Clippy and cargo includes latest rustup and resolves dependency conflicts with cargo Closes #67541 r? @oli-obk @Manishearth
2019-12-29Introduce librustc/middle/mod.rsCamille GILLOT-39/+36
2019-12-29Move get_lib_features query in librustc_passes.Camille GILLOT-33/+42
2019-12-29Move lib_features.rs in librustc_passes.Camille GILLOT-0/+0
2019-12-29tidy: Enforce formatting rather than just check it if `--bless` is specifiedVadim Petrochenkov-1/+1
2019-12-29Move diagnostic_items queries to librustc_passes.Camille GILLOT-16/+21
2019-12-29Move diagnostic_items.rs to librustc_passes.Camille GILLOT-0/+0
2019-12-29Move reachable_set query in librustc_passes.Camille GILLOT-31/+22
2019-12-29Move reachable.rs to librustc_passes.Camille GILLOT-0/+0
2019-12-29Some keyword documentation.Giles Cope-4/+23
2019-12-29Update cargoYuki Okushi-0/+0
2019-12-29Update ClippyYuki Okushi-8/+7
2019-12-29Rollup merge of #67679 - kraai:change-be-returning-to-return, r=Dylan-DPCDylan DPC-2/+2
Change "be returning" to "return"
2019-12-29Rollup merge of #67482 - ldm0:master, r=petrochenkovDylan DPC-3/+6
Fix outdated comment Logics in `libsyntax/ext/expand.rs:MacroExpander::expand()` have been moved to `libsyntax_expand/expand.rs:MacroExpander::fully_expand_fragment()` This pull request fixs the dangling file path. #### Old https://github.com/rust-lang/rust/blob/35176867f62f76b9bc27267878f2d74d9c776221/src/libsyntax/ext/expand.rs#L285-L301 #### New https://github.com/rust-lang/rust/blob/9ff30a7810c586819a78188c173a7b74adbb9730/src/libsyntax_expand/expand.rs#L421-L439 https://github.com/rust-lang/rust/blob/9ff30a7810c586819a78188c173a7b74adbb9730/src/libsyntax_expand/base.rs#L224-L234
2019-12-29Auto merge of #67614 - Mark-Simulacrum:global-callbacks, r=Zoxcbors-75/+99
Set callbacks globally This sets the callbacks from syntax and rustc_errors just once, utilizing static (rather than thread-local) storage.
2019-12-29Ensure that we don't cause *new* hard errors if we suddenly can evaluate ↵Oliver Scherer-29/+41
more constants during const prop
2019-12-28Auto merge of #67334 - estebank:ignore-triple, r=nikomatsakisbors-131/+268
Teach `compiletest` to ignore platform triples The UI tests are written assuming `--remap-path-prefix` is *not used* (`remap-debuginfo` in `config.toml`). The consequence is that the error messages may include paths and snippets into the standard library. When `remap-debuginfo` is enabled, these messages change in format and structure because `rustc` will not show paths and snippets into the standard library. This normally isn't a problem for the "main" platforms (linux/macos/windows), because the CI infrastructure is set up so that the tests run without `remap-debuginfo`, but the `dist` artifacts are built separately with `remap-debuginfo` enabled. However, some of the lower-tier platforms perform both tests and distribution in a single step with `remap-debuginfo` enabled. This also affects developers and distributors who use `remap-debuginfo`. To sidestep this problem, we add a way to ignore tests in specific platform triples, and update the overly broad `ignore-x86` rule in affected tests. Address #46948, #54546, #53081.
2019-12-28Do not ICE on lifetime error involving closuresEsteban Küber-2/+38
2019-12-28Ignore i586-unknown-linux-gnu and i586-unknown-musl in testsEsteban Küber-131/+267
2019-12-28Auto merge of #67151 - petrochenkov:docomm, r=estebankbors-103/+81
doc comments: Less attribute mimicking Make sure doc comments are not converted into intermediate meta-items, or not mixed with `doc(inline)` or something like that. Follow-up to https://github.com/rust-lang/rust/pull/65750.
2019-12-28Avoid copying some undef memory in MIRSantiago Pastorino-24/+36
During MIR interpretation it may happen that a place containing uninitialized bytes is copied. This would read the current representation of these bytes and write it to the destination even though they must, by definition, not matter to the execution. This elides that representation change when no bytes are defined in such a copy, saving some cpu cycles. In such a case, the memory of the target allocation is not touched at all which also means that sometimes no physical page backing the memory allocation of the representation needs to be provided by the OS at all, reducing memory pressure on the system.
2019-12-28Auto merge of #67459 - ssomers:#67438, r=RalfJungbors-25/+152
prune ill-conceived BTreeMap iter_mut assertion and test its mutability Proposal to deal with #67438 (and I'm more sure now that this is the right thing to do). Passes testing with miri.
2019-12-28Change "be returning" to "return"Matthew Kraai-2/+2
2019-12-28resolve: Minor cleanup of duplicate macro reexportsVadim Petrochenkov-33/+9
2019-12-28Auto merge of #67675 - RalfJung:miri, r=RalfJungbors-7/+9
update miri
2019-12-28update miriRalf Jung-7/+9
2019-12-28doc comments: Less attribute mimickingVadim Petrochenkov-103/+81
2019-12-28Auto merge of #67605 - lzutao:msdn-links, r=Mark-Simulacrumbors-30/+30
tidy: change msdn links to newer locations see accouncement at https://docs.microsoft.com/welcome-to-docs The script that I used: https://gist.github.com/lzutao/1449c9210ad91899841d62e0058d2caa