swift
b060e5ba - [move-only] Make sure we mark local function inout parameters with mark_must_check.

Commit
2 years ago
[move-only] Make sure we mark local function inout parameters with mark_must_check. Originally, we were relying on capture info to determine if we needed to insert this mark_must_check. This ignored that the way that we are handling escaping/non-escaping is something that is approximated in the AST but actually determined at SIL level. With that in mind, rather than relying on the capture info here, just rely on us having an inout argument. The later SIL level checking for inout escapes is able to handle mark_must_check and knows how to turn off noncopyable errors in the closure where we detect the error to prevent us from emitting further errors due to the mark_must_check here. I discovered this while playing with the previous commit. rdar://112555589
Author
Committer
Parents
Loading