Skip to content

[5.7] RequirementMachine: Disable redundant requirement diagnostics by default #58814

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
3 changes: 3 additions & 0 deletions include/swift/Basic/LangOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,9 @@ namespace swift {
/// rewrite system.
bool EnableRequirementMachineOpaqueArchetypes = false;

/// Enable warnings for redundant requirements in generic signatures.
bool WarnRedundantRequirements = false;

/// Enables dumping type witness systems from associated type inference.
bool DumpTypeWitnessSystems = false;

Expand Down
3 changes: 3 additions & 0 deletions include/swift/Option/FrontendOptions.td
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,9 @@ def disable_requirement_machine_reuse : Flag<["-"], "disable-requirement-machine
def enable_requirement_machine_opaque_archetypes : Flag<["-"], "enable-requirement-machine-opaque-archetypes">,
HelpText<"Enable more correct opaque archetype support, which is off by default because it might fail to produce a convergent rewrite system">;

def warn_redundant_requirements : Flag<["-"], "warn-redundant-requirements">,
HelpText<"Emit warnings for redundant requirements in generic signatures">;

def dump_type_witness_systems : Flag<["-"], "dump-type-witness-systems">,
HelpText<"Enables dumping type witness systems from associated type inference">;

Expand Down
1 change: 1 addition & 0 deletions lib/AST/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ add_swift_host_library(swiftAST STATIC
RequirementEnvironment.cpp
RequirementMachine/ConcreteContraction.cpp
RequirementMachine/ConcreteTypeWitness.cpp
RequirementMachine/Diagnostics.cpp
RequirementMachine/GenericSignatureQueries.cpp
RequirementMachine/HomotopyReduction.cpp
RequirementMachine/InterfaceType.cpp
Expand Down
Loading