Skip to content

Commit 3a9c801

Browse files
authored
Merge pull request swiftlang#58780 from slavapestov/rqm-tweak-diagnostics
RequirementMachine: Disable redundant requirement diagnostics by default
2 parents 7bdaa84 + f39372b commit 3a9c801

File tree

79 files changed

+663
-590
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+663
-590
lines changed

include/swift/Basic/LangOptions.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,9 @@ namespace swift {
572572
/// rewrite system.
573573
bool EnableRequirementMachineOpaqueArchetypes = false;
574574

575+
/// Enable warnings for redundant requirements in generic signatures.
576+
bool WarnRedundantRequirements = false;
577+
575578
/// Enables dumping type witness systems from associated type inference.
576579
bool DumpTypeWitnessSystems = false;
577580

include/swift/Option/FrontendOptions.td

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,9 @@ def disable_requirement_machine_reuse : Flag<["-"], "disable-requirement-machine
378378
def enable_requirement_machine_opaque_archetypes : Flag<["-"], "enable-requirement-machine-opaque-archetypes">,
379379
HelpText<"Enable more correct opaque archetype support, which is off by default because it might fail to produce a convergent rewrite system">;
380380

381+
def warn_redundant_requirements : Flag<["-"], "warn-redundant-requirements">,
382+
HelpText<"Emit warnings for redundant requirements in generic signatures">;
383+
381384
def dump_type_witness_systems : Flag<["-"], "dump-type-witness-systems">,
382385
HelpText<"Enables dumping type witness systems from associated type inference">;
383386

lib/AST/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ add_swift_host_library(swiftAST STATIC
7979
RequirementEnvironment.cpp
8080
RequirementMachine/ConcreteContraction.cpp
8181
RequirementMachine/ConcreteTypeWitness.cpp
82+
RequirementMachine/Diagnostics.cpp
8283
RequirementMachine/GenericSignatureQueries.cpp
8384
RequirementMachine/HomotopyReduction.cpp
8485
RequirementMachine/InterfaceType.cpp

0 commit comments

Comments
 (0)