Commit Graph

30 Commits

Author SHA1 Message Date
Holly Borla
fdd7402bbf [Educational Notes] Add an explanation for sending closure arguments. 2025-03-03 21:44:30 -08:00
Holly Borla
0f7c991eec [Educational Notes] Add an explanation for actor-isolated calls from
synchronous nonisolated contexts.
2025-03-03 21:44:30 -08:00
Holly Borla
cf437719fa [Educational Notes] Add an explanation for captures in a @Sendable
closure.
2025-03-03 21:40:59 -08:00
Holly Borla
4353c5a2fe [Educational Notes] Add an explanation for the unsafe global variable
errors.
2025-03-03 21:22:33 -08:00
Holly Borla
72eab9f02a [Educational Notes] Add an explanation for `sending 'x' risks causing
data races`.
2025-03-03 21:22:33 -08:00
Holly Borla
f1492fe553 [Educational Notes] Remove complex-closure-inference.
This educational note was obsoleted by SE-0362.
2025-02-19 21:19:06 -08:00
Anthony Latsis
29626c4427 [NFC] Diag: Rename error_in_future_swift_version wrappers
Be clear that these are about language mode.
2025-01-15 23:14:08 +00:00
Ryan Mansfield
8dad181aeb Remove unused diagnostics. 2024-07-16 14:10:02 -04:00
Holly Borla
466a021caa [Diagnostics] Add an educational note for error_in_future_swift_version. 2024-03-01 12:05:51 -08:00
Richard Wei
335b766b25 [ResultBuilders] Enable SE-0348 buildPartialBlock by default.
Enables SE-0348 `buildPartialBlock` feature by default. The frontend flag is kept for compatibility with existing clients, but is now ineffective.

Also includes some improved error messages for invalid result builder call sites.
2022-03-22 16:26:50 -07:00
Doug Gregor
c0f5502269 Leverage error-to-warnings downgrades for non-ephemeral conversion diagnostics
There were slight wording changes between the warning and error
diagnostics, but they don't seem to justify the duplication here.
2021-12-02 11:12:07 -08:00
Anthony Latsis
ccaa6707fe Docs: Reattach, rewrite and rename the «associated-type-requirements» educational note 2021-08-30 22:27:13 +03:00
Kavon Farvardin
c0607b345f Revert "Merge pull request #33767 from theblixguy/chore/remove-self-or-associated-type-diagnostic"
The following regression test added for this feature is not passing:

Swift(linux-x86_64) :: decl/protocol/protocols_with_self_or_assoc_reqs_executable.swift

with a compiler crash happening during SILFunctionTransform "Devirtualizer".

Reverting to unblock CI.

This reverts commit f96057e260, reversing
changes made to 3fc18f3603.
2021-08-26 16:46:42 -07:00
Anthony Latsis
fbae8a4fdb Docs: Reattach, rewrite and rename the «associated-type-requirements» educational note 2021-08-16 18:30:23 +03:00
Jevon Mao
9397ee59d5 [Diagnostics] Add educational notes explaining multiple inheritance (#38253)
* Add educational notes for multiple inheritance

* Update edu note by adopting reviewer suggestions

* Update userdocs/diagnostics/multiple-class-inheritance.md

Co-authored-by: Varun Gandhi <varun_gandhi@apple.com>

* Added Flyable protocol definition to example

* Apply suggestions from code review

Co-authored-by: Varun Gandhi <varun_gandhi@apple.com>

* Apply suggestions from code review

Co-authored-by: Xiaodi Wu <13952+xwu@users.noreply.github.com>

* Use consistent terminology

Co-authored-by: Xiaodi Wu <13952+xwu@users.noreply.github.com>

* Use utensils example as suggested by review

* Update title to Multiple Inheritance

* Apply suggestions from code review

Co-authored-by: Xiaodi Wu <13952+xwu@users.noreply.github.com>

* Rename file to match changed name

* Add more objects in protocol construction example

* Apply suggestions from code review

Co-authored-by: Xiaodi Wu <13952+xwu@users.noreply.github.com>

Co-authored-by: Varun Gandhi <varun_gandhi@apple.com>
Co-authored-by: Xiaodi Wu <13952+xwu@users.noreply.github.com>
2021-08-01 08:06:38 -04:00
Doug Gregor
6d41524fe6 [SE-0289] Finish renaming source code, tests to "result builders" 2020-10-20 22:18:51 -07:00
Doug Gregor
0d568a93d4 [SE-0289] Update diagnostics & many other strings to "result builders" 2020-10-20 21:44:09 -07:00
Doug Gregor
591c8cddec [Function builders] Add an educational note on the build* functions.
Introduce an educational note with a synopsis of the build* function
declarations one can add to a function builder, and associate it with
the diagnostics indicating incorrect or missing build* functions.
2020-09-16 14:01:28 -07:00
Owen Voorhees
bacc96b3ef Add an educational note explaining SE-0286 changes
Apply suggestions from code review

Co-authored-by: Ben Rimmington <me@benrimmington.com>

Reword explanation of pre-5.3 behavior

Associate SE-0286 note with warning diagnostic
2020-07-29 21:14:43 -07:00
Owen Voorhees
22289b0bb2 Merge pull request #32231 from owenv/opaque-note
[EduNotes] Explain some opaque type diagnostics
2020-07-02 22:28:06 -07:00
Owen Voorhees
c69baa8731 [EduNotes] Explain some opaque type diagnostics 2020-07-01 21:04:16 -07:00
Onyekachi Ezeoke
53b4ce0034 fix confusing protocol diagnostic
- update the diagnostic error message
- add educational notes
2020-06-27 05:48:11 +01:00
Owen Voorhees
792fb87da5 [Diagnostics] Add an edu note explaining @_nonEphemeral diags 2020-05-11 13:05:12 -07:00
Owen Voorhees
68530acb1d Add an edu note explaining StringInterpolationProtocol requirements 2020-04-20 14:41:08 -07:00
Owen Voorhees
72fba7db8a Merge pull request #30153 from owenv/protocol-can-only-be-used-as-a-constraint-because-it-has-self-or-associated-type-requirements-oh-no
[Diagnostics] Add edu note explaining limitations of protocols with assoc. type reqs.
2020-03-10 14:48:39 -07:00
Owen Voorhees
16e84e3c1c [Diagnostics] Add edu note explaining limitations of protocols with associated type requirements 2020-03-09 15:55:54 -07:00
Owen Voorhees
c75a363e1c Tweak @propertyWrapper diagnostics and add an educational note 2020-02-27 20:28:28 -08:00
Owen Voorhees
4e686494dc [Diagnostics] Add an educational note about @dynamicCallable requirements 2020-01-13 10:48:52 -06:00
Owen Voorhees
b84562003e [Diagnostics] Add an educational note explaining closure type inference rules
This note explains the difference in type inference between single expression and
non-single expression closures. It is associated with the "unable to infer
complex closure return type" diagnostic.
2019-12-04 13:37:11 -08:00
Owen Voorhees
ac05a66938 [Diagnostics] Introduce "Educational Notes" for diagnostics
Educational notes are small pieces of documentation which explain a concept
relevant to some diagnostic message. If -enable-descriptive-diagnostics is
passed, they will be printed after a diagnostic message if available.

Educational notes can be found at /usr/share/doc/diagnostics in a
toolchain, and are associated with specific compiler diagnostics in
EducationalNotes.def.
2019-11-07 13:18:35 -08:00