Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 7cf4f09

Browse files
authoredJun 25, 2022
Rollup merge of rust-lang#97743 - RalfJung:const-err-future-breakage, r=estebank
make const_err show up in future breakage reports As tracked in rust-lang#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 rust-lang#80394 (landed more than a year ago). Some CTFE errors are already hard errors since rust-lang#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`
2 parents 459b151 + 4a4d877 commit 7cf4f09

File tree

54 files changed

+2112
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+2112
-0
lines changed
 

‎compiler/rustc_lint_defs/src/builtin.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,7 @@ declare_lint! {
289289
"constant evaluation encountered erroneous expression",
290290
@future_incompatible = FutureIncompatibleInfo {
291291
reference: "issue #71800 <https://github.com/rust-lang/rust/issues/71800>",
292+
reason: FutureIncompatibilityReason::FutureReleaseErrorReportNow,
292293
};
293294
report_in_external_macro
294295
}

‎src/test/ui/array-slice-vec/array_const_index-0.stderr

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,16 @@ LL | const B: i32 = (&A)[1];
1212

1313
error: aborting due to previous error
1414

15+
Future incompatibility report: Future breakage diagnostic:
16+
error: any use of this value will cause an error
17+
--> $DIR/array_const_index-0.rs:2:16
18+
|
19+
LL | const B: i32 = (&A)[1];
20+
| ---------------^^^^^^^-
21+
| |
22+
| index out of bounds: the length is 0 but the index is 1
23+
|
24+
= note: `#[deny(const_err)]` on by default
25+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
26+
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
27+

0 commit comments

Comments
 (0)
Please sign in to comment.