diff options
| author | Maybe Lapkin <waffle.lapkin@gmail.com> | 2024-11-13 05:14:26 +0100 |
|---|---|---|
| committer | Maybe Lapkin <waffle.lapkin@gmail.com> | 2024-11-14 01:32:54 +0100 |
| commit | 46967bd2e99b8387ccf066c8b9e6323d6dfaaefe (patch) | |
| tree | 6fd2f8904e06caa1c8ae6c58dd64a518f31ed9d5 /compiler/rustc_middle | |
| parent | db0740446bed9071b0e0edbd818cc50d40238730 (diff) | |
| download | rust-46967bd2e99b8387ccf066c8b9e6323d6dfaaefe.tar.gz rust-46967bd2e99b8387ccf066c8b9e6323d6dfaaefe.zip | |
Mention both release *and* edition breakage for never type lints
Diffstat (limited to 'compiler/rustc_middle')
| -rw-r--r-- | compiler/rustc_middle/src/lint.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/rustc_middle/src/lint.rs b/compiler/rustc_middle/src/lint.rs index b5862565e8e..1bcdbe33286 100644 --- a/compiler/rustc_middle/src/lint.rs +++ b/compiler/rustc_middle/src/lint.rs @@ -382,6 +382,12 @@ pub fn lint_level( FutureIncompatibilityReason::EditionSemanticsChange(edition) => { format!("this changes meaning in Rust {edition}") } + FutureIncompatibilityReason::EditionAndFutureReleaseError(edition) => { + format!( + "this was previously accepted by the compiler but is being phased out; \ + it will become a hard error in Rust {edition} and in a future release in all editions!" + ) + } FutureIncompatibilityReason::Custom(reason) => reason.to_owned(), }; |
