From 3483c3de2aa9c1a48d2e8a9271eadc5e3f4da70d Mon Sep 17 00:00:00 2001 From: Alfredo Di Napoli Date: Tue, 30 Mar 2021 10:21:06 +0200 Subject: Correct warning for deprecated and unrecognised flags Fixes #19616. This commit changes the `GHC.Driver.Errors.handleFlagWarnings` function to rely on the newly introduced `DiagnosticReason`. This allows us to correctly pretty-print the flags which triggered some warnings and in turn remove the cruft around this function (like the extra filtering and the `shouldPrintWarning` function. --- testsuite/tests/deriving/should_compile/T4325.stderr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'testsuite/tests/deriving/should_compile/T4325.stderr') diff --git a/testsuite/tests/deriving/should_compile/T4325.stderr b/testsuite/tests/deriving/should_compile/T4325.stderr index 90ef1de92d..2fd71e37f8 100644 --- a/testsuite/tests/deriving/should_compile/T4325.stderr +++ b/testsuite/tests/deriving/should_compile/T4325.stderr @@ -1,3 +1,3 @@ -T4325.hs:1:14: - Warning: -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language. +T4325.hs:1:14: warning: [-Wdeprecated-flags (in -Wdefault)] + -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language. -- cgit v1.2.1