Trent Nadeau
b9db36cda5
Removed last uses of @warn_unused_result
2016-06-06 19:12:51 -04: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
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
practicalswift
d804026b34
[gardening] Fix "a" vs. "an" issues.
2016-05-01 13:29:57 +02: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
Dmitri Gribenko
8e886a3bdd
stdlib: ranges: remove range protocols
...
The RangeProtocol was a very weak and fragile abstraction because it
didn't specify the interpretation of the endpoints. To write a
non-trivial algorithm, one usually needed to consult that information.
The standard library code only actually worked correctly with half-open
and closed ranges (and didn't handle fully open ranges, for example).
The other two protocols, HalfOpenRangeProtocol and ClosedRangeProtocol,
were only used for code sharing, and present an ABI burden. We can use
gyb instead.
2016-04-22 18:15:06 -07:00
Dave Abrahams
47a870cc50
[stdlib] Use location/formLocation for all index movement
2016-04-21 17:13:41 -07:00
Dmitri Gribenko
fc8d62dfbb
Merge remote-tracking branch 'origin/master' into swift-3-indexing-model
2016-04-18 14:40:06 -07:00
practicalswift
db452dcbe9
[gardening] "[ a, b ]" → "[a, b]"
2016-04-17 21:26:08 +02:00
Dmitri Gribenko
2b35fea059
Merge remote-tracking branch 'origin/master' into swift-3-indexing-model
2016-04-16 00:30:12 -07:00
Chris Lattner
4fd8418ba7
move the stdlib to put noescape and autoclosure on the type, instead of
...
the parameter. Progress towards SE-0049.
2016-04-14 23:13:43 -07:00
Dmitri Gribenko
cfea1a3f58
Merge remote-tracking branch 'origin/master' into swift-3-indexing-model
2016-04-14 17:00:46 -07:00
Dmitri Gribenko
10697f939f
Merge commit '510f29abf77e202780c11d5f6c7449313c819030' into swift-3-indexing-model
2016-04-14 13:45:27 -07:00
swift-ci
0ac59a50f8
Merge pull request #1807 from Togira/master
2016-04-12 21:30:10 -07:00
Dmitri Gribenko
d52cbab5c2
Merge commit '0ff3239b962218267d37307e53906b31315a1cfc' into swift-3-indexing-model
...
This commit is the parent of the commit that implemented SE-0046
Establish consistent label behavior across all parameters including
first labels
2016-04-09 16:18:33 -07: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
Dave Abrahams
5864117b1b
[stdlib] De-underscore Range.init(uncheckedBounds:)
2016-04-06 09:20:30 -07:00
practicalswift
abfecfde17
[gardening] if ([space]…[space]) → if (…), for(…) → for (…), while(…) → while (…), [[space]x, y[space]] → [x, y]
2016-04-04 16:22:11 +02:00
Dave Abrahams
a5c3c63c3d
[stdlib] Indexing model: nix RangeOfStrideable
...
Instead, use CountableRange which is constrained to have a Strideable
Bound whose Stride conforms to Integer.
2016-03-28 17:06:09 -07:00
Dave Abrahams
01127b32d5
index(n, stepsFrom: i)
...
M-x findr-query-replace
\<advance(\([^:]+?\),\([
]+\)by: *\([^(),]*\|[^(),]+([^()]*)[^(),]*\)\(,\(?:[
]+\)limit: *\(?:[^()]*\|[^()]+([^()]*)[^()]*\)\)?)
index(\3,\2stepsFrom: \1\4)
2016-03-25 17:54:39 -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
Bliss Chapman
37e3a79877
Remove escaped spaces from the MutableCollectionType’s partition method
...
documentation.
2016-03-23 11:02:46 -05: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
Dmitri Gribenko
a6cd57222a
Merge remote-tracking branch 'origin/master' into swift-3-indexing-model
2016-03-21 14:41:15 -07:00
Dave Abrahams
a9dd95c37a
[stdlib] indexing model: Generic Mutable Slicing
2016-03-18 15:08:40 -07:00
Dave Abrahams
388833831b
Balance parens in gyb file
...
It was messing with our editor's indentation to have unmatched parens in
gyb'd segments.
2016-03-18 15:05:12 -07:00
Nate Cook
afac511c19
[stdlib] Remove unavailable annotation for MutableCollection.sort()
2016-03-17 16:12:37 -05:00
Dave Abrahams
f493b54e44
[stdlib] indexing model: Interval/Range merge
...
This is step 1; we still need to introduce ClosedRange.
2016-03-16 15:59:10 -07:00
Dmitri Gribenko
95163c4813
stdlib: New indexing model: fix a new inout violation in Collection.partition()
2016-03-14 18:59:27 -07:00
Dmitri Gribenko
3cde854287
Merge remote-tracking branch 'origin/master' into swift-3-indexing-model
2016-03-12 01:11:32 -08:00
Daniel Duan
276370b599
[stdlib] apply SE-0040 to stdlib
2016-03-11 16:01:41 -08:00
Dmitri Gribenko
fc636b94f5
fixup
2016-03-06 02:12:59 -08:00
Dmitri Gribenko
ad1428e1d6
New collection indexing model: removed old index protocols
...
... and started to fix compiler errors.
2016-03-06 01:53:34 -08:00
Shawn Erickson
fe42606062
[stdlib] - WIP moved aspects of ForwardIndex and BidirectionalIndex into their Collection equivalents
2016-03-04 07:40:59 -08:00
Dmitri Gribenko
d7e82519f5
stdlib: add argument labels to sort() implementation details
2016-02-24 08:52:18 -08:00
Max Moiseev
85766f8db7
[stdlib] availability attributes for indexOf
2016-02-23 14:26:53 -08:00
Max Moiseev
52f0cf49b0
[stdlib] indexOf => index(of:)/index(where:)
2016-02-23 11:45:11 -08:00
Max Moiseev
78ba5d5f3f
[stdlib] Requires in comments changed to Precondition
2016-02-19 18:57:26 -08:00
Dmitri Gribenko
dd75aed67a
Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines
2016-02-17 14:40:05 -08:00
Dmitri Gribenko
efaa39ea79
stdlib: add first argument labels and some other changes to conform to API guidelines
2016-02-15 23:47:54 -08:00
Nate Cook
51251dc133
Convert imperative function summaries to present.
...
i.e., "Return ..." -> "Returns ..."
2016-02-12 04:20:39 -06:00
Max Moiseev
61c837209b
Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines
2016-02-04 16:13:39 -08:00
David Farler
d45aa36e85
Clean up some things that sneaked into var reverts
...
- Remove an overload that came back in after rebase
- Minor formatting issues
2016-01-30 10:03:53 -08:00
David Farler
3f635d04c7
Reinstante var bindings in refutable patterns, except function parameters.
...
This reverts commits: b96e06da44 ,
8f2fbdc93a ,
93b6962478 ,
64024118f4 ,
a759ca9141 ,
3434f9642b ,
9f33429891 ,
47c043e8a6 .
This commit leaves 'var' on function parameters as a warning to be
merged into Swift 2.2. For Swift 3, this will be an error, to be
converted in a follow-up.
2016-01-29 15:27:08 -08:00
practicalswift
ca9e488f30
[gardening] Add "-*- swift -*-" to *.swift.gyb. Remove from *.swift.
2016-01-23 10:27:03 +01:00
Dmitri Gribenko
9bcd5a1056
Collection.length => .count
2016-01-22 18:41:19 -08:00
Dmitri Gribenko
574052f1be
stdlib: standardize fatalError() messages for unavailable APIs
2016-01-21 16:34:54 -08:00
Max Moiseev
86680ec622
[stdlib] @available attributes for removed APIs
2016-01-20 13:08:27 -08:00
Dmitri Gribenko
74ce1ca79c
Add unavailable declarations for Swift 2.2 -> 3 migration
2016-01-19 14:32:59 -08:00