Skip to content

Commit 02e1d11

Browse files
committed
Ungroup "no unsafe operations occur within 'unsafe'" warnings
These should not be escalated to errors when other strict memory safety warnings are, because they aren't safety issues. They could go into a separate group along with the corresponding try and await diagnostics.
1 parent 60f7d20 commit 02e1d11

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/swift/AST/DiagnosticsSema.def

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8411,9 +8411,9 @@ GROUPED_WARNING(unsafe_without_unsafe,StrictMemorySafety,none,
84118411
"expression uses unsafe constructs but is not marked with 'unsafe'", ())
84128412
GROUPED_WARNING(for_unsafe_without_unsafe,StrictMemorySafety,none,
84138413
"for-in loop uses unsafe constructs but is not marked with 'unsafe'", ())
8414-
GROUPED_WARNING(no_unsafe_in_unsafe,StrictMemorySafety,none,
8414+
WARNING(no_unsafe_in_unsafe,none,
84158415
"no unsafe operations occur within 'unsafe' expression", ())
8416-
GROUPED_WARNING(no_unsafe_in_unsafe_for,StrictMemorySafety,none,
8416+
WARNING(no_unsafe_in_unsafe_for,none,
84178417
"no unsafe operations occur within 'unsafe' for-in loop", ())
84188418
NOTE(make_subclass_unsafe,none,
84198419
"make class %0 '@unsafe' to allow unsafe overrides of safe superclass "

0 commit comments

Comments
 (0)