summary refs log tree commit diff
path: root/src/test/ui/consts
AgeCommit message (Collapse)AuthorLines
2018-10-04do not normalize non-scalar constants to a ConstValue::ScalarPairRalf Jung-4/+6
2018-09-14Auto merge of #54032 - oli-obk:layout_scalar_ranges, r=eddybbors-0/+5
Add forever unstable attribute to allow specifying arbitrary scalar ranges r? @eddyb for the first commit and @nikomatsakis for the second one
2018-09-14Rollup merge of #53829 - alexcrichton:release-debuginfo, r=michaelwoeristerkennytm-0/+2
Add rustc SHA to released DWARF debuginfo This commit updates the debuginfo that is encoded in all of our released artifacts by default. Currently it has paths like `/checkout/src/...` but these are a little inconsistent and have changed over time. This commit instead attempts to actually define the file paths in our debuginfo to be consistent between releases. All debuginfo paths are now intended to be `/rustc/$sha` where `$sha` is the git sha of the released compiler. Sub-paths are all paths into the git repo at that `$sha`.
2018-09-14Rollup merge of #54147 - agnxy:const-eval-test, r=oli-obkkennytm-0/+55
Add a test that tries to modify static memory at compile-time Attempt to fix #53818 cc @oli-obk
2018-09-12Add a test that tries to modify static memory at compile-timeAndrew Xu-0/+55
2018-09-11Use assertion-like static assertionsOliver Schneider-1/+1
2018-09-11Fix const eval of ZST index operations to make the static assertion workOliver Schneider-0/+5
2018-09-10Add rustc SHA to released DWARF debuginfoAlex Crichton-0/+2
This commit updates the debuginfo that is encoded in all of our released artifacts by default. Currently it has paths like `/checkout/src/...` but these are a little inconsistent and have changed over time. This commit instead attempts to actually define the file paths in our debuginfo to be consistent between releases. All debuginfo paths are now intended to be `/rustc/$sha` where `$sha` is the git sha of the released compiler. Sub-paths are all paths into the git repo at that `$sha`.
2018-09-10WIP remove incorrect nll.stderr reference filesNiko Matsakis-56/+0
2018-09-10insert `AscribeUserType` for ascriptionsNiko Matsakis-1/+22
2018-09-08Auto merge of #51366 - japaric:stable-panic-impl, r=Mark-Simulacrumbors-7/+6
stabilize #[panic_handler] closes #44489 ### Update(2018-09-07) This was proposed for stabilization in https://github.com/rust-lang/rust/issues/44489#issuecomment-398965881 and its FCP with disposition to merge / accept is nearly over. The summary of what's being stabilized can be found in https://github.com/rust-lang/rust/issues/44489#issuecomment-416645946 Documentation PRs: - Reference. https://github.com/rust-lang-nursery/reference/pull/362 - Nomicon. https://github.com/rust-lang-nursery/nomicon/pull/75 --- `#[panic_implementation]` was implemented recently in #50338. `#[panic_implementation]` is basically the old `panic_fmt` language item but in a less error prone (\*) shape. There are still some issues and questions to sort out around this feature (cf. #44489) but this PR is meant to start a discussion about those issues / questions with the language team. (\*) `panic_fmt` was not type checked; changes in its function signature caused serious, silent binary size regressions like the one observed in #43054 Some unresolved questions from #44489: > Should the Display of PanicInfo format the panic information as "panicked at 'reason', > src/main.rs:27:4", as "'reason', src/main.rs:27:4", or simply as "reason". The current implementation formats `PanicInfo` as the first alternative, which is how panic messages are formatted by the `std` panic handler. The `Display` implementation is more than a convenience: `PanicInfo.message` is unstable so it's not possible to replicate the `Display` implementation on stable. > Is this design compatible, or can it be extended to work, with unwinding implementations for > no-std environments? I believe @whitequark made more progress with unwinding in no-std since their last comment in #44489. Perhaps they can give us an update? --- Another unresolved question is where this feature should be documented. The feature currently doesn't have any documentation. cc @rust-lang/lang cc @jackpot51 @alevy @phil-opp
2018-09-07stabilize `#[panic_handler]`Jorge Aparicio-7/+6
2018-09-07Rollup merge of #53991 - TimDiekmann:fix-unchecked-intrinsics, r=oli-obkkennytm-0/+41
Add unchecked_shl/shr check for intrinsics to fix miri's test suit r? @RalfJung cc @oli-obk #53697 broke miri's test suite as described in [this comment](https://github.com/rust-lang/rust/pull/53697#issuecomment-419034668). This PR adds test for the `unchecked_shr/shl` for the intrinsics.
2018-09-06Auto merge of #52626 - brunocodutra:issue-52475, r=oli-obkbors-0/+67
Fix issue #52475: Make loop detector only consider reachable memory As [suggested](https://github.com/rust-lang/rust/pull/51702#discussion_r197585664) by @oli-obk `alloc_id`s should be ignored by traversing all `Allocation`s in interpreter memory at a given moment in time, beginning by `ByRef` locals in the stack. - [x] Generalize the implementation of `Hash` for `EvalSnapshot` to traverse `Allocation`s - [x] Generalize the implementation of `PartialEq` for `EvalSnapshot` to traverse `Allocation`s - [x] Commit regression tests Fixes #52626 Fixes https://github.com/rust-lang/rust/issues/52849
2018-09-06Add unchecked_shl/shr checks for intrinsicsTim-0/+41
2018-09-03Add regression test for #52475Bruno Dutra-0/+67
2018-09-03Auto merge of #53697 - Cyres:const-fn-int-ops, r=oli-obkbors-0/+308
Add more const int ops r? @oli-obk Tracking Issue: #53718 list of `const fn`s in this PR: - `feature = const_int_rotate` - `rotate_left` - `rotate_right` - `feature = const_int_wrapping` - `wrapping_add` - `wrapping_sub` - `wrapping_mul` - `wrapping_shl` - `wrapping_shr` - `feature = const_int_overflowing` - `overflowing_add` - `overflowing_sub` - `overflowing_mul` - `overflowing_shl` - `overflowing_shr` - `feature = const_int_sign` - `is_positive` - `is_negative` - `feature = const_int_conversion` - `reverse_bits` - `to_le_bytes` - `to_ne_bytes` - `from_be_bytes` - `from_le_bytes` - `from_ne_bytes` - `reverse_bits`
2018-09-03Auto merge of #53831 - TheDarkula:pointer-check, r=oli-obkbors-52/+343
Added pointer checking to sanity checks r? @oli-obk
2018-09-01rebaseTim-0/+308
2018-09-01Auto merge of #53604 - oli-obk:min_const_fn, r=Centril,varkorbors-10/+917
Implement the `min_const_fn` feature gate cc @RalfJung @eddyb r? @Centril implements the feature gate for #53555 I added a hack so the `const_fn` feature gate also enables the `min_const_fn` feature gate. This ensures that nightly users of `const_fn` don't have to touch their code at all. The `min_const_fn` checks are run first, and if they succeeded, the `const_fn` checks are run additionally to ensure we didn't miss anything.
2018-08-31Added pointer checking to sanity checksthedarkula-52/+343
2018-08-31Auto merge of #53699 - oli-obk:promotion_stability_hole, r=nikomatsakisbors-1/+92
Fix promotion stability hole in old borrowck r? @nikomatsakis I screwed up the promotion stability checks. Big time. They were basically nonexistant. We had tests for it. I also screwed up said tests. This is in stable already :( Basically stability checks of promotion only worked if you tried to use a const fn defined in the same crate. cc @eddyb
2018-08-31Add test that min const fns can't call unstable min const fns even with the ↵Oliver Schneider-2/+16
feature gate active
2018-08-31Restrict most uses of `const_fn` to `min_const_fn`Oliver Schneider-6/+4
2018-08-31Libstd only has `min_const_fn` const fnsOliver Schneider-0/+38
2018-08-31Implement the `min_const_fn` feature gateOliver Schneider-4/+861
2018-08-30Auto merge of #53535 - TheDarkula:master, r=oli-obkbors-9/+65
Made std::intrinsics::transmute() const fn. r? @oli-obk tracking issue: #53605
2018-08-30Made std::intrinsics::transmute() const fn.thedarkula-9/+65
2018-08-30Auto merge of #53757 - oli-obk:validation, r=RalfJungbors-0/+21
Use partial but correct vtable layout r? @RalfJung who suggested to also do this change for nightly, not just beta
2018-08-28address nitsRalf Jung-3/+3
2018-08-28Use partial but correct vtable layoutOliver Schneider-0/+21
2018-08-27validate enum discriminant whenever it is readRalf Jung-3/+3
2018-08-25Satisfy tidyOliver Schneider-1/+1
2018-08-25Check cross crate stability of const fnOliver Schneider-1/+92
2018-08-23fix new ui testJorge Aparicio-2/+2
2018-08-22Auto merge of #52011 - ↵bors-0/+230
oli-obk:dont_you_hate_it_too_when_everything_panics_constantly, r=eddyb Allow panicking with string literal messages inside constants r? @eddyb cc https://github.com/rust-lang/rust/issues/51999 we can't implement things like `panic!("foo: {}", x)` right now because we can't call trait methods (most notably `Display::fmt`) inside constants. Also most of these impls probably have loops and conditions, so it's messy anyway. But hey `panic!("foo")` works at least. cc @japaric got any test ideas for `#![no_std]`?
2018-08-22Reexpose stability hole in the presence of feature gatesOliver Schneider-0/+230
2018-08-22Rollup merge of #53558 - davidtwco:issue-53547, r=estebankGuillaume Gomez-2/+2
Normalize source line and column numbers. Fixes #53547. r? @eddyb
2018-08-22optimize sanity check path printingRalf Jung-39/+77
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.
2018-08-22fix UI testsRalf Jung-1/+1
2018-08-21Normalize source line and column numbers.David Wood-2/+2
This commit adds a normalization for line and column numbers in stderr files where the line/col is from the source directory rather than the test itself - thereby removing the need to update tests as compiler source changes.
2018-08-20Moved issue-53157.rs into src/test/ui/consts/const-eval/thedarkula-0/+23
2018-08-14Moved problematic tests on x86_64-gnu-nopt back to compile-fail.David Wood-62/+0
2018-08-14Merged migrated compile-fail tests and ui tests. Fixes #46841.David Wood-0/+5012