You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expand the collation of unsafe constructs to all declarations that can handle it
Drive the strict-safety diagnostics for a particular declaration from
primary type checking for declarations, so any memory-safety-related
diagnostics will only be emitted for the primary files. This also
brings them together as notes under a single warning for each
declaration.
// expected-note@+1{{make extension of struct 'UnsafeOuter' @unsafe to indicate that its use is not memory-safe}}{{1-1=@unsafe }}
104
-
extensionUnsafeOuter{ // expected-warning{{reference to unsafe struct 'UnsafeOuter' [Unsafe]}}
103
+
// expected-warning@+1{{extension of struct 'UnsafeOuter' involves unsafe code; use '@unsafe' to indicate that its use is not memory-safe}}{{1-1=@unsafe }}
104
+
extensionUnsafeOuter{ // expected-note{{reference to unsafe struct 'UnsafeOuter'}}
classUnsafeSub:UnsafeSuper{} // expected-warning{{reference to unsafe class 'UnsafeSuper'}}
69
-
// expected-note@-1{{make class 'UnsafeSub' @unsafe to indicate that its use is not memory-safe}}{{1-1=@unsafe }}
68
+
classUnsafeSub:UnsafeSuper{} // expected-warning{{class 'UnsafeSub' involves unsafe code; use '@unsafe' to indicate that its use is not memory-safe}}{{1-1=@unsafe }}
69
+
// expected-note@-1{{reference to unsafe class 'UnsafeSuper'}}
0 commit comments