Michael Ilseman
ccda8f33d1
[noescape by default] Proliferate @escaping
...
Adds an explicit @escaping throughout the standard library, validation
test suite, and tests. This will be necessary as soon as noescape is
the default for closure parameters.
2016-07-29 13:48:07 -07:00
swift-ci
e657ece02b
Merge pull request #3617 from natecook1000/nc-existenz-identity
2016-07-24 23:31:40 -07:00
Slava Pestov
ddc51c5917
AST: Implement SE-0102, introducing new semantics for Never alongside @noreturn
...
No migrator support yet, and the code for @noreturn is still in
place.
2016-07-22 14:56:39 -07:00
Doug Gregor
778e76e158
[SE-0091 Follow-up] Move more operators into types, now for generic operators.
2016-07-21 12:54:27 -07:00
Nate Cook
7e6a1055b7
stdlib: underscore AnyCollectionProtocol
2016-07-20 15:52:10 -05:00
Nate Cook
34b9b98988
[stdlib] Convert existential collection === operator to method
2016-07-20 10:01:39 -05:00
Dave Abrahams
dcbfdb5339
_ includeElement/whereElementsSatisfy predicate => _ isIncluded
2016-07-19 07:05:54 -06:00
Dave Abrahams
4b072f630c
_ isSeparator: => whereSeparator isSeparator:
2016-07-19 07:05:53 -06:00
Michael Gottesman
fc37603c5f
Revert "Implement SE-0118"
2016-07-18 16:44:58 -07:00
Dave Abrahams
4bb21b8a2f
_ includeElement/whereElementsSatisfy predicate => _ isIncluded
2016-07-18 14:29:09 -06:00
Dave Abrahams
5fdbd162da
_ isSeparator: => whereSeparator isSeparator:
2016-07-18 14:29:08 -06:00
Michael Gottesman
40e1991e12
Revert "Name and label changes for closure parameters (for review only) ( #2981 )"
...
This reverts commit 18406900ba .
2016-07-15 19:45:26 -07:00
Dave Abrahams
18406900ba
Name and label changes for closure parameters (for review only) ( #2981 )
...
Implement SE-0118 Name and label changes for closure parameters
[SE-0118](https://github.com/apple/swift-evolution/blob/master/proposals/0118-closure-parameter-names-and-labels.md )
2016-07-15 15:31:48 -07:00
Dmitri Gribenko
49164c9b7e
stdlib: ExistentialCollection: remove redundant entry points
2016-07-14 14:57:56 -07:00
Dmitri Gribenko
46fba3e792
stdlib: ExistentialCollection: use better names for internal methods
2016-07-12 18:29:37 -07:00
Dmitri Gribenko
824bccc871
stdlib: change Collection._copyToNativeArrayBuffer() to be defined in terms of public types
2016-07-11 10:54:43 -07:00
Rintaro Ishizaki
7ca06d5c43
[stdlib] Add missing anyGenerator migration aid
2016-07-02 12:08:27 +09:00
Rintaro Ishizaki
6ef62f3c73
[stdlib] Better diagnosis for unavailable APIs
...
Added tests for expected-error and fix-its.
- Add arguments signature regardless that is the same as before.
Because the error message looks more natural.
e.g. "makeIterator" => "makeIterator()",
"replaceSubrange" => "replaceSubrange(_:with:)"
- Any${ExistentialCollection}.underestimateCount() was a method, not
computed property.
- 'LazySequenceType' has been renamed to 'LazySequenceProtocol', but not
'LazyCollectionProtocol'
- Streamable.writeTo(_:) had no argument label.
- Fixed typo in print() debugPrint() error message (not working for now)
- Repeated.init(): changed `renamed` to `message` because the arugment
order has changed.
- Marked `public` for some unavailable method on `Sequence`
- Sequence.split(_:maxSplit:allowEmptySlices) was replaced with
split(separator:maxSplits:omittingEmptySubsequences:),
not split(separator:omittingEmptySubsequences:isSeparator:)
- Sequence.split(_:allowEmptySlices:isSeparator) was replaced with
split(maxSplits:omittingEmptySubsequences:isSeparator:),
not split(_:omittingEmptySubsequences:isSeparator:)
- Sequence.startsWith(_:isEquivalent:) or startsWith(_:) had no label on
the first argument.
- transcode(_:_:_:_:stopOnError), not transcode(_:_:_:_:stoppingOnError)
- Removed mutating methods from UnsafePointer.
alloc(_:), dealloc(_:), setter:memory, initialize(_:), destroy(),
and destroy(_:)
2016-07-01 14:52:09 +09:00
Rintaro Ishizaki
668b9dbc64
[stdlib] Apply tail style "where" clause to stdlib/public/core
2016-06-02 12:00:55 +09:00
Dmitri Gribenko
4614adc161
Merge pull request #1702 from PatrickPijnappel/iterator-post-nil-guarantee
...
[stdlib] Change post-nil guarantee for IteratorProtocol.next()
2016-05-30 00:03:57 -07:00
Nate Cook
85c9e5665d
[stdlib] Provide migration hint for AnyTraversalIndex types
2016-05-25 12:08:33 -05:00
Patrick Pijnappel
daec2dae00
Resolve conflicts with master
2016-05-24 19:21:04 +02:00
Nate Cook
44b2d56a7f
[stdlib] Revise documentation for string-related types
...
This documentation revision covers a large number of types & protocols:
String, its views and their indices, the Unicode codec types and protocol,
as well as Character, UnicodeScalar, and StaticString, among others.
This also includes a few small changes across the standard library for
consistency.
2016-05-22 03:04:22 -05:00
Slava Pestov
9cb793c69b
stdlib: Remove redundant initializers, NFC
...
Sema can synthesize these for us now.
2016-05-21 12:51:51 -07:00
Dmitri Gribenko
d591f9cf7a
stdlib: remove most uses of @warn_unused_result, which does nothing now
...
I kept the one on sorted(), because that one requires a less trivial
change.
2016-05-19 18:39:39 -07:00
Dmitri Gribenko
a8f076d7f0
stdlib: use _precondition(), not precondition()
...
precondition(), when used in the standard library, does not respect the
debug/release build setting of the module or application importing the
standard library.
2016-05-12 16:13:41 -07:00
Patrick Pijnappel
4419614be4
Move post-nil guarantee to separate line for Iterators' next()
2016-05-08 21:36:39 +02:00
Patrick Pijnappel
ab9e74cba3
Resolve conflicts with upstream
2016-05-05 08:55:34 +02:00
Mark Lacey
e03d334b68
Use Builtin.unreachable() in unavailable functions.
...
Saves a bit of code size in the standard library by eliminating some
static strings and function calls.
rdar://problem/25767016
2016-05-02 21:30:25 -07:00
Dave Abrahams
9bee5d182f
[stdlib] location/formLocation => index/formIndex
2016-04-26 17:46:16 -07:00
Nate Cook
6e274913bf
[stdlib] Revise documentation for Array- and Set-related types.
...
This adds and expands documentation for sequences, collections, and the array
types as well as `Set` and its related protocols.
2016-04-25 12:54:39 -05:00
Dave Abrahams
47a870cc50
[stdlib] Use location/formLocation for all index movement
2016-04-21 17:13:41 -07:00
Dmitri Gribenko
3e23907f13
stdlib: fix warnings about deprecated @noescape and @autoclosure syntax
2016-04-18 14:07:23 -07:00
Dmitri Gribenko
735f1287b0
Merge remote-tracking branch 'origin/swift-3-indexing-model' into swift-3-indexing-model
2016-04-14 14:10:27 -07:00
Dmitri Gribenko
10697f939f
Merge commit '510f29abf77e202780c11d5f6c7449313c819030' into swift-3-indexing-model
2016-04-14 13:45:27 -07:00
Max Moiseev
37bf02f7da
[stdlib][swift-3-indexing-model] changes in index(_:stepsFrom:limitedBy:)
...
- index(_:stepsFrom:limitedBy:) returns Index?
- formIndex(_:stepsFrom:limitedBy) returns Bool
2016-04-14 11:49:27 -07:00
Dmitri Gribenko
f4987d02ec
stdlib: new indexing model: Forward more methods in AnyCollection
2016-04-08 20:29:10 -07:00
Dmitri Gribenko
a200c7ad8e
stdlib: new indexing model: implement slicing on AnyCollection
2016-04-08 20:27:44 -07:00
Nate Cook
dcf23f3591
[New indexing model] Clean up existential collection comments
2016-04-08 01:02:25 -05:00
Manav Gabhawala
7928140f79
[SE-0046] Implements consistent function parameter labels by discarding extraneous parameter names and adding _ where necessary
2016-04-06 20:21:58 -04:00
Dmitri Gribenko
9a3c8ef9d7
stdlib: use gyb_stdlib_support in ExistentialCollection.swift.gyb
2016-04-06 13:26:33 -07:00
Dave Abrahams
ccb7ae0d0b
[stdlib] Drop Type suffixes in comments
...
These suffixes were gone in the code long ago; help the comments catch
up.
2016-04-05 15:16:13 -07:00
Dmitri Gribenko
6985b958fd
Merge remote-tracking branch 'origin/master' into swift-3-indexing-model
2016-04-04 11:42:17 -07:00
Max Moiseev
171169b01f
[stdlib][swift-3-indexing-model] fixing Arrays tests
2016-04-01 14:12:17 -07:00
Dmitri Gribenko
999aceb682
stdlib: correct fixits for 'func generator()'
...
rdar://problem/25492963
2016-04-01 10:48:48 -07:00
Dave Abrahams
25baede4bb
[stdlib] indexing model: add formIndex
2016-03-28 13:47:40 -07:00
Dave Abrahams
da5c4036ac
func index(n: IndexDistance, stepsFrom i: Index)
...
M-x findr-query-replace
\<func advance(\([^(),]*\|[^(),]+([^()]*)[^(),]*\)\(,[
]*\)by \([^(),]*\|[^(),]+([^()]*)[^(),]*\)
func index(\3\2stepsFrom \1
2016-03-28 13:23:04 -07:00
Dave Abrahams
4d651f8fc0
limit: => limitedBy:, pt 1
...
M-x findr-query-replace
\(,[
]*\)limit: \([^(),]*\|[^(),]+([^()]*)[^(),]*\)) ->
\1limitedBy limit: \2) ->
2016-03-28 13:03:59 -07:00
Dave Abrahams
11259d1d14
[stdlib] indexing model: rename in-place indexing
...
This time, choose something that's at least compliant with the API
guidelines.
2016-03-23 17:16:20 -07:00
Dave Abrahams
8d9e62b274
[stdlib] indexing model: rename next/previous
...
I'm not too satisfied with the names for the updating: versions, but
this is a start.
2016-03-22 17:13:54 -07:00