Skip to content

rustc_arena::coldpath shouldn't be pub #81429

Closed
@fogti

Description

@fogti

#[inline(never)]
#[cold]
pub fn cold_path<F: FnOnce() -> R, R>(f: F) -> R {
f()
}

The function isn't used anywhere outside of that crate (there is a copy of that function in rustc_datastructures, which is used elsewhere). It shouldn't be pub at all because it is only used in the same file in which it is defined.

Metadata

Metadata

Labels

C-cleanupCategory: PRs that clean code up or issues documenting cleanup.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions