Mark Lacey
b64551b853
[stdlib] Restore signatures to use UnsafeMutableBufferPointer.
...
Resolves rdar://problem/21933004.
2017-08-31 22:33:36 -07:00
Doug Gregor
ab5d88ec29
[Stdlib unit test] Eliminate redundant explicit constraints.
2017-03-22 17:35:14 -07:00
Doug Gregor
cad49e66c4
[Unit test library] Eliminate redundant conformance requirements.
2017-03-17 21:53:17 -10:00
Matthew Carroll
0e09bbbb83
[DiagnosticsQoI] SR-3359: Add a fix-it to remove @discardableResult on functions that return Void or Never ( #6681 )
...
This commit adds a fix-it to remove @discardableResult on functions that return Void or Never. The fix-it is at the warning level. A test was added to verify that the fix-it removes the @discardableResult. This issue was reported in SR-3359:
https://bugs.swift.org/browse/SR-3359
Changes:
TypeCheckAttr.cpp: implemented AttributeChecker::visitDiscardableResultAttr to add a fix-it to remove @discardableResult on functions returning Void or Never.
DiagnosticsSema.def: Added a warning with a diagnostic message.
LoggingWrappers.swift.gyb, HashedCollections.swift.gyb: Removed @discardableResult on functions returning Void.
fixits-apply-all.swift, fixits-apply-all.swift.result: Added tests to verify that @discardableResult is removed from functions returning Void or Never.
2017-01-11 15:12:36 -08:00
Ben Cohen
578a52627a
Merge branch 'master' into se-147
2017-01-07 13:19:15 -08:00
practicalswift
6d1ae2a39c
[gardening] 2016 → 2017
2017-01-06 16:41:22 +01:00
Ben Cohen
fefc2e40df
Migrate _copyContents to be called from UnsafeMutableBufferPointer with checks for overrun.
2017-01-05 11:59:49 -08:00
practicalswift
797b80765f
[gardening] Use the correct base URL ( https://swift.org ) in references to the Swift website
...
Remove all references to the old non-TLS enabled base URL (http://swift.org )
2016-11-20 17:36:03 +01:00
practicalswift
cc852042c9
[gardening] Fix accidental trailing whitespace.
2016-10-29 10:22:58 +02:00
Dmitri Gribenko
92c180031f
stdlib: make 'Sequence.first(where:)' a pure protocol extension (no dynamic dispatch)
...
SE-0032 did not propose a protocol entry point, only a protocol
extension.
Using a pure protocol extension is the right choice here because a
concrete sequence can't provide a more efficient implementation of this
method than the default one.
2016-09-09 11:30:55 -07:00
Robert Widmann
3814b7a23d
Update the changelog
2016-08-17 00:18:09 -07:00
Russ Bishop
f0e6c306e4
[stdlib][SE-45] Add prefix(while:) and drop(while:) to Sequence
...
Includes lazy implementation courtesy of Nate Cook
2016-08-15 14:13:27 -07:00
Michael Ilseman
b7c9eddd11
[noescape by default] drop @noescape from stdlib
2016-08-04 16:09:01 -07:00
Dmitri Gribenko
0118c7378a
StdlibCollectionUnittest: reduce boilerplate
2016-08-03 22:38:28 -07:00
Robert Widmann
14dc86cf15
Polish off uses of dynamicType in codebase
2016-07-29 16:58:40 -07:00
Nate Cook
4ee37b7a2a
Remove leftover print
2016-07-24 00:56:50 -05:00
Nate Cook
c9c865c279
[stdlib] Update partition(by:) tests
...
Adds a dispatch test for partition(by:), since it's now a protocol
requirement. Also adds a new logging collection wrapper that only
logs when _withUnsafeMutableBufferPointerIfSupported is called --
any calls to this method from dispatched methods are uncounted by
the standard logging wrappers.
2016-07-22 22:31:27 -05:00
Rintaro Ishizaki
42d09e7331
[SE-0095 Migration] Migrate protocol<...> usage
2016-07-21 14:29:33 +09: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
824bccc871
stdlib: change Collection._copyToNativeArrayBuffer() to be defined in terms of public types
2016-07-11 10:54:43 -07:00
rintaro ishizaki
6401324993
[stdlib] Apply tail style "where" clause to stdlib/{internal,private}
2016-06-02 12:01:21 +09: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
Russ Bishop
da3f51fa26
Fix LoggingWrappers
2016-05-15 15:07:12 -07:00
Russ Bishop
1f88150b79
Use forEach() and fix tests
2016-05-14 23:32:41 -07:00
Russ Bishop
f20c9255e9
Changes for code review
2016-05-14 16:57:00 -07:00
Dave Abrahams
9bee5d182f
[stdlib] location/formLocation => index/formIndex
2016-04-26 17:46:16 -07: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
3e708a9328
Merge commit '8e292daec1bc790c96b5ee39b8d55dadcac6ce1b' into swift-3-indexing-model
2016-04-14 15:10:26 -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
81fa3ee1ad
StdlibCollectionUnittest: logging collections: update property names to match actual Collection API
2016-04-08 17:40:39 -07:00
Trent Nadeau
f96ad263a8
Added @discardableResult attr to mutating functions
2016-04-07 23:27:38 +00:00
Dmitri Gribenko
79c75f0c1a
StdlibCollectionUnittest: simplify code
2016-04-06 23:31:31 -07:00
Dmitri Gribenko
6131df64d2
stdlib: make _preprocessingPass rethrowing and add tests
2016-04-06 23:22:26 -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
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
81d3e8ca83
limit: => limitedBy:, pt 2
...
M-x findr-query-replace
\<limit: \([^(),]*\|[^(),]+([^()]*)[^(),]*\))\( *\(?:[^ -]\|-[^>]\)\)
limitedBy: \1)\2
2016-03-28 13:12:02 -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
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
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
9dd485eb89
New indexing model: WIP on updating StdlibCollectionUnittest
2016-03-18 23:03:01 -07:00