about summary refs log tree commit diff
path: root/src/librustc/ty/sty.rs
AgeCommit message (Collapse)AuthorLines
2020-03-30rustc -> rustc_middle part 1Mazdak Farrokhzad-2517/+0
2020-03-24Rollup merge of #70277 - matthewjasper:remove-closurebound, r=nikomatsakisMazdak Farrokhzad-10/+0
Remove `ReClosureBound` We now substitute external names for regions in the query response. r? @nikomatsakis
2020-03-24Rollup merge of #69981 - oli-obk:const_blocks, r=eddybMazdak Farrokhzad-2/+87
Evaluate repeat expression lengths as late as possible Fixes #68567 r? @varkor
2020-03-24Run rustfmtOliver Scherer-1/+4
2020-03-23Remove leftover mentions of `from_anon_const`Oliver Scherer-1/+1
2020-03-23Limit `from_anon_const` to `AnonConst`s.Oliver Scherer-1/+4
2020-03-23Address review commentsOliver Scherer-6/+8
2020-03-23Remove `ReClosureBound`Matthew Jasper-10/+0
2020-03-23Split long derive lists into two derive attributes.Ana-Maria Mihalache-152/+24
2020-03-23Use `DefId`s to identify anon consts when converting from HIR to ty::ConstOliver Scherer-8/+6
2020-03-23Inline `const_param_def_id` at its only use siteOliver Scherer-33/+29
2020-03-23Document most methods on `ty::Const`Oliver Scherer-0/+15
2020-03-23Evaluate repeat expression lengths as late as possibleOliver Scherer-1/+69
2020-03-21rustc: make {Closure,Generator}Substs::split as cheap as possible.Eduard-Mihai Burtescu-67/+31
2020-03-21rustc: keep upvars tupled in {Closure,Generator}Substs.Eduard-Mihai Burtescu-74/+89
2020-03-21Rollup merge of #70089 - eddyb:closure-sig-infer, r=nikomatsakisMazdak Farrokhzad-18/+12
rustc_infer: remove InferCtxt::closure_sig as the FnSig is always shallowly known. That is, `ClosureSubsts` is always created (in `rustc_typeck::check::closure`) with a `FnSig`, as the number of inputs is known, even if they might all have inference types. The only useful thing `InferCtxt::closure_sig` was doing is resolving an inference variable used just to get the `ty::FnPtr` containing that `FnSig` into `ClosureSubsts`. The ideal way to solve this would be to add a constructor for `ClosureSubsts`, that combines the parent `Substs`, the closure kind, the signature, and capture types together, but for now I've went with resolving the inference types just after unifying them with the real types. r? @nikomatsakis
2020-03-20remove redundant returns (clippy::needless_return)Matthias Krüger-3/+3
2020-03-18rustc_infer: remove InferCtxt::closure_sig as the FnSig is always shallowly ↵Eduard-Mihai Burtescu-18/+12
known.
2020-03-17Rollup merge of #69956 - matthewjasper:fix-region-flags, r=nikomatsakisMazdak Farrokhzad-14/+14
Ensure HAS_FREE_LOCAL_NAMES is set for ReFree This fixes a bug introduced by #69469. I don't have any ideas on how to reate a regression test for this.
2020-03-12Ensure HAS_FREE_LOCAL_NAMES is set for ReFreeMatthew Jasper-14/+14
2020-03-12Rollup merge of #69747 - spastorino:rename-rustc-guide, r=pietroalbiniMazdak Farrokhzad-2/+2
Rename rustc guide This is in preparation for https://github.com/rust-lang/rustc-guide/issues/470 Needs to be merged after we actually rename the guide. Have used this to rename: `git grep -l 'rustc_guide' | xargs sed -i 's/rustc_guide/rustc_dev_guide/g'` `git grep -l 'rustc-guide' | xargs sed -i 's/rustc-guide/rustc-dev-guide/g'` `git grep -l 'rustc guide' | xargs sed -i 's/rustc guide/rustc dev guide/g'`
2020-03-10rust-lang.github.io/rustc-dev-guide -> rustc-dev-guide.rust-lang.orgSantiago Pastorino-1/+1
2020-03-10Rename rustc guide to rustc dev guideSantiago Pastorino-2/+2
2020-03-10Rename rustc-guide to rustc-dev-guideSantiago Pastorino-1/+1
2020-03-06Don't redundantly repeat field names (clippy::redundant_field_names)Matthias Krüger-1/+1
2020-03-04Auto merge of #69550 - RalfJung:scalar, r=oli-obkbors-1/+1
interpret engine: Scalar cleanup * Remove `to_ptr` * Make `to_bits` private r? @oli-obk
2020-03-01Clean up TypeFlagsMatthew Jasper-6/+1
* Reorder flags to group similar ones together * Make some flags more granular * Compute `HAS_FREE_LOCAL_NAMES` from the other flags * Remove `HAS_TY_CLOSURE` * Add some more doc comments
2020-02-29Rename `syntax` to `rustc_ast` in source codeVadim Petrochenkov-1/+1
2020-02-29Make it build againVadim Petrochenkov-1/+1
2020-02-28remove ScalarMaybeUndef::to_bits and make Scalar::to_bits privateRalf Jung-1/+1
2020-02-28Auto merge of #68505 - skinny121:canonicalize-const-eval-inputs, r=nikomatsakisbors-2/+2
Canonicalize inputs to const eval where needed Canonicalize inputs to const eval, so that they can contain inference variables. Which enables invoking const eval queries even if the current param env has inference variable within it, which can occur during trait selection. This is a reattempt of #67717, in a far less invasive way. Fixes #68477 r? @nikomatsakis cc @eddyb
2020-02-20Change FIXME message to indicate plan to handle inference variables within ↵Ben Lewis-2/+2
this code path.
2020-02-19Make lookup of associated item by name O(log n)Dylan MacKenzie-5/+1
2020-02-18Rollup merge of #69181 - skinny121:const-eval-return, r=oli-obkDylan DPC-2/+9
Change const eval to just return the value As discussed in https://github.com/rust-lang/rust/pull/68505#discussion_r370956535, the type of consts shouldn't be returned from const eval queries. r? @eddyb cc @nikomatsakis
2020-02-16Code review changes.Ben Lewis-2/+7
2020-02-15Change const eval to return `ConstValue`, instead of `Const` as the type ↵Ben Lewis-1/+3
inside it shouldn't be used.
2020-02-14Erase regions in opaque types in typeckMatthew Jasper-1/+3
2020-02-08Make `associated_items` query return a sliceJonas Schievink-0/+1
2020-02-07Auto merge of #65232 - nikomatsakis:lazy-norm-anon-const-push-2, r=matthewjasperbors-15/+70
replace the leak check with universes, take 2 This PR is an attempt to revive the "universe-based region check", which is an important step towards lazy normalization. Unlike before, we also modify the definition of `'empty` so that it is indexed by a universe. This sidesteps some of the surprising effects we saw before -- at the core, we no longer think that `exists<'a> { forall<'b> { 'b: 'a } }` is solveable. The new region lattice looks like this: ``` static ----------+-----...------+ (greatest) | | | early-bound and | | free regions | | | | | scope regions | | | | | empty(root) placeholder(U1) | | / | | / placeholder(Un) empty(U1) -- / | / ... / | / empty(Un) -------- (smallest) ``` This PR has three effects: * It changes a fair number of error messages, I think for the better. * It fixes a number of bugs. The old algorithm was too conservative and caused us to reject legal subtypings. * It also causes two regressions (things that used to compile, but now do not). * `coherence-subtyping.rs` gets an additional error. This is expected. * `issue-57639.rs` regresses as before, for the reasons covered in #57639. Both of the regressions stem from the same underlying property: without the leak check, the instantaneous "subtype" check is not able to tell whether higher-ranked subtyping will succeed or not. In both cases, we might be able to fix the problem by doing a 'leak-check like change' at some later point (e.g., as part of coherence). This is a draft PR because: * I didn't finish ripping out the leak-check completely. * We might want to consider a crater run before landing this. * We might want some kind of design meeting to cover the overall strategy. * I just remembered I never finished 100% integrating this into the canonicalization code. * I should also review what happens in NLL region checking -- it probably still has a notion of bottom (empty set). r? @matthewjasper
2020-02-06apply various formatting nitsNiko Matsakis-3/+3
2020-02-06index ReEmpty by universeNiko Matsakis-15/+70
We now make `'empty` indexed by a universe index, resulting in a region lattice like this: ``` static ----------+-----...------+ (greatest) | | | early-bound and | | free regions | | | | | scope regions | | | | | empty(root) placeholder(U1) | | / | | / placeholder(Un) empty(U1) -- / | / ... / | / empty(Un) -------- (smallest) ``` Therefore, `exists<A> { forall<B> { B: A } }` is now unprovable, because A must be at least Empty(U1) and B is placeholder(U2), and hence the two regions are unrelated.
2020-02-02Add a resume type param to the generator substsJonas Schievink-9/+32
...and unify it with `()` for now
2020-01-27don't clone types that are copy, round two.Matthias Krüger-1/+1
2020-01-23unused-parens: implement for block return valuesTyler Lanphear-1/+1
2020-01-20Add `ConstnessAnd` that implements `ToPredicate`Dylan MacKenzie-3/+7
2020-01-10Promote `Ref`s to constants instead of staticSantiago Pastorino-6/+7
2020-01-09{rustc::util -> rustc_data_structures}::capturesMazdak Farrokhzad-3/+2
2020-01-05Remove rustc_hir reexports in rustc::hir.Mazdak Farrokhzad-2/+2
2020-01-02Normalize `syntax::symbol` imports.Mazdak Farrokhzad-1/+1
2019-12-22Format the worldMark Rousskov-236/+300