about summary refs log tree commit diff
path: root/src/test/ui/consts/const-eval/ub-enum.stderr
AgeCommit message (Collapse)AuthorLines
2021-03-31Rename stderr->64bit.stderr where needed.Hameer Abbasi-146/+0
2021-03-31Add allocation information to undefined behaviour errors.Hameer Abbasi-0/+39
2020-09-19Stop using the `const_eval` query for initializers of staticsOliver Scherer-4/+4
As a side effect, we now represent most promoteds as `ConstValue::Scalar` again. This is useful because all implict promoteds are just references anyway and most explicit promoteds are numeric arguments to `asm!` or SIMD instructions.
2020-07-10Rollup merge of #73989 - RalfJung:ub-enum-test, r=oli-obkManish Goregaokar-6/+6
adjust ub-enum test to be endianess-independent @cuviper noted that our test fails on "other" endianess systems (I never know which is which^^), so let's fix that.
2020-07-05catch errors more locally around read_discriminantRalf Jung-2/+2
2020-07-03adjust ub-enum test to be endianess-independentRalf Jung-6/+6
2020-06-19Rollup merge of #72497 - RalfJung:tag-term, r=oli-obkRalf Jung-2/+2
tag/niche terminology cleanup The term "discriminant" was used in two ways throughout the compiler: * every enum variant has a corresponding discriminant, that can be given explicitly with `Variant = N`. * that discriminant is then encoded in memory to store which variant is active -- but this encoded form of the discriminant was also often called "discriminant", even though it is conceptually quite different (e.g., it can be smaller in size, or even use niche-filling). After discussion with @eddyb, this renames the second term to "tag". The way the tag is encoded can be either `TagEncoding::Direct` (formerly `DiscriminantKind::Tag`) or `TagEncoding::Niche` (formerly `DiscrimianntKind::Niche`). This finally resolves some long-standing confusion I had about the handling of variant indices and discriminants, which surfaced in https://github.com/rust-lang/rust/pull/72419. (There is also a `DiscriminantKind` type in libcore, it remains unaffected. I think this corresponds to the discriminant, not the tag, so that seems all right.) r? @eddyb
2020-05-30miri errors: rename InvalidDiscriminant -> InvalidTagRalf Jung-2/+2
2020-05-30miri validation: clarify valid values of 'char'Ralf Jung-1/+1
2020-05-12Pointer printing: do not print 0 offsetRalf Jung-5/+5
2020-04-27keep 'pointer' terminology aroundRalf Jung-5/+5
2020-04-26organize Debug/Display impls a bit more; avoid sign-ignorant decimal displayRalf Jung-21/+21
2020-03-08fix type size mismatch on 32bitRalf Jung-17/+17
2020-03-06please tidyRalf Jung-13/+13
2020-03-06test some more kinds of enums with uninhabited variantsRalf Jung-10/+42
2020-03-06const validation ub tests: use transmute instead of unionsRalf Jung-26/+26
2020-02-26miri: validity visitor comments and path printing improvementsRalf Jung-1/+1
2020-02-18miri value visitor: fix some wrong assumptions about layout; improve error ↵Ralf Jung-7/+7
messages
2019-09-06Fixed grammar/style in error messages and reblessed tests.Alexander Regueiro-9/+9
2019-08-30const-eval tests: make all unions repr(C)Ralf Jung-9/+9
2019-07-04improve validity error range printing for singleton rangesRalf Jung-2/+2
2019-07-04turns out that dangling pointer branch is dead code; remove it and improve ↵Ralf Jung-20/+36
the error that actually gets shown a bit
2018-12-25Remove licensesMark Rousskov-7/+7
2018-11-19we now do proper validation on scalarsRalf Jung-4/+4
2018-11-15do not accept out-of-bounds pointers in enum discriminants, they might be NULLRalf Jung-6/+14
2018-11-15validation: better error when the enum discriminant is UndefRalf Jung-1/+1
2018-11-12miri-engine value visitor update to VariantIdxOliver Scherer-1/+1
2018-11-07pretty-print scalar range that only has an upper boundRalf Jung-1/+1
2018-11-07do not print wrapping ranges like normal ranges in diagnosticsRalf Jung-12/+28
2018-11-05Also test for undef in enum discriminantRalf Jung-3/+11
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-5/+5
2018-10-25Report const eval error inside the queryOliver Schneider-3/+3
2018-10-09also validate everything that has a Scalar layout, to catch NonNullRalf Jung-1/+1
2018-10-09switch validation of scalars to be type-drivenRalf Jung-1/+1
This does not actually regress anything. It would regress NonNull, but we didn't handle that correctly previously either.
2018-08-28address nitsRalf Jung-2/+2
2018-08-27validate enum discriminant whenever it is readRalf Jung-2/+2
2018-08-22optimize sanity check path printingRalf Jung-0/+27
During the sanity check, we keep track of the path we are below in a `Vec`. We avoid cloning that `Vec` unless we hit a pointer indirection. The `String` representation is only computed when validation actually fails.