Skip to content

RequirementMachine: Disable redundant requirement diagnostics by default #58780

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 6 commits into from
May 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions include/swift/Basic/LangOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,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