diff options
author | Alfredo Di Napoli <alfredo@well-typed.com> | 2021-03-30 10:21:06 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-04-05 20:39:54 -0400 |
commit | 3483c3de2aa9c1a48d2e8a9271eadc5e3f4da70d (patch) | |
tree | c89a2434db2b05c602343c8addc27def0c1cfd1a /testsuite/tests/deriving | |
parent | 495281215ae0fdcb296b2b30c1efd3a683006f42 (diff) | |
download | haskell-3483c3de2aa9c1a48d2e8a9271eadc5e3f4da70d.tar.gz |
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.
Diffstat (limited to 'testsuite/tests/deriving')
5 files changed, 6 insertions, 6 deletions
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. diff --git a/testsuite/tests/deriving/should_compile/T4966.stderr b/testsuite/tests/deriving/should_compile/T4966.stderr index 9cd16e50f2..a705c20793 100644 --- a/testsuite/tests/deriving/should_compile/T4966.stderr +++ b/testsuite/tests/deriving/should_compile/T4966.stderr @@ -1,5 +1,5 @@ -T4966.hs:3:14: warning: +T4966.hs:3:14: warning: [-Wdeprecated-flags (in -Wdefault)] -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language. T4966.hs:35:30: warning: [-Wmissing-methods (in -Wdefault)] diff --git a/testsuite/tests/deriving/should_compile/drv-foldable-traversable1.stderr b/testsuite/tests/deriving/should_compile/drv-foldable-traversable1.stderr index e8dc7162c2..fa9c0b82c1 100644 --- a/testsuite/tests/deriving/should_compile/drv-foldable-traversable1.stderr +++ b/testsuite/tests/deriving/should_compile/drv-foldable-traversable1.stderr @@ -1,3 +1,3 @@ -drv-foldable-traversable1.hs:4:32: warning: +drv-foldable-traversable1.hs:4:32: warning: [-Wdeprecated-flags (in -Wdefault)] -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language. diff --git a/testsuite/tests/deriving/should_compile/drv-functor1.stderr b/testsuite/tests/deriving/should_compile/drv-functor1.stderr index 5592b7d141..015dc28f87 100644 --- a/testsuite/tests/deriving/should_compile/drv-functor1.stderr +++ b/testsuite/tests/deriving/should_compile/drv-functor1.stderr @@ -1,3 +1,3 @@ -drv-functor1.hs:6:14: warning: +drv-functor1.hs:6:14: warning: [-Wdeprecated-flags (in -Wdefault)] -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language. diff --git a/testsuite/tests/deriving/should_fail/drvfail-functor2.stderr b/testsuite/tests/deriving/should_fail/drvfail-functor2.stderr index 1c3a0238a4..3fd7f14b4c 100644 --- a/testsuite/tests/deriving/should_fail/drvfail-functor2.stderr +++ b/testsuite/tests/deriving/should_fail/drvfail-functor2.stderr @@ -1,5 +1,5 @@ -drvfail-functor2.hs:2:29: warning: +drvfail-functor2.hs:2:29: warning: [-Wdeprecated-flags (in -Wdefault)] -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language. drvfail-functor2.hs:8:14: error: |