Commit Graph

49 Commits

Author SHA1 Message Date
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
Nate Cook
8b39706c3f [stdlib] Documentation revisions
- Various edits
- Standardized complexity formatting
2016-08-12 12:24:36 -05:00
Nate Cook
559092bbf2 [stdlib] Revise stdlib documentation comments
- Expand pre-example explanations
- Update documentation for SE-0118
- Removing remaining 'iff' usage
- Revise Array discussion
- Fix formIndex(_:offsetBy) parameter formatting
- Improve index/formIndex(_:offsetBy:(limitedBy:)?) discussion
- Update Quick Look discussions
- Fixes grammar inconsistencies
- Adds parameter / return documentation
- Adds and expands on examples
- Revises AnyObject discussion for new `id` bridging rules
- Revise readLine, print, and assertion functions
- Add missing docs to String index-moving methods
2016-08-05 16:07:46 -05:00
Robert Widmann
f97e5dcb0e [SE-0115][1/2] Rename *LiteralConvertible protocols to ExpressibleBy*Literal. This
change includes both the necessary protocol updates and the deprecation
warnings
suitable for migration.  A future patch will remove the renamings and
make this
a hard error.
2016-07-12 15:25:24 -07: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
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
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
Nate Cook
982e3d09f8 [stdlib] Revise documentation for new indexing model
This revises and expands on documentation for the new collection methods
for working with indices and the revised Swift 3 set APIs. In addition,
it includes documentation for the new range types.
2016-05-19 10:16:14 -05:00
Dmitri Gribenko
9aece73efb stdlib: add migration aids for SetAlgebra API
rdar://problem/26227732
2016-05-17 20:06:59 -07:00
Trent Nadeau
6e327b4ddb Updated stdlib to use @discardableResult and _ = . 2016-05-11 22:53:37 -04:00
practicalswift
68b148cfb1 [gardening] Fix recently introduced typos. 2016-05-06 20:31:38 +02:00
practicalswift
06fe6b0424 Merge pull request #2358 from practicalswift/a-vs-an-fixes
[gardening] Fix "a" vs. "an" issues.
2016-05-02 23:21:15 +02:00
practicalswift
540cb751ac [gardening] Fix recently introduced typo: "adavances" → "advances"
[gardening] Fix recently introduced typo: "compie" → "compile"

[gardening] Fix recently introduced typo: "consise" → "concise"

[gardening] Fix recently introduced typo: "dengerate" → "degenerate"

[gardening] Fix recently introduced typo: "encodeded" → "encoded"

[gardening] Fix recently introduced typo: "equvalent" → "equivalent"

[gardening] Fix recently introduced typo: "guaranted" → "guaranteed"

[gardening] Fix recently introduced typo: "overridde" → "override"

[gardening] Fix recently introduced typo: "subsquence" → "subsequence"

[gardening] Fix recently introduced typo: "substraction" → "subtraction"

[gardening] Fix recently introduced typo: "whiltespace" → "whitespace"
2016-05-01 20:07:18 +02:00
practicalswift
d804026b34 [gardening] Fix "a" vs. "an" issues. 2016-05-01 13:29:57 +02:00
Nate Cook
3fb445410f Update documentation comments for revised Set API 2016-04-27 10:56:35 -05:00
Dave Abrahams
debde16e2c Merge set-api branch into swift-3-indexing-model 2016-04-26 15:56:42 -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
Trent Nadeau
f96ad263a8 Added @discardableResult attr to mutating functions 2016-04-07 23:27:38 +00: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
Daniel Duan
276370b599 [stdlib] apply SE-0040 to stdlib 2016-03-11 16:01:41 -08:00
Dmitri Gribenko
dd75aed67a Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-02-17 14:40:05 -08:00
Nate Cook
355fa4d064 Mark true as code in documentation comments. 2016-02-12 04:21:57 -06:00
Nate Cook
51251dc133 Convert imperative function summaries to present.
i.e., "Return ..." -> "Returns ..."
2016-02-12 04:20:39 -06:00
Doug Gregor
7d70b704e4 Merge commit '5e11e3f7287427d386636a169c4065c0373931a8' into swift-3-api-guidelines 2016-01-19 23:18:20 -08:00
Dmitri Gribenko
74ce1ca79c Add unavailable declarations for Swift 2.2 -> 3 migration 2016-01-19 14:32:59 -08:00
gregomni
e2dee6b9dd [stdlib] Switch keywords from 'typealias' to 'associatedtype' in stdlib
Fixes deprecation warnings arising from addition of new
‘associatedtype’ keyword in sr-511.
2016-01-14 09:39:15 -08:00
Max Moiseev
08e1e4a043 Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-01-11 16:51:11 -08:00
Dmitri Gribenko
b5d5d82576 Merge pull request #935 from EZ-NET/correct_document_set-type-parameter-name
[stdlib] [docs] Modify Set's type parameter name in comments.
2016-01-10 23:19:50 -08:00
Tomohiro Kumagai
cf8a733a4d [stdlib] [docs] Modify Set's type parameter name in comments.
In swift 2.0, type parameter name of `Set` is changed from `T` to `Element`.
Therefore, modified the names which appear in code comments and a document.
2016-01-11 16:02:05 +09:00
Max Moiseev
f51e708a8f Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-01-04 12:25:25 -08:00
Zach Panzarino
e3a4147ac9 Update copyright date 2015-12-31 23:28:40 +00:00
Max Moiseev
786e1ea2b1 Merge remote-tracking branch 'origin' into swift-3-api-guidelines 2015-12-11 15:19:02 -08:00
Niels Andriesse
cb408d38f3 Fix indentation 2015-12-11 17:56:40 +11:00
Niels Andriesse
c4623d1ae5 Fix documentation 2015-12-11 11:30:04 +11:00
Maxim Moiseev
3bff3ba106 SetAlgebraType => SetAlgebra 2015-12-10 14:58:51 -08:00
Maxim Moiseev
0e0191380a OptionSetType => OptionSet 2015-12-10 14:58:24 -08:00
Maxim Moiseev
844b81c46b SequenceType => Sequence 2015-12-09 17:16:56 -08:00
Dmitri Gribenko
2cf172160c Rename SequenceType.Generator associated type to SequenceType.Iterator 2015-12-09 17:11:05 -08:00
Vincent Esche
b7a6236040 Fixing wrong method documentation for SetAlgebra (see my rdar://22031133)
Spot the error:

	/// Return true iff `self.intersect(other).isEmpty`.
	@warn_unused_result
	func subtract(other: Self) -> Self
	
	…
	
	/// Return true iff `self.intersect(other).isEmpty`.
	@warn_unused_result
	func isDisjointWith(other: Self) -> Bool

😉
2015-12-03 21:44:26 +01:00
Dmitri Hrybenko
dd3194a18c stdlib: adopt @warn_unused_result
rdar://20957486

Swift SVN r31048
2015-08-06 14:53:18 +00:00
Dave Abrahams
8efffef57b [stdlib] Remove now-unneeded implementation hack
Thanks for the feature, Doug!

Swift SVN r29065
2015-05-27 15:16:47 +00:00
Greg Parker
6c812d0751 [stdlib] Reinstate r29043 "strip final from protocol extensions".
This reverts r29050. This wasn't the change that broke the SourceKit tests.


Swift SVN r29052
2015-05-27 01:52:17 +00:00
Greg Parker
16a3b8ebd7 [stdlib] Revert "strip final from protocol extensions".
SourceKit tests need to be updated.


Swift SVN r29050
2015-05-27 01:34:45 +00:00
Dave Abrahams
1f1643221d [stdlib] strip final from protocol extensions
Now that we've lifted the requirement

Swift SVN r29043
2015-05-26 23:52:36 +00:00
Joe Groff
d1b6fa32c4 Revert "Revert "[stdlib] Land OptionSetType et. al.""
This recommits r28892, r28894, and r28895; the previous commits should have addressed the previous breakage.

Swift SVN r28905
2015-05-22 05:47:29 +00:00
Dave Abrahams
21b9a97e88 Revert "[stdlib] Land OptionSetType et. al."
This reverts commit r28892, r28894, and r28895.

They broke validation tests; JoeG is going to look at what's needed to
make them work again.

Swift SVN r28897
2015-05-22 00:13:53 +00:00
Dave Abrahams
6e7d6b980b [stdlib] Eliminate OptionSetDispatchType
Iteration N+1 of the default implementations hack applied!
Also clean up the code voice in many comments.

Swift SVN r28895
2015-05-21 23:39:10 +00:00
Dave Abrahams
ad7f7c6779 [stdlib] Land OptionSetType et. al.
This has passed review, or at least satisfied Tony Parker, provided we
do something to hide SetAlgebraDispatchType.  I think I can eliminate it
in an imminent commit.

Swift SVN r28892
2015-05-21 22:55:02 +00:00