about summary refs log tree commit diff
path: root/src/librustc/ty
AgeCommit message (Collapse)AuthorLines
2019-04-28Fix lint findings in librustcflip1995-12/+12
2019-04-27Rollup merge of #60292 - varkor:ty-tuple-substs, r=nikomatsakisMazdak Farrokhzad-26/+52
Replace the `&'tcx List<Ty<'tcx>>` in `TyKind::Tuple` with `SubstsRef<'tcx>` Part of the suggested refactoring for https://github.com/rust-lang/rust/issues/42340. As expected, this is a little messy, because there are many places that the components of tuples are expected to be types, rather than arbitrary kinds. However, it should open up the way for a refactoring of `TyS` itself. r? @nikomatsakis
2019-04-27Auto merge of #59540 - Zoxc:the-arena-2, r=michaelwoeristerbors-8/+3
Use arenas to avoid Lrc in queries #1 Based on https://github.com/rust-lang/rust/pull/59536.
2019-04-26Update handling of Tuplevarkor-23/+40
2019-04-26Replace `&'tcx List<Ty<'tcx>>` in `Tuple` with `SubstsRef<'tcx>`varkor-1/+1
2019-04-26Add expect_ty method to Kindvarkor-2/+11
2019-04-25ignore-tidy-filelength on all files with greater than 3000 linesvarkor-0/+4
2019-04-25Update trait_impls_ofJohn Kåre Alsaker-3/+2
2019-04-25Update inferred_outlives_ofJohn Kåre Alsaker-5/+1
2019-04-23Add rustc_allow_const_fn_ptrTaylor Cramer-0/+7
2019-04-23Rollup merge of #60177 - rasendubi:rustdoc-comments, r=varkorMazdak Farrokhzad-11/+11
Promote rust comments to rustdoc
2019-04-23Auto merge of #60125 - estebank:continue-evaluating, r=oli-obkbors-1/+1
Don't stop evaluating due to errors before borrow checking r? @oli-obk Fix #60005. Follow up to #59903. Blocked on #53708, fixing the ICE in `src/test/ui/consts/match_ice.rs`.
2019-04-22Fix ICE related to #53708Esteban Küber-1/+1
2019-04-22Promote rust comments to rustdocAlexey Shmalko-11/+11
2019-04-22Remove double trailing newlinesvarkor-2/+0
2019-04-21Enable migrate mode by default on the 2015 editionMatthew Jasper-53/+7
This also fully stabilizes two-phase borrows on all editions
2019-04-21Change return type of `TyCtxt::is_static` to boolVadim Petrochenkov-3/+8
Add `TyCtxt::is_mutable_static`
2019-04-21Introduce query `static_mutability`Vadim Petrochenkov-28/+2
2019-04-20Auto merge of #59987 - saleemjaffer:refactor_adjust_castkinds, r=oli-obkbors-39/+33
Refactor Adjust and CastKind fixes rust-lang#59588
2019-04-18Auto merge of #60058 - varkor:const-generics-ty-refactor, r=cramertjbors-5/+13
Make const parameters enforce no variance constraints Fixes https://github.com/rust-lang/rust/issues/60047. Also includes some minor const refactoring for convenience.
2019-04-18Auto merge of #60048 - estebank:issue-54954, r=sanxiynbors-0/+13
Fix ICE on const evaluation of const method Fix #54954.
2019-04-18Add own_requires_monomorphizationvarkor-5/+13
2019-04-17Fix ICE on const evaluation of const methodEsteban Küber-0/+13
2019-04-17Deny `internal` in stage0Mateusz Mikuła-1/+1
2019-04-16refactor ExprKind to use new PointerCast enumSaleem Jaffer-21/+3
2019-04-16refactor Adjustment to use new PointerCast enumSaleem Jaffer-39/+42
2019-04-15basic refactor. Adding PointerCast enumSaleem Jaffer-0/+9
2019-04-14Auto merge of #59335 - Aaron1011:fix/extern-priv-final, r=Aaron1011bors-0/+10
Properly parse '--extern-private' with name and path It turns out that https://github.com/rust-lang/rust/pull/57586 didn't properly parse `--extern-private name=path`. This PR properly implements the `--extern-private` option. I've added a new `extern-private` option to `compiletest`, which causes an `--extern-private` option to be passed to the compiler with the proper path. Part of https://github.com/rust-lang/rust/issues/44663
2019-04-14HirIdify hir::Defljedrz-6/+12
2019-04-14Properly parse '--extern-private' with name and pathAaron Hill-0/+10
2019-04-12Use measureme in self-profilerWesley Wiser-30/+42
Related to #58372 Related to #58967
2019-04-12Auto merge of #59651 - tmandry:discr-index, r=eddybbors-0/+4
Add discr_index to multi-variant layouts We remove the assumption that the discriminant is always field 0, in preparations for layouts like generators where this is not (always) going to be the case. Specifically, upvars are going to go before the discriminant. In theory, it's possible to remove _that_ assumption instead and keep the discriminant at field index 0, but one assumption or the other had to go :) There is one place I know of in the debuginfo code where we'll still need to remove assumptions that the discriminant is the _only_ field. I was planning on doing this along with the upcoming generator change, which will also include tests that exercise the code changing in this PR. r? @eddyb cc @oli-obk cc @cramertj
2019-04-11Add discr_index to multi-variant layoutsTyler Mandry-0/+4
We relax the assumption that the discriminant is always field 0, in preparations for layouts like generators where this is not going to be the case.
2019-04-05Add DropArena and use it to allocate types with few allocationsJohn Kåre Alsaker-3/+7
2019-04-05Make ArenaAllocatable a marker trait to allow overlapping impls and use ↵John Kåre Alsaker-2/+2
specialization to find the right field
2019-04-05Introduce an arena type which may be used to allocate a list of types with ↵John Kåre Alsaker-1/+56
destructors
2019-04-04Auto merge of #59517 - Zoxc:new-queries, r=oli-obkbors-1806/+17
Move query definitions over to the proc macro r? @oli-obk
2019-04-03Add trait_object_dummy_self to CommonTypesflip1995-0/+7
2019-04-03Deny internal lints in librustcflip1995-0/+2
2019-04-02Replace adt_def with name in mir::ProjectionElem::DowncastTyler Mandry-17/+17
2019-04-01Rollup merge of #58507 - Zoxc:time-extended, r=michaelwoeristerMazdak Farrokhzad-15/+14
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 #59580 - taiki-e:coerce-closure, r=oli-obkMazdak Farrokhzad-7/+12
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-04-01Allow closure to unsafe fn coercionTaiki Endo-7/+12
2019-03-30Remove redundant importsFabian Drinck-1/+0
2019-03-30Move query definitions over to the proc macroJohn Kåre Alsaker-1806/+17
2019-03-30Rollup merge of #59343 - eddyb:rm-def-symbol-name, r=michaelwoeristerMazdak Farrokhzad-7/+2
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-29rustc_target: factor out common fields of non-Single Variants.Eduard-Mihai Burtescu-23/+34
2019-03-29rustc(codegen): uncache `def_symbol_name` prefix from `symbol_name`.Eduard-Mihai Burtescu-7/+2