diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-06-26 19:47:01 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-26 19:47:01 +0200 |
| commit | 7312a66a5c8e54b68aedbbd779c829f3709f5460 (patch) | |
| tree | 812d14103c85c913815b6db52ab356c5333c46a0 /src/test/ui/array-slice-vec | |
| parent | 5b312710d509e75b5d52b77d56e2d34ec2038696 (diff) | |
| parent | 3899914131053cafb46f61ba3c7d6846673ebd22 (diff) | |
| download | rust-7312a66a5c8e54b68aedbbd779c829f3709f5460.tar.gz rust-7312a66a5c8e54b68aedbbd779c829f3709f5460.zip | |
Rollup merge of #97743 - RalfJung:const-err-future-breakage, r=estebank
make const_err show up in future breakage reports As tracked in https://github.com/rust-lang/rust/issues/71800, const_err should become a hard error Any Day Now (TM). I'd love to move forward with that sooner rather than later; it has been deny-by-default for many years and a future incompat lint since https://github.com/rust-lang/rust/pull/80394 (landed more than a year ago). Some CTFE errors are already hard errors since https://github.com/rust-lang/rust/pull/86194. But before we truly make it a hard error in all cases, we now have one more intermediate step we can take -- to make it show up in future breakage reports. Cc `````@rust-lang/wg-const-eval`````
Diffstat (limited to 'src/test/ui/array-slice-vec')
| -rw-r--r-- | src/test/ui/array-slice-vec/array_const_index-0.stderr | 13 | ||||
| -rw-r--r-- | src/test/ui/array-slice-vec/array_const_index-1.stderr | 13 |
2 files changed, 26 insertions, 0 deletions
diff --git a/src/test/ui/array-slice-vec/array_const_index-0.stderr b/src/test/ui/array-slice-vec/array_const_index-0.stderr index 641705e1c68..b44251efdea 100644 --- a/src/test/ui/array-slice-vec/array_const_index-0.stderr +++ b/src/test/ui/array-slice-vec/array_const_index-0.stderr @@ -12,3 +12,16 @@ LL | const B: i32 = (&A)[1]; error: aborting due to previous error +Future incompatibility report: Future breakage diagnostic: +error: any use of this value will cause an error + --> $DIR/array_const_index-0.rs:2:16 + | +LL | const B: i32 = (&A)[1]; + | ---------------^^^^^^^- + | | + | index out of bounds: the length is 0 but the index is 1 + | + = note: `#[deny(const_err)]` on by default + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800> + diff --git a/src/test/ui/array-slice-vec/array_const_index-1.stderr b/src/test/ui/array-slice-vec/array_const_index-1.stderr index 4d52d38af5e..8beebafb04c 100644 --- a/src/test/ui/array-slice-vec/array_const_index-1.stderr +++ b/src/test/ui/array-slice-vec/array_const_index-1.stderr @@ -12,3 +12,16 @@ LL | const B: i32 = A[1]; error: aborting due to previous error +Future incompatibility report: Future breakage diagnostic: +error: any use of this value will cause an error + --> $DIR/array_const_index-1.rs:2:16 + | +LL | const B: i32 = A[1]; + | ---------------^^^^- + | | + | index out of bounds: the length is 0 but the index is 1 + | + = note: `#[deny(const_err)]` on by default + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800> + |
