Rollup merge of #81505 - henryboisdequin:cold_path-not-pub, r=sanxiyn

`fn cold_path` doesn't need to be pub

Fixes #81429

Note: this PR also fixes a small typo that I found
This commit is contained in:
Yuki Okushi 2021-01-30 13:36:58 +09:00 committed by GitHub
commit ba40cea487
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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()
}

View File

@ -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
// |