From 46967bd2e99b8387ccf066c8b9e6323d6dfaaefe Mon Sep 17 00:00:00 2001 From: Maybe Lapkin Date: Wed, 13 Nov 2024 05:14:26 +0100 Subject: Mention both release *and* edition breakage for never type lints --- compiler/rustc_middle/src/lint.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'compiler/rustc_middle/src') 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(), }; -- cgit 1.4.1-3-g733a5