rust/src/test/ui/consts/const-eval
bors 3f7c718926 Auto merge of #54125 - varkor:less-conservative-uninhabitedness-check, 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-20 22:04:21 +00:00
..
auxiliary Satisfy tidy 2018-08-25 15:54:09 +02:00
assign-to-static-within-other-static-2.rs Reenable const_let feature gate 2018-11-30 09:44:15 +01:00
assign-to-static-within-other-static-2.stderr Reenable const_let feature gate 2018-11-30 09:44:15 +01:00
assign-to-static-within-other-static.rs Reenable const_let feature gate 2018-11-30 09:44:15 +01:00
assign-to-static-within-other-static.stderr Reenable const_let feature gate 2018-11-30 09:44:15 +01:00
conditional_array_execution.rs Report const eval error inside the query 2018-10-25 16:46:19 +02:00
conditional_array_execution.stderr Report const eval error inside the query 2018-10-25 16:46:19 +02:00
const-eval-overflow-2.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
const-eval-overflow-2.stderr Report const eval error inside the query 2018-10-25 16:46:19 +02:00
const-eval-overflow-3.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
const-eval-overflow-3.stderr Report const eval error inside the query 2018-10-25 16:46:19 +02:00
const-eval-overflow-3b.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
const-eval-overflow-3b.stderr Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
const-eval-overflow-4.rs Report const eval error inside the query 2018-10-25 16:46:19 +02:00
const-eval-overflow-4.stderr Report const eval error inside the query 2018-10-25 16:46:19 +02:00
const-eval-overflow-4b.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
const-eval-overflow-4b.stderr Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
const-eval-overflow2.rs Various minor/cosmetic improvements to code 2018-12-07 23:53:34 +00:00
const-eval-overflow2.stderr add the lint back to the list, and fix tests 2018-10-25 16:48:15 +02:00
const-eval-overflow2b.rs Various minor/cosmetic improvements to code 2018-12-07 23:53:34 +00:00
const-eval-overflow2b.stderr add the lint back to the list, and fix tests 2018-10-25 16:48:15 +02:00
const-eval-overflow2c.rs Various minor/cosmetic improvements to code 2018-12-07 23:53:34 +00:00
const-eval-overflow2c.stderr add the lint back to the list, and fix tests 2018-10-25 16:48:15 +02:00
const-eval-span.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
const-eval-span.stderr Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
const-pointer-values-in-various-types.rs Make const_eval_raw query return just an AllocId 2018-11-19 22:42:46 +01:00
const-pointer-values-in-various-types.stderr we now do proper validation on scalars 2018-11-19 23:02:28 +01:00
const_let.rs Reenable const_let feature gate 2018-11-30 09:44:15 +01:00
const_let.stderr Reenable const_let feature gate 2018-11-30 09:44:15 +01:00
const_panic.rs Report const eval error inside the query 2018-10-25 16:46:19 +02:00
const_panic.stderr Report const eval error inside the query 2018-10-25 16:46:19 +02:00
const_panic_libcore.rs Report const eval error inside the query 2018-10-25 16:46:19 +02:00
const_panic_libcore.stderr Report const eval error inside the query 2018-10-25 16:46:19 +02:00
const_panic_libcore_main.rs Report const eval error inside the query 2018-10-25 16:46:19 +02:00
const_panic_libcore_main.stderr Rebase fallout in ui output 2018-10-25 16:47:35 +02:00
const_prop_errors.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
const_raw_ptr_ops.rs Report const eval error inside the query 2018-10-25 16:46:19 +02:00
const_raw_ptr_ops.stderr Report const eval error inside the query 2018-10-25 16:46:19 +02:00
const_signed_pat.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
const_transmute.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
dont_promote_unstable_const_fn.nll.stderr Fixed nll stderr file. 2018-12-08 03:17:54 +00:00
dont_promote_unstable_const_fn.rs Only promote calls to #[rustc_promotable] const fns 2018-10-03 10:07:05 +02:00
dont_promote_unstable_const_fn.stderr Various minor/cosmetic improvements to code 2018-12-07 23:53:34 +00:00
dont_promote_unstable_const_fn_cross_crate.nll.stderr Use new region infer errors for explaining borrows 2018-10-21 12:35:00 +01:00
dont_promote_unstable_const_fn_cross_crate.rs Check cross crate stability of const fn 2018-08-25 15:31:24 +02:00
dont_promote_unstable_const_fn_cross_crate.stderr Check cross crate stability of const fn 2018-08-25 15:31:24 +02:00
double_check.rs Fix double_check tests on big-endian targets 2018-11-01 01:03:20 +00:00
double_check2.rs Fix double_check tests on big-endian targets 2018-11-01 01:03:20 +00:00
double_check2.stderr fix validation error on non-integer enum discriminants 2018-11-05 09:17:48 +01:00
double_promotion.rs Don't try to promote already promoted out temporaries 2018-10-04 17:07:06 +02:00
duration_conversion.rs constify parts of libcore. 2018-11-10 01:07:32 +01:00
enum_discr.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
extern_fat_pointer.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
feature-gate-const_fn_union.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
feature-gate-const_fn_union.stderr Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
feature-gate-const_panic.rs Reexpose stability hole in the presence of feature gates 2018-08-22 18:31:53 +02:00
feature-gate-const_panic.stderr Reexpose stability hole in the presence of feature gates 2018-08-22 18:31:53 +02:00
ice-generic-assoc-const.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
ice-packed.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
index_out_of_bounds.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
index_out_of_bounds.stderr Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
index_out_of_bounds_propagated.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
index_out_of_bounds_propagated.stderr Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
infinite_loop.rs Reenable const_let feature gate 2018-11-30 09:44:15 +01:00
infinite_loop.stderr Reenable const_let feature gate 2018-11-30 09:44:15 +01:00
issue-43197.rs Report const eval error inside the query 2018-10-25 16:46:19 +02:00
issue-43197.stderr Rebase fallout 2018-10-25 17:20:39 +02:00
issue-44578.rs Report const eval error inside the query 2018-10-25 16:46:19 +02:00
issue-44578.stderr Report const eval error inside the query 2018-10-25 16:46:19 +02:00
issue-47971.rs Stabilize min_const_fn 2018-10-05 10:36:14 +02:00
issue-49296.rs Add UI test for #49296 2018-10-29 00:09:32 -04:00
issue-49296.stderr Add UI test for #49296 2018-10-29 00:09:32 -04:00
issue-50706.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
issue-50814-2.rs Report const eval error inside the query 2018-10-25 16:46:19 +02:00
issue-50814-2.stderr Report const eval error inside the query 2018-10-25 16:46:19 +02:00
issue-50814.rs Report const eval error inside the query 2018-10-25 16:46:19 +02:00
issue-50814.stderr Report const eval error inside the query 2018-10-25 16:46:19 +02:00
issue-51300.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
issue-52442.rs update tests to changes on rustc master 2018-10-25 16:47:35 +02:00
issue-52442.stderr validation: better error when the enum discriminant is Undef 2018-11-15 09:58:09 +01:00
issue-52475.rs Reenable const_let feature gate 2018-11-30 09:44:15 +01:00
issue-52475.stderr Reenable const_let feature gate 2018-11-30 09:44:15 +01:00
issue-53157.rs Moved issue-53157.rs into src/test/ui/consts/const-eval/ 2018-08-20 22:23:56 +01:00
issue-53401.rs Use partial but correct vtable layout 2018-08-28 13:15:22 +02:00
issue-55541.rs also test with PhantomData 2018-11-04 14:43:05 +01:00
match-test-ptr-null.rs Report const eval error inside the query 2018-10-25 16:46:19 +02:00
match-test-ptr-null.stderr Report const eval error inside the query 2018-10-25 16:46:19 +02:00
mod-static-with-const-fn.rs Reenable const_let feature gate 2018-11-30 09:44:15 +01:00
mod-static-with-const-fn.stderr Reenable const_let feature gate 2018-11-30 09:44:15 +01:00
no_lint_for_statically_known_error.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
promote_mutable_zst_mir_borrowck.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
promoted_const_fn_fail.nll.stderr Use new region infer errors for explaining borrows 2018-10-21 12:35:00 +01:00
promoted_const_fn_fail.rs Report const eval error inside the query 2018-10-25 16:46:19 +02:00
promoted_const_fn_fail.stderr Only promote calls to #[rustc_promotable] const fns 2018-10-03 10:07:05 +02:00
promoted_const_fn_fail_deny_const_err.nll.stderr Rebase fallout 2018-10-25 17:20:39 +02:00
promoted_const_fn_fail_deny_const_err.rs Update tests 2018-12-04 10:06:05 +01:00
promoted_const_fn_fail_deny_const_err.stderr Rebase fallout 2018-10-25 17:20:39 +02:00
promoted_errors.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
promoted_errors.stderr Report const eval error inside the query 2018-10-25 16:46:19 +02:00
promoted_raw_ptr_ops.nll.stderr Reenable const_let feature gate 2018-11-30 09:44:15 +01:00
promoted_raw_ptr_ops.rs also compile-fail test fn ptr comparison promotion 2018-09-30 20:28:00 +02:00
promoted_raw_ptr_ops.stderr also compile-fail test fn ptr comparison promotion 2018-09-30 20:28:00 +02:00
pub_const_err.rs add the lint back to the list, and fix tests 2018-10-25 16:48:15 +02:00
pub_const_err.stderr Report const eval error inside the query 2018-10-25 16:46:19 +02:00
pub_const_err_bin.rs add the lint back to the list, and fix tests 2018-10-25 16:48:15 +02:00
pub_const_err_bin.stderr Report const eval error inside the query 2018-10-25 16:46:19 +02:00
ref_to_int_match.rs update tests to changes on rustc master 2018-10-25 16:47:35 +02:00
ref_to_int_match.stderr validation: better error when the enum discriminant is Undef 2018-11-15 09:58:09 +01:00
shift_overflow.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
shift_overflow.stderr Report const eval error inside the query 2018-10-25 16:46:19 +02:00
simple_with_undef.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
strlen.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
transmute-const-promotion.nll.stderr Use new region infer errors for explaining borrows 2018-10-21 12:35:00 +01:00
transmute-const-promotion.rs Made std::intrinsics::transmute() const fn. 2018-08-30 13:06:20 +01:00
transmute-const-promotion.stderr Made std::intrinsics::transmute() const fn. 2018-08-30 13:06:20 +01:00
transmute-const.rs Rebase fallout 2018-10-25 17:20:39 +02:00
transmute-const.stderr pretty-print scalar range that only has an upper bound 2018-11-07 13:58:43 +01:00
ub-enum.rs we now do proper validation on scalars 2018-11-19 23:02:28 +01:00
ub-enum.stderr we now do proper validation on scalars 2018-11-19 23:02:28 +01:00
ub-nonnull.rs test diagnostics for more ranges 2018-11-07 14:06:38 +01:00
ub-nonnull.stderr test diagnostics for more ranges 2018-11-07 14:06:38 +01:00
ub-ref.rs fix validation error on non-integer enum discriminants 2018-11-05 09:17:48 +01:00
ub-ref.stderr validation: better error when the enum discriminant is Undef 2018-11-15 09:58:09 +01:00
ub-uninhabit.rs Update ub-uninhabit tests 2018-12-11 11:18:55 +00:00
ub-uninhabit.stderr Fix some misbehaving tests 2018-12-11 11:18:55 +00:00
ub-upvars.rs Reenable const_let feature gate 2018-11-30 09:44:15 +01:00
ub-upvars.stderr fix validation error on non-integer enum discriminants 2018-11-05 09:17:48 +01:00
union-const-eval-field.rs Make const_eval_raw query return just an AllocId 2018-11-19 22:42:46 +01:00
union-const-eval-field.stderr we now do proper validation on scalars 2018-11-19 23:02:28 +01:00
union-ice.rs Make const_eval_raw query return just an AllocId 2018-11-19 22:42:46 +01:00
union-ice.stderr we now do proper validation on scalars 2018-11-19 23:02:28 +01:00
union-ub-fat-ptr.rs fix validation error on non-integer enum discriminants 2018-11-05 09:17:48 +01:00
union-ub-fat-ptr.stderr pretty-print scalar range that only has an upper bound 2018-11-07 13:58:43 +01:00
union-ub.rs fix validation error on non-integer enum discriminants 2018-11-05 09:17:48 +01:00
union-ub.stderr pretty-print scalar range that only has an upper bound 2018-11-07 13:58:43 +01:00
union_promotion.nll.stderr Use new region infer errors for explaining borrows 2018-10-21 12:35:00 +01:00
union_promotion.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
union_promotion.stderr Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
unused-broken-const.rs add the lint back to the list, and fix tests 2018-10-25 16:48:15 +02:00
unused-broken-const.stderr add the lint back to the list, and fix tests 2018-10-25 16:48:15 +02:00
valid-const.rs add some tests with constants that better be valid 2018-10-09 13:08:00 +02:00
zst_operand_eval.rs Use assertion-like static assertions 2018-09-11 13:30:26 +02:00