File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,8 @@ func returnsExistentialP() -> any P {
87
87
// expected-note@-1{{@unsafe conformance of 'Int' to protocol 'P' involves unsafe code}}
88
88
}
89
89
90
- struct UnsafeAsSequence : @unsafe Sequence , IteratorProtocol {
90
+ // FIXME: Should work even if the IteratorProtocol conformance is safe
91
+ struct UnsafeAsSequence : @unsafe Sequence , @unsafe IteratorProtocol {
91
92
mutating func next( ) -> Int ? { nil }
92
93
}
93
94
@@ -96,6 +97,7 @@ func testUnsafeAsSequenceForEach() {
96
97
97
98
// expected-warning@+1{{expression uses unsafe constructs but is not marked with 'unsafe'}}{{12-12=unsafe }}
98
99
for _ in uas { } // expected-note{{conformance}}
100
+ // expected-note@-1{{reference}}
99
101
100
102
for _ in unsafe uas { } // okay
101
103
}
You can’t perform that action at this time.
0 commit comments