summary refs log tree commit diff
path: root/src/librustc_mir/transform
AgeCommit message (Collapse)AuthorLines
2018-06-08Do not promote union field accessesOliver Schneider-2/+8
2018-05-24Always mark unstable const fn as not constOliver Schneider-7/+2
2018-05-24Enforce stability of const fn in promotedsOliver Schneider-12/+19
2018-05-05add `Location::START` constNiko Matsakis-2/+2
2018-05-02Auto merge of #50282 - fitzgen:run-more-passes-on-constant-mir, r=nikomatsakisbors-48/+2
Run more passes on constant mir Not very familiar with this code, but everything seems to be working! r? @eddyb
2018-05-02Auto merge of #50278 - eddyb:mir-succ-iter, r=nikomatsakisbors-7/+7
rustc: return iterators from Terminator(Kind)::successors(_mut). Minor cleanup (and potentially speedup) prompted by @nnethercote's `SmallVec` experiments. This PR assumes `.count()` and `.nth(i)` on `iter::Chain<option::IntoIter, slice::Iter(Mut)>` are `O(1)`, but otherwise all of the uses appear to immediately iterate through the successors. r? @nikomatsakis
2018-05-01rustc: return impl Iterator from Terminator(Kind)::successors(_mut).Eduard-Mihai Burtescu-7/+7
2018-04-30Unify MIR assert messages and const eval errorsOliver Schneider-7/+14
2018-04-30Merge ConstMathError into EvalErrorKindOliver Schneider-1/+1
2018-04-27Auto merge of #50102 - Zoxc:query-nomacro, r=michaelwoeristerbors-1/+1
Move query code outside macros and store query jobs separately from query results Based on https://github.com/rust-lang/rust/pull/50067 r? @michaelwoerister
2018-04-27mir: Deaggregate constant MIRNick Fitzgerald-20/+1
Appears to work now that miri has merged.
2018-04-27mir: Run drop elaboration on constant MIRNick Fitzgerald-8/+0
Seems to Just Work since miri merged.
2018-04-27mir: Run copy propagation on constant mirNick Fitzgerald-20/+1
Now that miri is merged, this seems to Just Work!
2018-04-27Auto merge of #50097 - glandium:box_free, r=nikomatsakisbors-63/+2
Partial future-proofing for Box<T, A> In some ways, this is similar to @eddyb's PR #47043 that went stale, but doesn't cover everything. Notably, this still leaves Box internalized as a pointer in places, so practically speaking, only ZSTs can be practically added to the Box type with the changes here (the compiler ICEs otherwise). The Box type is not changed here, that's left for the future because I want to test that further first, but this puts things in place in a way that hopefully will make things easier.
2018-04-27Move query functions out from the define_maps! macroJohn Kåre Alsaker-1/+1
2018-04-27Rename InternedString to LocalInternedString and introduce a new thread-safe ↵John Kåre Alsaker-7/+7
InternedString
2018-04-26Auto merge of #50253 - nikomatsakis:regressions-2018-04-26, r=eddybbors-1/+1
drop elaboration should reveal all This used to happen implicitly through the normalization function; but we now keep the param-env as is, which seems less surprising. cc #49685 r? @eddyb
2018-04-26use `reveal_all` during drop elaborationNiko Matsakis-1/+1
This used to happen by default as part of the normalization routine that was being used.
2018-04-26rustc_target: move in syntax::abi and flip dependency.Irina Popa-3/+3
2018-04-26rustc_target: move LayoutOf's type parameter to an associated type.Irina Popa-1/+2
2018-04-23Auto merge of #49779 - oli-obk:const_err_regression, r=eddybbors-2/+2
Don't report compile-time errors for promoteds Fixes the regression part of #49760, the missing warnings still are missing r? @eddyb
2018-04-20Pass the right type to box_free() in MIRMike Hommey-63/+2
Currently, MIR just passes the raw Box to box_free(), which happens to work because practically, it's the same thing. But that might not be true in the future, with Box<T, A: Alloc>. The MIR inline pass actually fixes up the argument while inlining box_free, but this is not enabled by default and doesn't necessarily happen (the inline threshold needs to be passed). This change effectively moves what the MIR inline pass does to the elaborate_drops pass, so that box_free() is passed the raw pointer instead of the Box.
2018-04-18Clarified E0015 message, r=estebankkrk-2/+2
2018-04-15Only warn on erroneous promoted constantsOliver Schneider-2/+2
2018-03-27Auto merge of #49202 - csmoe:trait_engine, r=nikomatsakisbors-1/+1
Introduce trait engine address #48895 step 1: introduce trait engine
2018-03-25Rollup merge of #49194 - Zoxc:unsafe-generator, r=cramertjkennytm-10/+2
Make resuming generators unsafe instead of the creation of immovable generators cc @withoutboats Fixes #47787
2018-03-23import trait engine to typeckcsmoe-1/+1
2018-03-22Added initial processing of UserAssertTy statements.David Wood-17/+25
2018-03-22Killing UserAssertTy in CleanupPostBorrowck pass.David Wood-17/+46
2018-03-22Added UserAssertTy statement.David Wood-0/+6
2018-03-21Make resuming generators unsafe instead of the creation of immovable ↵John Kåre Alsaker-10/+2
generators. Fixes #47787
2018-03-14Add note about fallback to `!: !Trait` errorAndrew Cann-1/+1
2018-03-14remove defaulting to unitAndrew Cann-1/+1
Types will no longer default to `()`, instead always defaulting to `!`. This disables the associated warning and removes the flag from TyTuple
2018-03-13`trans_apply_param_substs` => `subst_and_normalize_erasing_regions`Niko Matsakis-27/+7
Consolidate `trans_apply_param_substs` and `trans_apply_param_substs_env`. Also remove `trans_impl_self_ty`
2018-03-13refactor `ParamEnv::empty(Reveal)` into two distinct methodsNiko Matsakis-2/+2
- `ParamEnv::empty()` -- does not reveal all, good for typeck - `ParamEnv::reveal_all()` -- does, good for trans - `param_env.with_reveal_all()` -- converts an existing parameter environment
2018-03-08simplify constant value pair field accessOliver Schneider-6/+1
2018-03-08Unify the const folding errorsOliver Schneider-31/+111
before they differed depending on whether optimizations were on or not
2018-03-08Regenerate testsOliver Schneider-1/+1
2018-03-08Generator assertions are unconditionally triggeredOliver Schneider-4/+6
2018-03-08Don't use the undefined bytes of PrimVal::BytesOliver Schneider-3/+2
2018-03-08Rebase falloutOliver Schneider-2/+2
2018-03-08Unregress error spans in constant errorsOliver Schneider-1/+1
2018-03-08Tidy fixOliver Schneider-4/+2
2018-03-08Update testsOliver Schneider-1/+1
2018-03-08Report all errors other than those about insufficient type informationOliver Schneider-2/+4
2018-03-08Compute the ParamEnv only once and use it to call tcx.const_evalOliver Schneider-9/+25
2018-03-08Can only const prop temporariesOliver Schneider-1/+6
Variables might error in branches that are not reachable due to the variable value.
2018-03-08Simplify const propagator by removing unused code pathsOliver Schneider-71/+52
2018-03-08Rename OptimizationFinder and don't propagate any borrowsOliver Schneider-38/+12
2018-03-08Simplify const prop checks through PlaceContextOliver Schneider-53/+51