Rollup merge of #80411 - petrochenkov:nosymwith, r=matthewjasper

rustc_span: Remove `Symbol::with`

A subset of https://github.com/rust-lang/rust/pull/79425 that is a pure refactoring.
This commit is contained in:
Dylan DPC 2020-12-28 14:13:21 +01:00 committed by GitHub
commit 80934aba15
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 10 deletions

View file

@ -2416,7 +2416,10 @@ impl<'a> Resolver<'a> {
} else if i == 0 {
if ident
.name
.with(|n| n.chars().next().map_or(false, |c| c.is_ascii_uppercase()))
.as_str()
.chars()
.next()
.map_or(false, |c| c.is_ascii_uppercase())
{
(format!("use of undeclared type `{}`", ident), None)
} else {