Limit visibility of internal impl functions in function crates #18877
+101
−158
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
N/A
Rationale for this change
Whilst reviewing some recent PRs (#18839 & #18768) I noticed we have quite a few inner implementation functions that are public for some reason, which give the false impression these are meant to be public APIs (and thus any changes to their signature needs to be restricted). Went through and limited the functions to private where possible to try reduce our public API footprint.
What changes are included in this PR?
Change inner functions in functions & nested-functions crates to be private, away from public.
Are these changes tested?
Compiler itself.
Are there any user-facing changes?
Yes, quite a few functions are now private, but I don't think they were meant to be public in the first place.