Skip to content

Commit fe08ac6

Browse files
committed
Use ast::Name in report_ambiguous_associated_type().
1 parent 482d636 commit fe08ac6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/librustc_typeck/astconv.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1461,7 +1461,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
14611461
span: Span,
14621462
type_str: &str,
14631463
trait_str: &str,
1464-
name: &str,
1464+
name: ast::Name,
14651465
) {
14661466
let mut err = struct_span_err!(self.tcx().sess, span, E0223, "ambiguous associated type");
14671467
if let (Some(_), Ok(snippet)) = (
@@ -1688,7 +1688,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
16881688
span,
16891689
&qself_ty.to_string(),
16901690
"Trait",
1691-
&assoc_ident.as_str(),
1691+
assoc_ident.name,
16921692
);
16931693
}
16941694
return Err(ErrorReported);
@@ -1761,7 +1761,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
17611761
span,
17621762
"Type",
17631763
&path_str,
1764-
&item_segment.ident.as_str(),
1764+
item_segment.ident.name,
17651765
);
17661766
return tcx.types.err;
17671767
};

0 commit comments

Comments
 (0)