Skip to content

[diags][cxx-interop] Update diagnostic for 'begin' to suggest using a for-loop instead. #65617

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 4, 2023

Conversation

zoecarver
Copy link
Contributor

Does not fix the fix-it. The current fix it will be left as a stop-gap solution and we can hopefully update this fix it in the near future to actually plop in a for loop (too much work for this PR though).

It's important to change this wording ASAP so that people aren't lead astray.

… for-loop instead.

Does not fix the fix-it. The current fix it will be left as a stop-gap solution and we can hopefully update this fix it in the near future to actually plop in a for loop (too much work for this PR though).
@zoecarver
Copy link
Contributor Author

@swift-ci please test

@@ -195,7 +195,7 @@ NOTE(mark_safe_to_import, none, "annotate method '%0' with 'SWIFT_RETURNS_INDEPE
NOTE(at_to_subscript, none, "do you want to replace it with a call "
"to the subscript operator?",
())
NOTE(get_swift_iterator, none, "do you want to make a Swift iterator instead?",
NOTE(use_collection_apis, none, "do you want to use a for-loop instead?",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe for-in loop is better? That's how that construct is referred to in the documentation.

@zoecarver zoecarver merged commit bd1cc4c into swiftlang:main May 4, 2023
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.

3 participants