about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2019-10-15Test basic hygiene for `macro_rules` produced by transparent macrosVadim Petrochenkov-0/+74
2019-10-15Stabilize proc macros generating `macro_rules` itemsVadim Petrochenkov-157/+10
2019-10-14Rollup merge of #65416 - spastorino:minor-sync-changes, r=Mark-SimulacrumTyler Mandry-27/+24
Minor sync changes r? @Mark-Simulacrum
2019-10-14Rollup merge of #65415 - petrochenkov:rmtest, r=varkorTyler Mandry-16/+0
Remove an outdated test output file It was accidentally introduced during some rebase, but it's no longer necessary and `--bless` removes it, but it doesn't fail testing.
2019-10-14Rollup merge of #65410 - Centril:intersection-pat-recover, r=davidtwco,varkorTyler Mandry-1/+135
syntax: add parser recovery for intersection- / and-patterns `p1 @ p2` Fixes https://github.com/rust-lang/rust/issues/65400. The recovery comes in two flavors: 1. We know that `p2` is a binding so we can invert as `p2 @ p1`: ```rust error: pattern on wrong side of `@` --> $DIR/intersection-patterns.rs:13:9 | LL | Some(x) @ y => {} | -------^^^- | | | | | binding on the right, should be to the left | pattern on the left, should be to the right | help: switch the order: `y @ Some(x)` ``` 2. Otherwise we emit a generic diagnostic for the lack of support for intersection patterns: ```rust error: left-hand side of `@` must be a binding --> $DIR/intersection-patterns.rs:23:9 | LL | Some(x) @ Some(y) => {} | -------^^^------- | | | | | also a pattern | interpreted as a pattern, not a binding | = note: bindings are `x`, `mut x`, `ref x`, and `ref mut x` ``` For more on and-patterns, see e.g. https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/pattern-matching#and-pattern. r? @davidtwco cc @varkor @lzutao
2019-10-14Rollup merge of #65398 - estebank:capitalization-only, r=varkorTyler Mandry-52/+115
Bring attention to suggestions when the only difference is capitalization CC #65386.
2019-10-14Rollup merge of #65365 - skinny121:const-args-metadata, r=varkorTyler Mandry-26/+58
Include const generic arguments in metadata Fixes #64707 Fixes #61624 Fixes #64730 r? @varkor
2019-10-14Rollup merge of #65340 - bjorn3:cg_ssa_refactor4, r=eddybTyler Mandry-178/+157
Several changes to the codegen backend organization * Split functions from values in cg_ssa `BackendTypes`. * Remove `is_const_integral` function from `ConstMethods`. * Actually register the invalid monomorphization of intrinsic long diagnostic and remove the `diagnostics` method from `CodegenBackends`, as it was unused. * Add cg_ssa and cg_utils provided methods to `default_provide`, so codegen backend don't have to do it themself.
2019-10-14Rollup merge of #65332 - RalfJung:fmt, r=cramertjTyler Mandry-191/+175
std::fmt: reorder docs This moves the "Formatting Parameters" section up above right after the discussion of named and positional arguments. Then comes the "Syntax" section, summarizing the discussion of format string syntax. And only *then* we get to "Formatting Traits" -- that section has some *huge* code examples, so it really should not interrupt the discussion of the grammar. Also users are much more likely to come here to learn about the format string grammar than to come here to learn about the `Binary` trait.
2019-10-14Rollup merge of #65261 - nnethercote:rm-Option-from-TokenStream, r=petrochenkovTyler Mandry-154/+110
Remove `Option` from `TokenStream` A code simplification. r? @petrochenkov
2019-10-14Rollup merge of #65260 - nnethercote:optimize-LexicalResolve-expansion, ↵Tyler Mandry-10/+16
r=nikomatsakis Optimize `LexicalResolve::expansion`. A win for `unicode_normalization`. r? @nikomatsakis
2019-10-14Rollup merge of #65170 - petrochenkov:cload, r=eddybTyler Mandry-394/+309
rustc_metadata: Privatize private code and remove dead code Also some minor cleanup and documentation improvements. r? @eddyb
2019-10-14Tweak heuristics for less noiseEsteban Küber-10/+10
2019-10-14Use heuristics for capitalization warning in suggestionsEsteban Küber-24/+37
2019-10-14Rename serial_join and serial_scope to join and scopeSantiago Pastorino-25/+22
2019-10-14Move serial_scope and serial_join to parallel_compiler = falseSantiago Pastorino-23/+23
2019-10-14Minor comment tweaksSantiago Pastorino-2/+2
2019-10-14Remove an outdated test output fileVadim Petrochenkov-16/+0
2019-10-15Include const generic arguments in metadata.ben-26/+58
2019-10-14pprust: `p1@p2` -> `p1 @ p2`Mazdak Farrokhzad-5/+6
2019-10-14recover_intersection_pat: adjust wordingMazdak Farrokhzad-13/+13
2019-10-14Auto merge of #64987 - oli-obk:code_reuse_prevents_bugs, r=eddybbors-18/+37
Compute the layout of uninhabited structs fixes #64506 r? @eddyb
2019-10-14syntax: use `PatKind::Wild` as our `::Err` equivalent.Mazdak Farrokhzad-10/+10
2019-10-14syntax: add test for intersection pattern parser recoveryMazdak Farrokhzad-0/+73
2019-10-14syntax: add recovery for intersection patterns `p1 @ p2`Mazdak Farrokhzad-0/+60
2019-10-14rustc_metadata: Remove resolutions for extern crate items from `CStore`Vadim Petrochenkov-23/+16
Use a more traditional scheme with providing them as a resolver output
2019-10-14rustc_metadata: Crate loader is immutableVadim Petrochenkov-32/+22
2019-10-14rustc_metadata: Improve documentation of `CrateMetadata`Vadim Petrochenkov-25/+36
2019-10-14rustc_metadata: Use `CrateSource` where appropriateVadim Petrochenkov-67/+43
2019-10-14rustc_metadata: Privatize private code and remove dead codeVadim Petrochenkov-257/+202
2019-10-14Auto merge of #65399 - Centril:rollup-6lzj0w5, r=Centrilbors-1173/+1452
Rollup of 7 pull requests Successful merges: - #65215 (Add long error explanation for E0697) - #65292 (Print lifetimes with backticks) - #65362 (syntax: consolidate function parsing in item.rs) - #65363 (Remove implicit dependencies on syntax::pprust) - #65379 (refactor session::config::build_session_options_and_crate_config) - #65392 (Move `Nonterminal::to_tokenstream` to parser & don't rely directly on parser in lowering) - #65395 (Add some tests for fixed ICEs) Failed merges: r? @ghost
2019-10-14Rollup merge of #65395 - JohnTitor:add-tests, r=CentrilMazdak Farrokhzad-0/+131
Add some tests for fixed ICEs Fixes #44153 (from 1.23.0) Fixes #47486 (from 1.36.0) Fixes #48010 (from 1.38.0) Fixes #48027 (from nightly) Fixes #48638 (from nightly)
2019-10-14Rollup merge of #65392 - Centril:nt-to-tt, r=Mark-SimulacrumMazdak Farrokhzad-142/+152
Move `Nonterminal::to_tokenstream` to parser & don't rely directly on parser in lowering Split out from https://github.com/rust-lang/rust/pull/65324. r? @petrochenkov
2019-10-14Rollup merge of #65379 - Centril:refactor-bso_and_cc, r=petrochenkovMazdak Farrokhzad-184/+298
refactor session::config::build_session_options_and_crate_config I'm not exactly sure what happened in https://github.com/rust-lang/rust/pull/65361#issuecomment-541420179 so in an effort to bisect the error I'm extracting out the first commit so it can hopefully land (I suspect the error is in the 2nd-3rd commits.) r? @petrochenkov (I'll r=you when the PR builder is happy)
2019-10-14Rollup merge of #65363 - Centril:less-pprust, r=Mark-SimulacrumMazdak Farrokhzad-99/+101
Remove implicit dependencies on syntax::pprust Part of https://github.com/rust-lang/rust/pull/65324. The main goal here is to facilitate the eventual move of pprust out from libsyntax and because an AST definition typically should not depend on its pretty printer. r? @estebank
2019-10-14Rollup merge of #65362 - Centril:extract_fun, r=petrochenkovMazdak Farrokhzad-487/+491
syntax: consolidate function parsing in item.rs Extracted from https://github.com/rust-lang/rust/pull/65324. r? @estebank
2019-10-14Rollup merge of #65292 - JohnTitor:add-backticks, r=varkor,CentrilMazdak Farrokhzad-260/+260
Print lifetimes with backticks Fixes #65287 r? @varkor
2019-10-14Rollup merge of #65215 - JohnTitor:long-explanation-e0697, r=GuillaumeGomezMazdak Farrokhzad-1/+19
Add long error explanation for E0697 Part of #61137 r? @GuillaumeGomez
2019-10-13Bring attention to suggestions when the only difference is capitalizationEsteban Küber-71/+121
2019-10-14Add test for issue-48638Yuki Okushi-0/+21
2019-10-14Add test for issue-48027Yuki Okushi-0/+29
2019-10-14Add test for issue-48010Yuki Okushi-0/+23
2019-10-14Add test for issue-47486Yuki Okushi-0/+23
2019-10-14Auto merge of #65240 - michaelwoerister:sp-review-3, r=Mark-Simulacrumbors-24/+55
self-profiling: Add events for metadata loading (plus a small dep-tracking optimization) This PR - adds self-profiling events related to loading things from crate metadata - makes the compiler cache the `DepNodeIndex` of upstream crates, so that they don't have to be looked up over and over. The commits are best reviewed in isolation. Self-profiling tracking issue: https://github.com/rust-lang/rust/issues/58967 r? @Mark-Simulacrum cc @wesleywiser
2019-10-14Add test for issue-44153Yuki Okushi-0/+35
2019-10-14Lazify some `mac_placeholder()` calls.Nicholas Nethercote-7/+7
This avoids some unnecessary creation of empty token streams.
2019-10-14Use `TokenStream::default()` in more places.Nicholas Nethercote-2/+2
2019-10-14Remove the `Option` in `TokenStream`.Nicholas Nethercote-145/+101
It means an allocation is required to create an empty `TokenStream`, but all other operations are simpler and marginally faster due to not having to check for `None`. Overall it simplifies the code for a negligible performance effect. The commit also removes `TokenStream::empty` by implementing `Default`, which is now possible.
2019-10-13Auto merge of #65342 - Mark-Simulacrum:revert-rustc-dev, r=pietroalbinibors-127/+33
Revert "Auto merge of #64823 - cuviper:min-std, r=Mark-Simulacrum" This reverts commit 000d90b11f7be70ffb7812680f7abc6deb52ec88, reversing changes made to 898f36c83cc28d7921a1d7b3605323dc5cfcf533. This turned out to break quite a few targets, cc https://github.com/rust-lang/rust/issues/65335
2019-10-13lowering: connect to parser via function pointer insteadMazdak Farrokhzad-26/+12