about summary refs log tree commit diff
path: root/src/test/ui/consts/const-eval
AgeCommit message (Collapse)AuthorLines
2019-01-21fix validation range printing when encountering undefRalf Jung-3/+18
2019-01-21Declare some unconst operations as unsafe in const fnOliver Scherer-12/+12
2019-01-09Stabilize `let` bindings and destructuring in constants and const fnOliver Scherer-22/+13
2018-12-25Remove licensesMark Rousskov-899/+179
2018-12-20Auto merge of #54125 - varkor:less-conservative-uninhabitedness-check, ↵bors-21/+15
r=nikomatsakis Less conservative uninhabitedness check Extends the uninhabitedness check to structs, non-empty enums, tuples and arrays. Pulled out of #47291 and #50262. Fixes https://github.com/rust-lang/rust/issues/54586. r? @nikomatsakis
2018-12-18Auto merge of #56160 - oli-obk:const_fn_let, r=nikomatsakisbors-11/+16
Fix various aspects around `let` bindings inside const functions * forbid `let` bindings in const contexts that use short circuiting operators * harden analysis code against derefs of mutable references Initially this PR was about stabilizing `let` bindings, but too many flaws were exposed that need some more testing on nightly
2018-12-11Fix some misbehaving testsvarkor-3/+3
2018-12-11Update ub-uninhabit testsvarkor-5/+5
2018-12-11Use unions for uninhabitedness checking rather than mem::transmutevarkor-25/+17
2018-12-11Update const eval uninhabited messagesvarkor-5/+7
2018-12-08Fixed nll stderr file.Alexander Regueiro-1/+1
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-4/+4
2018-12-04Update testsOliver Scherer-0/+1
2018-11-30Reenable `const_let` feature gateOliver Scherer-17/+37
2018-11-30Allow `let` bindings everywhereOliver Scherer-43/+28
2018-11-26Auto merge of #56070 - oli-obk:const_let, r=eddybbors-15/+77
Allow assignments in const contexts fixes https://github.com/rust-lang/rust/issues/54098 fixes https://github.com/rust-lang/rust/issues/51251 fixes https://github.com/rust-lang/rust/issues/52613
2018-11-20Explain missing error in testOliver Scherer-1/+4
2018-11-19we now do proper validation on scalarsRalf Jung-13/+13
2018-11-19Make const_eval_raw query return just an AllocIdRalf Jung-16/+22
2018-11-19Also catch static mutation at evaluation timeOliver Scherer-17/+45
2018-11-19Rollup merge of #56059 - alexcrichton:fix-tests, r=sfacklerkennytm-0/+27
Increase `Duration` approximate equal threshold to 1us Previously this threshold when testing was 100ns, but the Windows documentation states: > which is a high resolution (<1us) time stamp which presumably means that we could have up to 1us resolution, which means that 100ns doesn't capture "equivalent" time intervals due to various bits of rounding here and there. It's hoped that this.. Closes #56034
2018-11-19Allow assignments in const contextsOliver Scherer-16/+47
2018-11-18Auto merge of #55672 - RalfJung:miri-extern-types, r=eddybbors-0/+27
miri: accept extern types in structs if they are the only field Fixes https://github.com/rust-lang/rust/issues/55541 Cc @oli-obk @eddyb https://github.com/rust-lang/rust/issues/43467
2018-11-15do not accept out-of-bounds pointers in enum discriminants, they might be NULLRalf Jung-6/+19
2018-11-15validation: better error when the enum discriminant is UndefRalf Jung-13/+13
2018-11-13Auto merge of #55589 - oli-obk:min_length_💣, r=pnkfelixbors-1/+1
Add `VariantIdx` type and use instead of `usize`
2018-11-12miri-engine value visitor update to VariantIdxOliver Scherer-1/+1
2018-11-10adjust ui/../mod-static-with-const-fn.rsMazdak Farrokhzad-3/+15
2018-11-10fix mod-static-with-const-fn.rs.Mazdak Farrokhzad-3/+1
2018-11-10--bless mod-static-with-const-fn.stderrMazdak Farrokhzad-9/+2
2018-11-10constify parts of libcore.Mazdak Farrokhzad-2/+0
2018-11-07test diagnostics for more rangesRalf Jung-2/+32
2018-11-07pretty-print scalar range that only has an upper boundRalf Jung-7/+7
2018-11-07do not print wrapping ranges like normal ranges in diagnosticsRalf Jung-22/+47
2018-11-05the visitor can already load the value for visit_primitiveRalf Jung-1/+1
2018-11-05Also test for undef in enum discriminantRalf Jung-3/+16
The error message is sub-par, but fixing that requries moving ScalarMaybeUndef to librustc which would conflict badly with another PR that is in flight.
2018-11-05fix validation error on non-integer enum discriminantsRalf Jung-33/+42
2018-11-05reduce the amount of traversal/projection code that the visitor has to ↵Ralf Jung-2/+2
implement itself
2018-11-04also test with PhantomDataRalf Jung-3/+9
2018-11-04miri: accept extern types in structs if they are the only fieldRalf Jung-0/+21
2018-11-01Fix double_check tests on big-endian targetsSamuel Holland-10/+10
Since the enums get optimized down to 1 byte long, the bits set in the usize member don't align with the enums on big-endian machines. Avoid this issue by shrinking the integer member to the same size as the enums.
2018-10-29Add UI test for #49296memoryruins-0/+35
2018-10-26Auto merge of #55382 - kennytm:rollup, r=kennytmbors-0/+17
Rollup of 21 pull requests Successful merges: - #54816 (Don't try to promote already promoted out temporaries) - #54824 (Cleanup rustdoc tests with `@!has` and `@!matches`) - #54921 (Add line numbers option to rustdoc) - #55167 (Add a "cheap" mode for `compute_missing_ctors`.) - #55258 (Fix Rustdoc ICE when checking blanket impls) - #55264 (Compile the libstd we distribute with -Ccodegen-unit=1) - #55271 (Unimplement ExactSizeIterator for MIR traversing iterators) - #55292 (Macro diagnostics tweaks) - #55298 (Point at macro definition when no rules expect token) - #55301 (List allowed tokens after macro fragments) - #55302 (Extend the impl_stable_hash_for! macro for miri.) - #55325 (Fix link to macros chapter) - #55343 (rustbuild: fix remap-debuginfo when building a release) - #55346 (Shrink `Statement`.) - #55358 (Remove redundant clone (2)) - #55370 (Update mailmap for estebank) - #55375 (Typo fixes in configure_cmake comments) - #55378 (rustbuild: use configured linker to build boostrap) - #55379 (validity: assert that unions are non-empty) - #55383 (Use `SmallVec` for the queue in `coerce_unsized`.) - #55391 (bootstrap: clean up a few clippy findings)
2018-10-26Rollup merge of #54816 - oli-obk:double_promotion, r=alexregkennytm-0/+17
Don't try to promote already promoted out temporaries fixes #53201 r? @eddyb
2018-10-25Rebase falloutOliver Schneider-184/+57
2018-10-25add the lint back to the list, and fix testsRalf Jung-201/+60
2018-10-25fix ui tests (rebase fallout)Ralf Jung-0/+1
2018-10-25Addressed minor issues brought up in review.Alexander Regueiro-8/+5
2018-10-25Rebase fallout in ui outputOliver Schneider-22/+11
2018-10-25update tests to changes on rustc masterOliver Schneider-46/+64