mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Previously, we would emit a "compiler doesn't understand error" since we would detect the escape and fail. That is the correct behavior here if the partial_apply is not already identified as escaping by an earlier pass. But in the case where we see that the partial_apply's callee was marked with semantics::NO_MOVEONLY_DIAGNOSTICS, then we: 1. Suppress the "compiler doesn't understand error" for this specific mark_must_check. 2. Suppress function wide the "copy of noncopyable type" error. Since we stopped processing the mark_must_check that was passed to the partial_apply, we may have left copies of noncopyable types on that mark_must_check value. This is ok since the user will get the error, will recompile, and if any further show up after they fix the inout escaping issue, they will be emitted appropriately.
5.1 KiB
5.1 KiB