about summary refs log tree commit diff
path: root/src/librustc/mir
AgeCommit message (Collapse)AuthorLines
2019-04-02Replace adt_def with name in mir::ProjectionElem::DowncastTyler Mandry-38/+46
2019-04-02Improve miri's error reporting in check_in_allocLooMaclin-1/+0
2019-04-02Improve miri's error reporting in check_in_allocLooMaclin-1/+2
2019-04-02Improve miri's error reporting in check_in_allocLooMaclin-2/+1
2019-04-02Improve miri's error reporting in check_in_allocLooMaclin-25/+65
2019-04-02renames EvalErrorKind to InterpErrorkenta7777-22/+22
2019-04-01Allow closure to unsafe fn coercionTaiki Endo-2/+3
2019-03-27Rollup merge of #59430 - kenta7777:rename-evalcontext-to-interpretcx, r=oli-obkJosh Stone-1/+1
Renames `EvalContext` to `InterpretCx` This PR renames `EvalContext` to `InterpretCx` in `src/librustc_mir`. This PR is related to #54395 .
2019-03-27renames EvalContext to InterpretCx in docs and comments.kenta7777-1/+1
2019-03-26Rollup merge of #59232 - saleemjaffer:mir_place_refactor, r=oli-obkMazdak Farrokhzad-43/+34
Merge `Promoted` and `Static` in `mir::Place` fixes #53848
2019-03-24Remove `VariantDef::parent_did`Vadim Petrochenkov-2/+1
2019-03-24Separate variant id and variant constructor id.David Wood-1/+2
This commit makes two changes - separating the `NodeId` that identifies an enum variant from the `NodeId` that identifies the variant's constructor; and no longer creating a `NodeId` for `Struct`-style enum variants and structs. Separation of the variant id and variant constructor id will allow the rest of RFC 2008 to be implemented by lowering the visibility of the variant's constructor without lowering the visbility of the variant itself. No longer creating a `NodeId` for `Struct`-style enum variants and structs mostly simplifies logic as previously this `NodeId` wasn't used. There were various cases where the `NodeId` wouldn't be used unless there was an unit or tuple struct or enum variant but not all uses of this `NodeId` had that condition, by removing this `NodeId`, this must be explicitly dealt with. This change mostly applied cleanly, but there were one or two cases in name resolution and one case in type check where the existing logic required a id for `Struct`-style enum variants and structs.
2019-03-24code review fixesSaleem Jaffer-7/+4
2019-03-23Deduplicate const eval error spans for better outputEsteban Küber-1/+3
2019-03-23Swap const evaluation lint spans to point at problem in primary spanEsteban Küber-0/+11
2019-03-23adding mir::StaticKind enum for static and promotedSaleem Jaffer-26/+34
2019-03-20remove visit_static from librustc::mirSaleem Jaffer-17/+4
2019-03-18cleaner code as per reviewSaleem Jaffer-10/+0
2019-03-18promoted is still left in 2 placesSaleem Jaffer-22/+31
2019-03-16Revert the `LazyConst` PROliver Scherer-17/+14
2019-03-15Auto merge of #58556 - oli-obk:imperative_recursion, r=pnkfelixbors-13/+63
Optimize copying large ranges of undefmask blocks Hopefully fixes #58523
2019-03-15rustc: slice substs in ty::print instead of passing the full ones.Eduard-Mihai Burtescu-1/+1
2019-03-15rustc: remove PrintCx from ty::Print and rely on printers carrying TyCtxt.Eduard-Mihai Burtescu-4/+5
2019-03-15rustc: don't thread existential projections through path_generic_args.Eduard-Mihai Burtescu-1/+1
2019-03-15rustc: make util::ppaux private.Eduard-Mihai Burtescu-2/+7
2019-03-15rustc: remove fields from ty::print::PrintConfig available from tcx.Eduard-Mihai Burtescu-14/+14
2019-03-15rustc: split out the pretty-printing parts of ty::print into a separate module.Eduard-Mihai Burtescu-2/+2
2019-03-15rustc: don't pass Namespace explicitly, but rather track it in FmtPrinter.Eduard-Mihai Burtescu-1/+2
2019-03-15rustc: pass ty::print::PrintCx by value.Eduard-Mihai Burtescu-1/+1
2019-03-15rustc: split off most of ty::print::PrintCx's fields into a separate struct.Eduard-Mihai Burtescu-2/+2
2019-03-15rustc: rename item_path to def_path (except the module in ty).Eduard-Mihai Burtescu-4/+4
2019-03-15rustc: explicitly pass the namespace to PrintCx::parameterized.Eduard-Mihai Burtescu-2/+2
2019-03-15rustc: move the formatter into ty::print::PrintCx.Eduard-Mihai Burtescu-2/+2
2019-03-15rustc: tie the 'tcx between Print and PrintCx in ty::print.Eduard-Mihai Burtescu-1/+1
2019-03-15rustc: keep a TyCtxt in PrintCx and use it instead of ty::tls.Eduard-Mihai Burtescu-11/+13
2019-03-13Use derive macro for HashStableJohn Kåre Alsaker-51/+69
2019-03-12Explain the bits of `UndefMask`Oliver Scherer-0/+2
2019-03-07HirIdification: replace NodeId method callsljedrz-9/+10
2019-03-05Add ConstValue::Param and ConstValue::Infervarkor-1/+9
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-03-04Use bit operations for setting large ranges of bits in a u64Oliver Scherer-16/+33
2019-03-04No magic numbersOliver Scherer-1/+1
2019-03-04Optimize copying large ranges of undefmask blocksOliver Scherer-7/+38
2019-03-03Auto merge of #58673 - matthewjasper:typeck-ptr-coercions, r=pnkfelixbors-0/+3
[NLL] Type check operations with pointer types It seems these were forgotten about. Moving to `Rvalue::AddressOf` simplifies the coercions from references, but I want this to be fixed as soon as possible. r? @pnkfelix
2019-03-01Put Local, Static and Promoted as one Base variant of PlaceSantiago Pastorino-16/+28
2019-02-26replace &'tcx Substs with SubstsRefcsmoe-8/+8
2019-02-26Auto merge of #58561 - ljedrz:HirIdify_some_nodes, r=Zoxcbors-13/+13
Remove NodeId from some HIR nodes The next iteration of https://github.com/rust-lang/rust/pull/57578. Removes `NodeId` from: - [x] `Lifetime` - [x] `Ty` - [x] `GenericParam` - [x] `WhereClause` - [x] `WhereEqPredicate` - [x] `MacroDef` - [x] `Block` - [x] `Expr` r? @Zoxc
2019-02-25Auto merge of #57609 - matthewjasper:more-restrictive-match, r=pnkfelixbors-4/+9
Use normal mutable borrows in matches `ref mut` borrows are currently two-phase with NLL enabled. This changes them to be proper mutable borrows. To accommodate this, first the position of fake borrows is changed: ```text [ 1. Pre-match ] | [ (old create fake borrows) ] [ 2. Discriminant testing -- check discriminants ] <-+ | | | (once a specific arm is chosen) | | | [ (old read fake borrows) ] | [ 3. Create "guard bindings" for arm ] | [ (create fake borrows) ] | | | [ 4. Execute guard code ] | [ (read fake borrows) ] --(guard is false)-----------+ | | (guard results in true) | [ 5. Create real bindings and execute arm ] | [ Exit match ] ``` The following additional changes are made to accommodate `ref mut` bindings: * We no longer create fake `Shared` borrows. These borrows are no longer needed for soundness, just to avoid some arguably strange cases. * `Shallow` borrows no longer conflict with existing borrows, avoiding conflicting access between the guard borrow access and the `ref mut` borrow. There is some further clean up done in this PR: * Avoid the "later used here" note for Shallow borrows (since it's not relevant with the message provided) * Make any use of a two-phase borrow activate it. * Simplify the cleanup_post_borrowck passes into a single pass. cc #56254 r? @nikomatsakis
2019-02-24hir: remove NodeId from Blockljedrz-13/+13
2019-02-23Type check coercions to pointer typesMatthew Jasper-0/+3
2019-02-21Use normal mutable borrows in MIR match loweringMatthew Jasper-4/+9