-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[stdlib] Replace various uses of BlahSlice with Slice to reduce warnings #13263
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
Conversation
@swift-ci please test |
@@ -701,10 +701,10 @@ public struct ${Self}<T> : ${SelfProtocols} { | |||
% end | |||
} | |||
|
|||
public subscript(bounds: Range<${Index}>) -> ${SelfSlice}<${Self}<T>> { | |||
public subscript(bounds: Range<${Index}>) -> Slice<${Self}<T>> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can remove the definition of SelfSlice too right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's still used within the gyb. These tests create Minimal${SelfSlice}
opaque types for some tests.
I did miss some more ${SelfSlice}
uses tho.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No wait that is a different test. These ones just reuse SelfSlice
to create MinimalCollection
names. But still, they need something like it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I felt guilty after this so have fixed it properly now...
bbdfc9b
to
4e08298
Compare
@swift-ci please test |
Build failed |
gah there are tests inside |
4e08298
to
5a910f4
Compare
@swift-ci please test |
Build failed |
I'll make the matching changes in corelibs once this one lands safely. |
the Foundation changes look good to me. |
@swift-ci please test macOS platform |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Build failed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the heads up on the Foundation changes. LGTM.
@swift-ci please test macOS platform |
Now that
Slice
is conditionally conforming to protocols based on its base, various uses of specific slices can be replaced, suppressing deprecation warnings.Note, the validation tests generated by
validation-test/stdlib/Slice/Inputs/Template.swift.gyb
are still using the old slice types. That needs a bit more work to fix.