summary refs log tree commit diff
path: root/src/librustc
AgeCommit message (Collapse)AuthorLines
2019-05-18Instead of ICEing on incorrect pattern, use delay_span_bugEsteban Küber-2/+10
2019-05-18Use `delay_span_bug` for "Failed to unify obligation"Esteban Küber-5/+10
2019-04-07Auto merge of #58739 - matthewjasper:more-restrictive-tpb, r=pnkfelixbors-1/+12
More restrictive 2 phase borrows - take 2 Signal lint diagnostic `mutable_borrow_reservation_conflict` when borrow-check finds a 2-phase borrow's reservation overlapping with a shared borrow. (pnkfelix updated description) cc #56254 , #59159 blocks PR #59114 r? @pnkfelix cc @RalfJung @nikomatsakis
2019-04-06Rollup merge of #59738 - flip1995:match_path_move, r=eddyb,ManishearthMazdak Farrokhzad-107/+114
Move match_path from DefId to lint::LateContext cc https://github.com/rust-lang/rust/pull/59316#discussion_r272351353 r? @eddyb
2019-04-06Auto merge of #59723 - Zoxc:rem-noforce, r=michaelwoeristerbors-1/+0
Remove no_force from coherent_trait r? @michaelwoerister
2019-04-05Move match_path from DefId to lint::LateContextflip1995-107/+114
2019-04-05Remove no_force from coherent_traitJohn Kåre Alsaker-1/+0
2019-04-04Placate tidyFelix S Klock II-2/+2
Get us back below 100 characters per line to placate tidy.
2019-04-04Adjust the mutable_borrow_reservation_conflict messageMatthew Jasper-0/+4
We aren't sure if this will become an error or not yet.
2019-04-04add mutable_borrow_reservation_conflict future-incompatibility lint.Felix S. Klock II-0/+7
Convert the new 2-phase reservation errors into instances of the lint so that they will be controlled by that attribute.
2019-04-04Use declare_lint_pass! and impl_lint_pass! in more placeshgallagher1993-20/+2
2019-04-04Auto merge of #59517 - Zoxc:new-queries, r=oli-obkbors-2010/+946
Move query definitions over to the proc macro r? @oli-obk
2019-04-04Rollup merge of #59669 - Centril:lint-pass-macro, r=oli-obkMazdak Farrokhzad-75/+87
Reduce repetition in librustc(_lint) wrt. impl LintPass by using macros r? @oli-obk cc @Zoxc
2019-04-03reduce repetition in librustc(_lint) wrt. impl LintPassMazdak Farrokhzad-75/+87
2019-04-03Add trait_object_dummy_self to CommonTypesflip1995-0/+7
2019-04-03Deny internal lints in librustcflip1995-22/+22
2019-04-03Deduplicate code in TyKind lintflip1995-48/+30
2019-04-03Fix bug in TyKind lintflip1995-5/+8
2019-04-03Make internal lints allow-by-defaultflip1995-2/+2
2019-04-03use check_path instead of check_exprflip1995-49/+27
2019-04-03Fix rebase falloutflip1995-16/+15
2019-04-03Uplift match_def_path from Clippyflip1995-3/+104
2019-04-03Add internal lints default_hash_types and usage_of_ty_tykindflip1995-0/+166
2019-04-03Rollup merge of #59630 - nnethercote:shrink-mir-Statement, r=pnkfelixMazdak Farrokhzad-17/+26
Shrink `mir::Statement`. The `InlineAsm` variant is extremely rare, and `mir::Statement` often contributes significantly to peak memory usage.
2019-04-03Rollup merge of #59514 - tmandry:remove-adt-def-from-projection-elem, r=eddybMazdak Farrokhzad-128/+104
Remove adt_def from projections and downcasts in MIR As part of optimizing generator layouts in MIR, we'd like to allow downcasting generators to variants which do not have a corresponding `def_id`, since they are created by the compiler. This refactor hopes to allow that, without regressing perf. r? @eddyb
2019-04-03Shrink `mir::Statement`.Nicholas Nethercote-17/+26
The `InlineAsm` variant is extremely rare, and `mir::Statement` often contributes significantly to peak memory usage.
2019-04-02Remove adt_def from PlaceTy and make it a structTyler Mandry-74/+42
2019-04-02Replace adt_def with name in mir::ProjectionElem::DowncastTyler Mandry-55/+63
2019-04-02Rollup merge of #59607 - kenta7777:renames-EvalErrorKind-to-InterpError, ↵Mazdak Farrokhzad-22/+22
r=oli-obk Renames `EvalErrorKind` to `InterpError` This PR renames `EvalErrorKind` to `InterpError`. This is related to #54395.
2019-04-01Refactor async fn return type loweringTaylor Cramer-306/+455
async fn now lowers directly to an existential type declaration rather than reusing the `impl Trait` return type lowering. As part of this, it lowers all argument-position elided lifetimes using the in-band-lifetimes machinery, creating fresh parameter names for each of them, using each lifetime parameter as a generic argument to the generated existential type. This doesn't currently successfully allow multiple argument-position elided lifetimes since `existential type` doesn't yet support multiple lifetimes where neither outlive the other. This requires a separate fix.
2019-04-02renames EvalErrorKind to InterpErrorkenta7777-22/+22
2019-04-01Rollup merge of #58919 - estebank:impl-trait-return-lifetime, r=pnkfelixMazdak Farrokhzad-8/+17
Suggest using anonymous lifetime in `impl Trait` return Fix #48467. r? @nikomatsakis
2019-04-01Rollup merge of #58507 - Zoxc:time-extended, r=michaelwoeristerMazdak Farrokhzad-15/+19
Add a -Z time option which prints only passes which runs once This ensures `-Z time-passes` fits on my screen =P r? @michaelwoerister
2019-03-31Rollup merge of #59581 - jmcomets:stabilize-refcell_replace_swap, r=CentrilMazdak Farrokhzad-1/+0
Stabilize refcell_replace_swap feature Please be kind, this is my first time contributing. :smile: I noticed #43570 only needs stabilizing (and I need it for a side project I'm working on), so I followed the [guide](https://rust-lang.github.io/rustc-guide/stabilization_guide.html#stabilization-pr) to move things forward. I'm happy to amend things if needed, let me know!
2019-03-31Rollup merge of #59580 - taiki-e:coerce-closure, r=oli-obkMazdak Farrokhzad-11/+17
Allow closure to unsafe fn coercion Closes #57883
2019-03-31Rollup merge of #59519 - eddyb:layout-variants-refactor, r=oli-obkMazdak Farrokhzad-23/+34
rustc_target: factor out common fields of non-Single Variants. @tmandry and I were discussing ways to generalize the current variants/discriminant layout to allow more fields in the "`enum`" (or another multi-variant types, such as potentially generator state, in the future), shared by all variants, than just the tag/niche discriminant. This refactor should make it easier to extend multi-variant layouts, as nothing is duplicating anymore between "tagged enums" and "niche-filling enums". r? @oli-obk
2019-03-31Suggest using anonymous lifetime in `impl Trait` return without hacksEsteban Küber-34/+13
Fallback to `static_impl_trait` for nice error message by peeking at the return type and the lifetime type. Point at the return type instead of the return expr/stmt in NLL mode.
2019-04-01Allow closure to unsafe fn coercionTaiki Endo-11/+17
2019-03-31Stabilize refcell_replace_swap feature, closes #43570Jean-Marie Comets-1/+0
2019-03-30Change message to present tenseFabian Drinck-1/+1
2019-03-30Replace REDUNDANT_IMPORT with UNUSED_IMPORTSFabian Drinck-7/+1
2019-03-30Distinguish between imported and defined itemsFabian Drinck-3/+4
2019-03-30Improve warningFabian Drinck-0/+9
2019-03-30Remove redundant importsFabian Drinck-1/+0
2019-03-30Add lint for redundant importsFabian Drinck-0/+6
Co-authored-by: Stephan Schauerte <stephan.schauerte@gmail.com>
2019-03-30Move query definitions over to the proc macroJohn Kåre Alsaker-2010/+946
2019-03-30Rollup merge of #59343 - eddyb:rm-def-symbol-name, r=michaelwoeristerMazdak Farrokhzad-9/+3
rustc(codegen): uncache `def_symbol_name` prefix from `symbol_name`. The `def_symbol_name` query was an optimization to avoid recomputing the common part of a symbol name, as only the hash needs to be added to it for each symbol. However, #57967 will add a new mangling scheme, which doesn't readily support this kind of reuse - while it's plausible, it requires a lot more effort, since you'd have to "symbolically evaluate" mangling, and keep it in a form where the backreference positions can be computed correctly in the final step. So I want to see how much time we're actually saving with this `def_symbol_name` optimization, nowadays. cc @michaelwoerister
2019-03-30Rollup merge of #59376 - davidtwco:finally-rfc-2008-variants, ↵Mazdak Farrokhzad-2/+12
r=petrochenkov,QuietMisdreavus RFC 2008: Enum Variants Part of #44109. See [Zulip topic](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/rfc-2008/near/132663140) for previous discussion. r? @petrochenkov cc @nikomatsakis
2019-03-29Suggest using anonymous lifetime in `impl Trait` returnEsteban Küber-6/+36
2019-03-29Rollup merge of #59510 - varkor:rename-type_parameters, r=eddybMazdak Farrokhzad-8/+8
Rename `type_parameters` to `generics` and so on Some old variable names had fallen through the generics generalisation pull requests.