Skip to content

Commit 428da5e

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. (cherry picked from commit 02e1d11)
1 parent 25a9a15 commit 428da5e

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
@@ -8364,9 +8364,9 @@ GROUPED_WARNING(unsafe_without_unsafe,StrictMemorySafety,none,
83648364
"expression uses unsafe constructs but is not marked with 'unsafe'", ())
83658365
GROUPED_WARNING(for_unsafe_without_unsafe,StrictMemorySafety,none,
83668366
"for-in loop uses unsafe constructs but is not marked with 'unsafe'", ())
8367-
GROUPED_WARNING(no_unsafe_in_unsafe,StrictMemorySafety,none,
8367+
WARNING(no_unsafe_in_unsafe,none,
83688368
"no unsafe operations occur within 'unsafe' expression", ())
8369-
GROUPED_WARNING(no_unsafe_in_unsafe_for,StrictMemorySafety,none,
8369+
WARNING(no_unsafe_in_unsafe_for,none,
83708370
"no unsafe operations occur within 'unsafe' for-in loop", ())
83718371
NOTE(make_subclass_unsafe,none,
83728372
"make class %0 '@unsafe' to allow unsafe overrides of safe superclass "

0 commit comments

Comments
 (0)