about summary refs log tree commit diff
path: root/src/librustc_mir
AgeCommit message (Collapse)AuthorLines
2019-11-30move GateIssue to rustc_feature & simplify emit_feature_errMazdak Farrokhzad-24/+24
2019-11-29Use recursion_limit for const eval stack limitcad97-1/+1
2019-11-30rustc: move mir::SourceScopeLocalData to a field of SourceScopeData.Eduard-Mihai Burtescu-38/+30
2019-11-30rustc_mir: fix inliner to also copy over source_scope_local_data.Eduard-Mihai Burtescu-1/+10
2019-11-30rustc: move MIR source_scope_local_data's ClearCrossCrate to be around elements.Eduard-Mihai Burtescu-113/+79
2019-11-29Rollup merge of #66844 - RalfJung:caller-location-leak, r=oli-obkRalf Jung-5/+9
Miri: do not consider memory allocated by caller_location leaked Fixes https://github.com/rust-lang/miri/issues/1071 r? @oli-obk I am not sure if this is the best approach, but it certainly is the easiest.
2019-11-29Rollup merge of #66793 - matthewjasper:record-static-refs, r=cramertjRalf Jung-8/+1
Record temporary static references in generator witnesses Closes #66695 * Record the pointer to static's type in MIR. * Normalize the static's type (so that constants can be compared correctly).
2019-11-29SimplifyArmIdentity only for locals with the same typeTomasz Miąsko-1/+7
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
2019-11-29Auto merge of #66321 - ninjasource:async-fn-resume-after-completion, r=oli-obkbors-57/+80
Async fn resume after completion #65419 -- Attempting to run an async fn after completion mentions generators Not yet ready for review - work in progress Just need to run the tests on a proper build server
2019-11-29minor fixMark Mansi-5/+1
2019-11-29remove get_named_spanMark Mansi-39/+5
2019-11-29rename to AnonRegionFromAsyncFnMark Mansi-10/+9
2019-11-29improve lifetime errors with implicit trait object lifetimesMark Mansi-18/+33
2019-11-29Only memoize const fn calls during const evalOliver Scherer-13/+15
Miri and other engines may want to execute the function in order to detect UB inside of them.
2019-11-29Auto merge of #66567 - estebank:suggest-copy, r=Centrilbors-7/+11
Use structured suggestion when requiring `Copy` constraint in type param
2019-11-28review commentsEsteban Küber-1/+3
2019-11-28Deduplicate type param constraint suggestion codeEsteban Küber-57/+7
2019-11-28Use structured suggestion when requiring `Copy` constraint in type paramEsteban Küber-6/+58
2019-11-28do not consider memory allocated by caller_location leakedRalf Jung-5/+9
2019-11-28Auto merge of #66642 - ecstatic-morse:promotion-in-const, r=eddybbors-100/+4
Create promoted MIR fragments for `const` and `static`s Resolves #65732. The previous strategy of removing `Drop` and `StorageDead` for promoted locals only worked for rvalue lifetime extension and only if no `loop`s were present. This PR applies the approach currently used for `fn` and `const fn`s to `const` and `statics`. This may have some performance impacts. r? @eddyb
2019-11-28Auto merge of #66603 - Nadrieril:fix-65413, r=varkorbors-36/+30
Fix #65413 #65413 was due to an oversight in `pat_constructor` that didn't check if a particular const value was maybe a slice/array const.
2019-11-28Moved tests and fixed merge conflictDavid Haig-1/+0
2019-11-28const_prop: detect and avoid catching Miri errors that require allocationRalf Jung-7/+25
2019-11-28Fail fast if generator_kind is NoneDavid Haig-8/+9
2019-11-28Block indent formattingDavid Haig-19/+22
2019-11-28Reduced repetition by refactoring new body to constructor functionDavid Haig-41/+40
2019-11-28Fixed tidy errorsDavid Haig-4/+10
2019-11-28Remove duplication using single variant for errorDavid Haig-21/+8
2019-11-28SquashDavid Haig-29/+57
2019-11-28Auto merge of #66294 - davidhewitt:const_fn_memoization, r=oli-obkbors-2/+42
Add memoization for const function evaluations When a const function is being evaluated, as long as all its arguments are zero-sized-types (or it has no arguments) then we can trivially memoize the evaluation result using the existing query mechanism. With thanks to @oli-obk for mentoring me through this at RustFest Barcelona. r? @oli-obk
2019-11-27Don't treat a reference to a `static` as a reborrowDylan MacKenzie-0/+13
They now look the same in the MIR after #66587.
2019-11-27Remove `CheckOpResult`Dylan MacKenzie-14/+6
2019-11-27commentRalf Jung-0/+7
2019-11-27handle diverging functions forwarding their return placeRalf Jung-15/+16
2019-11-27Rollup merge of #66798 - bwignall:typo, r=varkorTyler Mandry-5/+5
Fix spelling typos Should be non-semantic. Uses https://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines to find likely typos.
2019-11-27Rollup merge of #66722 - matthewjasper:non_exhaustive_borrowck, r=varkorTyler Mandry-1/+1
Handle non_exhaustive in borrow checking Borrow check can tell whether a pattern is exhaustive or not, make sure that `non_exhaustive` prevents this.
2019-11-27Rollup merge of #66222 - Aaron1011:fix/opaque-closure, r=pnkfelixTyler Mandry-4/+16
Use `eq_opaque_type_and_type` when type-checking closure signatures This handles the case where a user explicitly annotations a closure signature with a opaque return type. Fixes #63263
2019-11-27Remove `derived_from_illegal_borrow`Dylan MacKenzie-41/+1
2019-11-27Remove `Rvalue::Ref` handling from `HasMutInterior`Dylan MacKenzie-29/+1
2019-11-27Handle `Rvalue::Ref` in one placeDylan MacKenzie-71/+106
2019-11-27Use type-based qualification for staticsDylan MacKenzie-3/+4
2019-11-27Add `#![feature(matches_macro)]`Dylan MacKenzie-0/+1
2019-11-27rustc: move debug info from LocalDecl and UpvarDecl into a dedicated ↵Eduard-Mihai Burtescu-201/+355
VarDebugInfo.
2019-11-27Correct typo in src/librustc_mir/const_eval.rsDavid Hewitt-1/+1
Co-Authored-By: lqd <remy.rakic+github@gmail.com>
2019-11-27Add memoization for const function evaluationsDavid Hewitt-2/+42
When a const function is being evaluated, as long as all its arguments are zero-sized-types (or it has no arguments) then we can trivially memoize the evaluation result using the existing query mechanism.
2019-11-27Auto merge of #66677 - wesleywiser:fix_const_prop_alloc_id_ice, r=oli-obkbors-28/+46
[const prop] Fix "alloc id without corresponding allocation" ICE r? @oli-obk
2019-11-26Fix spelling typosBrian Wignall-5/+5
2019-11-27Auto merge of #66794 - tmandry:rollup-99qrpr0, r=tmandrybors-32/+29
Rollup of 14 pull requests Successful merges: - #66128 (alloc: Add new_zeroed() versions like new_uninit().) - #66661 (Add riscv64gc-unknown-linux-gnu target) - #66663 (Miri: print leak report even without tracing) - #66711 (Add hardware floating point features to aarch64-pc-windows-msvc) - #66713 (introduce a target to build the kernel of the unikernel HermitCore) - #66717 (tidy: Accommodate rustfmt's preferred layout of stability attributes) - #66719 (Store pointer width as u32 on Config) - #66720 (Move ErrorReported to rustc_errors) - #66737 (Error codes cleanup) - #66754 (Various tweaks to diagnostic output) - #66763 (Minor edit for documentation-tests.md that increases clarity) - #66779 (follow the same function order in the trait) - #66786 (Add wildcard test for const_if_match) - #66788 (Allow `Unreachable` terminators through `min_const_fn` checks) Failed merges: r? @ghost
2019-11-26Rollup merge of #66788 - ecstatic-morse:const-fn-unreachable, r=CentrilTyler Mandry-0/+3
Allow `Unreachable` terminators through `min_const_fn` checks Resolves #66756. This allows `Unreachable` terminators through the `min_const_fn` checks if `#![feature(const_if_match)]` is enabled. We could probably just allow them with no feature flag, but it seems okay to be conservative here. r? @oli-obk
2019-11-26Rollup merge of #66754 - estebank:rustdoc-capitalization, r=Dylan-DPCTyler Mandry-19/+8
Various tweaks to diagnostic output