Skip to content

Commit 05dcd0e

Browse files
committed
Remove LocalInternedString uses from librustc_typeck.
1 parent dfd43f0 commit 05dcd0e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/librustc_typeck/check/expr.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use crate::astconv::AstConv as _;
1919

2020
use errors::{Applicability, DiagnosticBuilder};
2121
use syntax::ast;
22-
use syntax::symbol::{Symbol, LocalInternedString, kw, sym};
22+
use syntax::symbol::{Symbol, kw, sym};
2323
use syntax::source_map::Span;
2424
use syntax::util::lev_distance::find_best_match_for_name;
2525
use rustc::hir;
@@ -1198,7 +1198,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
11981198
}
11991199
_ => {
12001200
// prevent all specified fields from being suggested
1201-
let skip_fields = skip_fields.iter().map(|ref x| x.ident.as_str());
1201+
let skip_fields = skip_fields.iter().map(|ref x| x.ident.name);
12021202
if let Some(field_name) = Self::suggest_field_name(
12031203
variant,
12041204
&field.ident.as_str(),
@@ -1242,11 +1242,11 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
12421242
// Return an hint about the closest match in field names
12431243
fn suggest_field_name(variant: &'tcx ty::VariantDef,
12441244
field: &str,
1245-
skip: Vec<LocalInternedString>)
1245+
skip: Vec<Symbol>)
12461246
-> Option<Symbol> {
12471247
let names = variant.fields.iter().filter_map(|field| {
12481248
// ignore already set fields and private fields from non-local crates
1249-
if skip.iter().any(|x| *x == field.ident.as_str()) ||
1249+
if skip.iter().any(|&x| x == field.ident.name) ||
12501250
(!variant.def_id.is_local() && field.vis != Visibility::Public)
12511251
{
12521252
None

0 commit comments

Comments
 (0)