diff options
| author | León Orell Valerian Liehr <me@fmease.dev> | 2025-05-02 20:22:13 +0200 |
|---|---|---|
| committer | León Orell Valerian Liehr <me@fmease.dev> | 2025-05-27 18:58:51 +0200 |
| commit | a83f8d02eaf36b36a7ed495e43b8bf891b6fc1af (patch) | |
| tree | ab241607b1e29614e38ab0bc50526f084f1722e0 /tests/ui/generic-const-items | |
| parent | 642e49bfed2481e54e252732be20d3c24cbec9e8 (diff) | |
| download | rust-a83f8d02eaf36b36a7ed495e43b8bf891b6fc1af.tar.gz rust-a83f8d02eaf36b36a7ed495e43b8bf891b6fc1af.zip | |
Always evaluate free lifetime-generic constants
Co-authored-by: Michael Goulet <michael@errs.io>
Diffstat (limited to 'tests/ui/generic-const-items')
| -rw-r--r-- | tests/ui/generic-const-items/def-site-eval.fail.stderr | 4 | ||||
| -rw-r--r-- | tests/ui/generic-const-items/def-site-eval.rs | 7 |
2 files changed, 5 insertions, 6 deletions
diff --git a/tests/ui/generic-const-items/def-site-eval.fail.stderr b/tests/ui/generic-const-items/def-site-eval.fail.stderr index fa07f385522..4e7d9d8154a 100644 --- a/tests/ui/generic-const-items/def-site-eval.fail.stderr +++ b/tests/ui/generic-const-items/def-site-eval.fail.stderr @@ -1,5 +1,5 @@ -error[E0080]: evaluation of `_::<'_>` failed - --> $DIR/def-site-eval.rs:14:20 +error[E0080]: evaluation of constant value failed + --> $DIR/def-site-eval.rs:13:20 | LL | const _<'_a>: () = panic!(); | ^^^^^^^^ evaluation panicked: explicit panic diff --git a/tests/ui/generic-const-items/def-site-eval.rs b/tests/ui/generic-const-items/def-site-eval.rs index 3ed7f96aed0..b95e40c05d4 100644 --- a/tests/ui/generic-const-items/def-site-eval.rs +++ b/tests/ui/generic-const-items/def-site-eval.rs @@ -1,16 +1,15 @@ //! Test that we only evaluate free const items (their def site to be clear) //! whose generics don't require monomorphization. #![feature(generic_const_items)] -#![allow(incomplete_features)] +#![expect(incomplete_features)] //@ revisions: fail pass -//@[fail] build-fail (we require monomorphization) -//@[pass] build-pass (we require monomorphization) +//@[pass] check-pass const _<_T>: () = panic!(); const _<const _N: usize>: () = panic!(); #[cfg(fail)] -const _<'_a>: () = panic!(); //[fail]~ ERROR evaluation of `_::<'_>` failed +const _<'_a>: () = panic!(); //[fail]~ ERROR evaluation of constant value failed fn main() {} |
