Skip to content

Commit

Permalink
Rollup merge of #81505 - henryboisdequin:cold_path-not-pub, r=sanxiyn
Browse files Browse the repository at this point in the history
`fn cold_path` doesn't need to be pub

Fixes #81429

Note: this PR also fixes a small typo that I found
  • Loading branch information
JohnTitor authored Jan 30, 2021
2 parents 6090c57 + fd5fb86 commit ba40cea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion compiler/rustc_arena/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ use std::slice;

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

Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_resolve/src/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -977,7 +977,7 @@ impl<'a> Resolver<'a> {
});
if let Some(def_span) = def_span {
if span.overlaps(def_span) {
// Don't suggest typo suggestion for itself like in the followoing:
// Don't suggest typo suggestion for itself like in the following:
// error[E0423]: expected function, tuple struct or tuple variant, found struct `X`
// --> $DIR/issue-64792-bad-unicode-ctor.rs:3:14
// |
Expand Down

0 comments on commit ba40cea

Please sign in to comment.