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/rename/should_fail/rnfail055.stderr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'testsuite/tests/rename') diff --git a/testsuite/tests/rename/should_fail/rnfail055.stderr b/testsuite/tests/rename/should_fail/rnfail055.stderr index 28b20d989a..5034a85ec2 100644 --- a/testsuite/tests/rename/should_fail/rnfail055.stderr +++ b/testsuite/tests/rename/should_fail/rnfail055.stderr @@ -1,8 +1,8 @@ -RnFail055.hs:2:73: warning: +RnFail055.hs:2:73: warning: [-Wdeprecated-flags (in -Wdefault)] -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language. -RnFail055.hs-boot:2:73: warning: +RnFail055.hs-boot:2:73: warning: [-Wdeprecated-flags (in -Wdefault)] -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language. RnFail055.hs-boot:5:1: error: -- cgit v1.2.1