1
Fork 0

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

View file

@ -977,7 +977,7 @@ impl<'a> Resolver<'a> {
}); });
if let Some(def_span) = def_span { if let Some(def_span) = def_span {
if span.overlaps(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` // error[E0423]: expected function, tuple struct or tuple variant, found struct `X`
// --> $DIR/issue-64792-bad-unicode-ctor.rs:3:14 // --> $DIR/issue-64792-bad-unicode-ctor.rs:3:14
// | // |