summary refs log tree commit diff
path: root/src/test/ui/consts/const-eval
AgeCommit message (Collapse)AuthorLines
2018-12-04Update testsOliver Scherer-0/+1
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
2018-10-25Deduplicate all the ~~things~~ errorsOliver Schneider-98/+52
2018-10-25Report const eval error inside the queryOliver Schneider-472/+737
2018-10-21Use new region infer errors for explaining borrowsMatthew Jasper-36/+36
This gives at least some explanation for why a borrow is expected to last for a certain free region. Also: * Reports E0373: "closure may outlive the current function" with NLL. * Special cases the case of returning a reference to (or value referencing) a local variable or temporary (E0515). * Special case assigning a reference to a local variable in a closure to a captured variable.
2018-10-19skip user-type annotations if they don't have regionsNiko Matsakis-19/+4
2018-10-19lowering casts in constants now creates multiple usesNiko Matsakis-6/+21
This can trigger more errors than before. Not sure what is the best fix here.
2018-10-16Check the type of statics and constants for `Sized`nessOliver Scherer-10/+7
2018-10-13validation: accept pointers in integer arraysRalf Jung-1/+12
2018-10-13Fix and test upvar name printing for validityRalf Jung-0/+36
2018-10-09unify handling of thin and fat pointers by moving primitive type handling ↵Ralf Jung-8/+19
out of aggregate handling Also, make enum variant handling a bit nicer
2018-10-09add some tests with constants that better be validRalf Jung-0/+18
2018-10-09move a test to a better placeRalf Jung-0/+254
2018-10-09also validate everything that has a Scalar layout, to catch NonNullRalf Jung-4/+56
2018-10-09fix validating arrays of ZSTsRalf Jung-14/+23
Fixes #54751
2018-10-09switch validation of scalars to be type-drivenRalf Jung-32/+50
This does not actually regress anything. It would regress NonNull, but we didn't handle that correctly previously either.