Skip to content

Commit 19a8759

Browse files
authored
Merge branch 'master' into comparable-enums
2 parents 206e3b1 + 37655db commit 19a8759

File tree

775 files changed

+23667
-5830
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

775 files changed

+23667
-5830
lines changed

.flake8

Lines changed: 73 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,74 @@
11
[flake8]
2-
ignore = W291 W504
3-
filename = *.py,
4-
./utils/80+-check,
5-
./utils/backtrace-check,
6-
./benchmark/scripts/Benchmark_Driver,
7-
./benchmark/scripts/Benchmark_DTrace.in,
8-
./benchmark/scripts/Benchmark_GuardMalloc.in,
9-
./benchmark/scripts/Benchmark_RuntimeLeaksRunner.in,
10-
./utils/build-script,
11-
./utils/check-incremental,
12-
./test/Driver/Inputs/fake-toolchain/clang++,
13-
./utils/coverage/coverage-build-db,
14-
./utils/coverage/coverage-generate-data,
15-
./utils/coverage/coverage-query-db,
16-
./utils/coverage/coverage-touch-tests,
17-
./utils/gyb,
18-
./test/Driver/Inputs/fake-toolchain/ld,
19-
./utils/line-directive,
20-
./utils/swift_build_support/tests/mock-distcc,
21-
./docs/scripts/ns-html2rst,
22-
./utils/PathSanitizingFileCheck,
23-
./utils/recursive-lipo,
24-
./utils/round-trip-syntax-test,
25-
./utils/rth,
26-
./utils/run-remote,
27-
./utils/run-test,
28-
./utils/scale-test,
29-
./utils/submit-benchmark-results,
30-
./utils/update-checkout,
31-
./utils/viewcfg,
32-
./utils/symbolicate-linux-fatal,
2+
3+
filename =
4+
*.py,
5+
6+
./benchmark/scripts/Benchmark_Driver,
7+
./benchmark/scripts/Benchmark_DTrace.in,
8+
./benchmark/scripts/Benchmark_GuardMalloc.in,
9+
./benchmark/scripts/Benchmark_RuntimeLeaksRunner.in,
10+
11+
./docs/scripts/ns-html2rst,
12+
13+
./test/Driver/Inputs/fake-toolchain/clang++,
14+
./test/Driver/Inputs/fake-toolchain/ld,
15+
16+
./utils/80+-check,
17+
./utils/backtrace-check,
18+
./utils/build-script,
19+
./utils/check-incremental,
20+
./utils/coverage/coverage-build-db,
21+
./utils/coverage/coverage-generate-data,
22+
./utils/coverage/coverage-query-db,
23+
./utils/coverage/coverage-touch-tests,
24+
./utils/gyb,
25+
./utils/line-directive,
26+
./utils/PathSanitizingFileCheck,
27+
./utils/recursive-lipo,
28+
./utils/round-trip-syntax-test,
29+
./utils/rth,
30+
./utils/run-remote,
31+
./utils/run-test,
32+
./utils/scale-test,
33+
./utils/submit-benchmark-results,
34+
./utils/swift_build_support/tests/mock-distcc,
35+
./utils/symbolicate-linux-fatal,
36+
./utils/update-checkout,
37+
./utils/viewcfg,
38+
39+
# TODO: We should be linting the lit configs.
40+
#lit.cfg,
41+
42+
# FIXME: We need to be linting these files.
43+
#./utils/build-parser-lib,
44+
#./utils/dev-scripts/blockifyasm,
45+
#./utils/dev-scripts/split-cmdline,
46+
47+
exclude =
48+
.git,
49+
__pycache__,
50+
51+
ignore =
52+
# The black tool treats slices consistently, the E203 warning is not PEP8
53+
# compliant (https://github.com/psf/black#slices).
54+
E203,
55+
56+
# FIXME: We should not have trailing whitespace.
57+
W291,
58+
59+
# Line breaks before binary operators are not explicitly disallowed in
60+
# PEP8, rather it should be consistent throughout the project. The black
61+
# tool puts them on new lines which is to be considered a best practice
62+
# in the future.
63+
W503,
64+
65+
# Similarly ignore line break after binary operators.
66+
W504,
67+
68+
# TODO: Ignore Bugbear lints for now, but we should enable these in the
69+
# future.
70+
B,
71+
72+
# 10% larger than the standard 80 character limit. Conforms to the black
73+
# standard and Bugbear's B950.
74+
max-line-length = 88

CHANGELOG.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,33 @@ CHANGELOG
2323

2424
</details>
2525

26+
Swift Next
27+
----------
28+
29+
* [SE-0269][]:
30+
31+
When an escaping closure explicitly captures `self` in its capture list, the
32+
use of implicit `self` is enabled within that closure. This means that the
33+
following code is now valid:
34+
35+
```swift
36+
func doStuff(_ stuff: @escaping () -> Void) {}
37+
38+
class C {
39+
var x = 0
40+
41+
func method() {
42+
doStuff { [self] in
43+
x += 1
44+
}
45+
}
46+
}
47+
```
48+
49+
This proposal also introduces new diagnostics for inserting `self` into the
50+
closure's capture list in addition to the existing 'use `self.` explicitly'
51+
fix-it.
52+
2653
Swift 5.2
2754
---------
2855

@@ -172,7 +199,7 @@ Swift 5.2
172199
A method override is no longer allowed to have a generic signature with
173200
requirements not imposed by the base method. For example:
174201

175-
```
202+
```swift
176203
protocol P {}
177204

178205
class Base {
@@ -7856,6 +7883,7 @@ Swift 1.0
78567883
[SE-0252]: <https://github.com/apple/swift-evolution/blob/master/proposals/0252-keypath-dynamic-member-lookup.md>
78577884
[SE-0253]: <https://github.com/apple/swift-evolution/blob/master/proposals/0253-callable.md>
78587885
[SE-0254]: <https://github.com/apple/swift-evolution/blob/master/proposals/0254-static-subscripts.md>
7886+
[SE-0269]: <https://github.com/apple/swift-evolution/blob/master/proposals/0269-implicit-self-explicit-capture.md>
78597887

78607888
[SR-106]: <https://bugs.swift.org/browse/SR-106>
78617889
[SR-419]: <https://bugs.swift.org/browse/SR-419>

0 commit comments

Comments
 (0)