Skip to content

Conversation

kavon
Copy link
Member

@kavon kavon commented Sep 25, 2025

A continuation atop #84498

New things:

  • Closures actually get checked now, when they were missed before.
  • var works a little better, but there are known issues still.

We were getting an address-based emission for loadable types,
if the result of a LoadExpr was explicit-copied. This emission
had extra hidden copies that could not be silenced.
ManualOwnership effectively subsumes @_noImplicitCopy,
by diagnosing all implicit copies in a function.
These wrappers are detected by the move checking passes,
to support the implicit no-implicit-copy check for
parameters with ownership specifiers.

ManualOwnership already does this kind of checking, and the
two passes can interfere with each other, such as intercepting
diagnostics that are meant to be emitted by ManualOwnership.
Was mistakenly counting a 'store' as
a copying instruction, when it's only a
consuming one.

SILGen was not handling lvalues that are
addresses for loadable types correctly,
when emitting a CopyExpr in ManualOwnership.
@kavon
Copy link
Member Author

kavon commented Sep 25, 2025

@swift-ci smoke test

@kavon
Copy link
Member Author

kavon commented Sep 25, 2025

swiftlang/swift-docc#1299
@swift-ci smoke test windows

@kavon kavon enabled auto-merge September 25, 2025 04:56
@kavon kavon merged commit e93ffb7 into swiftlang:main Sep 25, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant