summary refs log tree commit diff
path: root/src/test/ui/consts
AgeCommit message (Collapse)AuthorLines
2018-11-22Replace the ICEing on const fn loops with an errorOliver Scherer-0/+13
2018-11-12Add missing `rustc_promotable` attribute to unsigned `min_value` and `max_value`Oliver Scherer-0/+74
2018-11-01Fix wrong validation clasisfication of `Option<&T>::Some` valuesOliver Scherer-0/+18
2018-10-31Fix an ICE in the min_const_fn analysisOliver Scherer-0/+23
2018-10-21Use new region infer errors for explaining borrowsMatthew Jasper-132/+132
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-19Auto merge of #55194 - kennytm:rollup, r=kennytmbors-0/+61
Rollup of 7 pull requests Successful merges: - #54300 (Updated RELEASES.md for 1.30.0) - #55013 ([NLL] Propagate bounds from generators) - #55071 (Fix ICE and report a human readable error) - #55144 (Cleanup resolve) - #55166 (Don't warn about parentheses on `match (return)`) - #55169 (Add a `copysign` function to f32 and f64) - #55178 (Stabilize slice::chunks_exact(), chunks_exact_mut(), rchunks(), rchunks_mut(), rchunks_exact(), rchunks_exact_mut())
2018-10-19Rollup merge of #55071 - oli-obk:const_cast_🍨, r=RalfJungkennytm-0/+61
Fix ICE and report a human readable error fixes #55063 r? @RalfJung
2018-10-19Auto merge of #55004 - oli-obk:sized_static, r=cramertjbors-24/+17
Check the type of statics and constants for `Sized`ness fixes #54410
2018-10-17Update output for borrowck=migrate compare mode.David Wood-4/+10
This commit updates the test output for the updated NLL compare mode that uses `-Z borrowck=migrate` rather than `-Z borrowck=mir`. The previous commit changes `compiletest` and this commit only updates `.nll.stderr` files.
2018-10-16Check the type of statics and constants for `Sized`nessOliver Scherer-24/+17
2018-10-15Add trailing newline to satisfy tidyOliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer-1/+1
2018-10-15Try to trigger some error casesOliver Scherer-0/+46
2018-10-14Fix ICE and report a human readable errorOliver Scherer-0/+15
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-12Auto merge of #54715 - oli-obk:nll_deref_promotion, r=RalfJungbors-0/+37
Fix #54224 (const promotion regression) r? @eddyb
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.
2018-10-09check that entire ref is in-bounds before recursing; add macro for ↵Ralf Jung-9/+30
validation msgs on error
2018-10-05Stabilize `min_const_fn`Oliver Schneider-121/+117
2018-10-03Move platform dependent output ui tests to compile-failOliver Schneider-184/+0
2018-10-03Only promote calls to `#[rustc_promotable]` const fnsOliver Schneider-21/+233
2018-10-02Rollup merge of #54702 - RalfJung:fn-ptr-promotion, r=oli-obkPietro Albini-4/+27
do not promote comparing function pointers This *could* break existing code that relied on fn ptr comparison getting promoted to `'static` lifetime. Fixes https://github.com/rust-lang/rust/issues/54696
2018-10-01Fix #54224 (const promotion regression)Oliver Schneider-0/+37
2018-09-30also compile-fail test fn ptr comparison promotionRalf Jung-4/+27
2018-09-30do not normalize non-scalar constants to a ConstValue::ScalarPairRalf Jung-4/+6
2018-09-25Update E0714 to E0716 in tests outputMikhail Modin-30/+30
2018-09-25Change the diagnostic number from 714 to 716.Felix S. Klock II-13/+13
2018-09-25add "temporary value dropped while borrowed" errorMikhail Modin-8/+360
Issue #54131
2018-09-24Update ui testsMatthew Jasper-150/+0
2018-09-19Make the span of the MIR return place point to the return typeMatthew Jasper-32/+32
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